Adam, Bob and Charles, members of a certain team, insisted on sticking together, while taking their places on a bench, accommodating the whole team of n people, - while Dan and Eddy would not like to be placed one next to another.
In how many ways may all these requests be met, if n = 5, 8, 10.
Rem: Computer programs allowed only as verification of your analytically produced results.
A, B and C initially count as one person in placing the teammates, but then the solution count has to be multiplied by 6 to account for the shuffling within that group.
Initially that gives us 6 * (n-2)!, but from this we must subtract out those orders in which D and E are together. That can be calculated in the same manner as A, B and C together: twice what you'd get considering D and E as one person. So that comes to 12 * (n-3)!
The answer is then 6 * (n-2)! - 12 * (n-3)!.
N
5 36 - 24 = 12
8 4320 - 1440 = 2880
10 241920 - 60480 = 181440
Extending, with computer program:
list
10 for N=5 to 20
20 Ways=6*!(N-2)-12*!(N-3)
30 print N,Ways
40 next
OK
run
5 12
6 72
7 432
8 2880
9 21600
10 181440
11 1693440
12 17418240
13 195955200
14 2395008000
15 31614105600
16 448345497600
17 6799906713600
18 109844646912000
19 1883051089920000
20 34145993097216000
|
Posted by Charlie
on 2011-09-04 13:28:34 |