The number of possible combinations with a constraint

  • Level: High School 
  • Thread starter Thread starter Bayoudh101
  • Start date Start date
  • Tags Tags
    Combinations Constraint
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
2 replies · 2K views
Bayoudh101
Messages
12
Reaction score
0
Hello , i was doing one of Euler project programming problems the other day , and i came across this one .
i tried everything i know about probability , i tried combinations and everything , and i just couldn't get something logically fit to solve this . i tried to ignore this but i just couldn't get it out of my head .

5LB4eW8.png

ignore the last line , as that can be done with the program .
for me this is a purely mathematical problem, all i tired to do was formulate p with k and n
i am just looking for the formula p(k,n) . it's giving me a headache .

thank you very much
 

Attachments

  • 5LB4eW8.png
    5LB4eW8.png
    15 KB · Views: 663
Physics news on Phys.org
Approach it as: (number of ways to pick one of the n chips to have 3 defects)(number of ways to distribute k-3 defects among n chips)/ (number of ways to distribute k defects among n chips).

The number of ways to distribute d distinguishable defects among n distinguishable chips is ##n^d##.
 
  • Like
Likes   Reactions: Bayoudh101
Stephen Tashi said:
Approach it as: (number of ways to pick one of the n chips to have 3 defects)(number of ways to distribute k-3 defects among n chips)/ (number of ways to distribute k defects among n chips).

The number of ways to distribute d distinguishable defects among n distinguishable chips is ##n^d##.

thank you very much sir , i can see it now .