The number of possible combinations with a constraint

  • Context: High School 
  • Thread starter Thread starter Bayoudh101
  • Start date Start date
  • Tags Tags
    Combinations Constraint
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: 653
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 .
 

Similar threads

  • · Replies 40 ·
2
Replies
40
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 29 ·
Replies
29
Views
8K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 30 ·
2
Replies
30
Views
5K
  • · Replies 15 ·
Replies
15
Views
6K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K