probability that exactly two envelopes will contain a card with a matching color Suppose that 10 cards, of which 5 are red and 5 are green, are placed at random in 10 envelopes, of which 5 are red and 5 are green. Determine the probability that exactly two envelopes will contain a card with a matching color.
clearly $\Omega= 10!$
if  I have $ 5c1$  ways red and $5c1$  ways green,  How do I get other permutations?  some hints please
 A: HINT: Note that if $2$ red cards are in red envelopes, there are only $3$ red envelopes left to contain green cards, so at least $2$ green cards must end up in green envelopes. Similarly, if $2$ green cards are in green envelopes, then at least $2$ red cards must be in red envelopes. Thus, the only way to get exactly $2$ cards in matching envelopes is to have the red envelopes contain $1$ red and $4$ green cards, and the green envelopes contain $1$ green and $4$ red cards.
There are $5$ ways to choose which red card is to go in a red envelope, and then there are $5$ ways to choose a red envelope to contain it.


*

*How many ways are there to pick $4$ green cards and distribute them amongst the remaining red envelopes?

*Then how many ways are there to place the one remaining green card in a green envelope?

*And finally, how many ways are there to distribute the remaining $4$ red cards amongst the remaining $4$ green envelopes?
A: Suppose both the cards and envelopes are rearranged (without changing the pairings) so that all red envelopes are on the left and all green envelopes are on the left. Now focusing on the cards on the left, we want the probability that exactly one of these is red (then by symmetry there will also be one matching pair on the right).
There are $\binom{5}{1}=5$ ways of choosing one red card out of five, and $\binom{5}{4}=5$ ways of choosing four green cards out of five. There are $\binom{10}{5}$ ways of choosing the five cards on the left from the set of ten.
Hence, the probability is
$$\mathbf{Pr}[2\text{ cards match envelopes}]=\frac{\binom{5}{1}\binom{5}{4}}{\binom{10}{5}}=\frac{5\times5}{252}=\frac{25}{252}$$
A: using $10!$ for total number of permutations, imagine that envelopes 1 to 5 are red and 6 to 10 are green, label the cards $R_1$ to $R_5$ and $G_1$ to $G_5$. Then each equiprobable permutation can be written as a 10-tuple.
e.g. $( G_2, G_5, R_1, G_4, G_1; R_2, G_3, R_3, R_4, R_5 )$ has $R_1$ in the third red envelope and $G_3$ in the second green envelope.
In the first 5 red envelopes... 
choose the red card - 5 ways
choose the 4 green cards - 5 ways 
permute the 5 cards - 5! ways
for each way of doing this, the remaining 5 cards can be permuted 5! ways in the 5 green envelopes.
total permutations = $ 5 \times 5 \times 5! \times 5! $
$$ \text{ probability } = \frac {25(5!)^2}{10!} = \frac{25}{252} $$
A: The probability would be 1/5 
only 1 way you can put exactly 2 card in 2 envelope - 1 red card in red envelope and 1 green card in green envelope.
Now, we will need to figure out how many ways cards can be put in the envelope .
you can have - ( considering only one side - lets say red stack)


*

*1 red + 4 green

*2 red + 3 green

*3 red + 2 green

*4 red + 1 green


and lastly,


*

*5 red + 0 green.

A: As others have pointed out, the only possible solution comprises exactly 1 red card-envelope pair and 1 green pair. If we determine the probability of just getting, say, the red envelopes right, the green envelopes will also be right.
There are 5 of 10 possible ways of getting a red card into the first red envelope. Then there are 5 of 9 possible ways of getting a green card in the next red envelope, followed by 4 of 8 ways for a green card in the next, then 3 of 7, and 2 of 6. This gives us 1 red card in a red envelope, and 1 green card in a green envelope. But all this must be multiplied by 5 because the one red pair could be any of the 5 red envelopes.
The probabilities multiplied out: 
$$(\frac5 {10}\times\frac 5 9\times\frac4 8\times\frac3 7\times\frac2 6)\times5 =\frac{25}{252} $$
Which agrees with the results from Marconius and WW1. I hope that this solution is more intuitive.
