Question: Five of the 10 actors can only sing, two can only dance, and three can both sing and dance. Now, how many kinds of selection methods are there to perform a program that requires two people to dance and two people to sing?
Select[Map[Flatten,
Subsets[Table[{"sing"}, 5]~Join~Table[{"dance"}, 2]~Join~
Table[{"sing", "dance"}, 3], {4}], {1}],
Count[#, "sing"] >= 2 && Count[#, "dance"] >= 2 &] // Length
The result of using the above method is 155
, but the reference answer is 199
(Binomial[3, 2] Binomial[3, 2] + Binomial[5, 1] Binomial[3, 1] Binomial[4, 2] + Binomial[5, 2] Binomial[5, 2]
). I want to know what I
How can do toI list all the possible combinations correctly?