Ref: Disney Japan
Cinderella is at a ball with 49 other people. While dancing, they form 25 pairs (with 2 people in each pair). However, Cinderella really wants to avoid her evil stepmother and 2 ugly stepsisters (total of 3 people), and does not want to dance with any of them.
If there are ways to form 25 pairs for dancing in which Cinderella doesn't have to dance with any of her stepfamily, what are the last 3 digits of ?
Details and assumptions
There are no gender restrictions for the dancing pairs.
The order of the pairs does not matter.
Calculators are allowed for this question. I'm not that mean ^_^.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Let me make a function to make this solution shorter.
Let P ( n ) is the number of ways to get 2 n people into n pairs.
Put all the people into lines. x 1 1 , x 1 2 , x 2 1 , x 2 2 , . . . , x n 1 , x n 2 .
So ( x 1 1 , x 1 2 ) will dance together, and so on.
Ex: ( x 3 2 2 ) = Pair 32. Position 2.
Switching 2 n people in a line (fixed position), ( 2 n ) ! ways.
In position ( x 1 1 , x 1 2 ) , they can switch together again, which is the same. Ex: ( x 1 1 , x 1 2 ) and ( x 1 2 , x 1 1 ) .
There're n pairs that can switch together, divide by ( 2 ! ) n .
In position ( x 1 , x 2 ) (pair 1 and 2), they can switch to another position, which is the same. Ex: ( x 1 , x 2 ) and ( x 2 , x 1 )
Therefore, P ( n ) = n ! × ( 2 ! ) n ( 2 n ) !
Let's get back to the question.
Use complement principle to find the number of ways.
∣ A ′ ∣ = ∣ U ∣ − ∣ A ∣ . Where A is the set of number of ways that Cinderella dances with any 3 villains.
Finding ∣ A ∣ .
First, Cinderella dances with 3 villains, 3 ways to choose.
Then, there'll be 48 people left. Number of ways to get 48 people into 24 pairs = P ( 2 4 ) .
Therefore: ∣ A ∣ = 3 × P ( 2 4 ) .
Therefore: Number of ways that Cinderella doesn't dance with any 3 villains
= P ( 2 5 ) − 3 × P ( 2 4 )
= 2 5 ! × ( 2 ! ) 2 5 5 0 ! − 3 × 2 4 ! × ( 2 ! ) 2 4 4 8 !
= 5 4 8 5 8 1 3 6 8 6 7 6 2 3 9 6 9 6 8 2 8 3 5 7 5 1 4 6 8 7 5 0 .
Answer: 7 5 0 ~~~