# Probability of assigning people to things

• Jan 6th 2010, 04:21 AM
RhysGM
Probability of assigning people to things
If I have 5 groups called a,b,c,d,e. And I randomly assign these five groups to 20 people. What is the odds that there will be 4 people in each group?

Or more specificially how many times do I have perform this cacluation until there are exactly 4 people in each group?

What then is the odds if I have 20 different dates. So 20 people and 20 dates how many times will I have to perform that calculation to get exactly 4 people in each group on each day.
• Jan 6th 2010, 06:32 AM
Plato
Quote:

Originally Posted by RhysGM
If I have 5 groups called a,b,c,d,e. And I randomly assign these five groups to 20 people. What is the odds that there will be 4 people in each group?

I do not fully understand what you want to do.
But there are $\displaystyle 5^{20}$ ways to assign twenty people to five different cells. Note that some cells could be empty.
There are $\displaystyle \frac{20!}{(4!)^5}$ ways to assign twenty people to five different cells such that each cell has exactly four people.
• Jan 6th 2010, 07:58 AM
RhysGM
Quote:

Originally Posted by Plato
I do not fully understand what you want to do.
But there are $\displaystyle 5^{20}$ ways to assign twenty people to five different cells. Note that some cells could be empty.
There are $\displaystyle \frac{20!}{(4!)^5}$ ways to assign twenty people to five different cells such that each cell has exactly four people.

Spot on.

I put $\displaystyle 5^{20}$ into excel and it gives me 95,367,431,640,625.

If I put $\displaystyle \frac{20!}{(4!)^5}$ into excel I get 305,540,235,000.

So if I have $\displaystyle 9.54*10^{13}$ total combinations but only want $\displaystyle 3.06*10^{11}$

then does $\displaystyle \frac{9.54*10^{13}}{3.06*10^{11}}$ give me the odds of getting the combination I want. Which gives me 312.

So I have a 312 to 1 chance of getting the combination I want for each day.

But this has to match for 20 separate days. So I'm assuming $\displaystyle 312^{20}$ which gives $\displaystyle 7.7*10^{49}$ too large for me to comprehend.

Basically I have a programme running a loop checking all these combinations. So it has to do $\displaystyle 7.7*10^{49}$ loops to find a valid combination?

1,000 loops took 72 seconds. So will my programme take $\displaystyle 1.76*10^{41}$ years to find 1 single valid combination???
• Jan 6th 2010, 08:55 AM
Plato
There are $\displaystyle \frac{20!}{(4!)^5(5!)}$ ways to assign twenty people to five groups of exactly four each.
Above you were labeling the groups as $\displaystyle a,b,c,d,e$. That is what we call an ordered partition.