Two Pairs of Matching Hearts

Dwight has 7 cards, and he places them randomly in a row. Then Dave places the same cards (from a different deck) in a random order just underneath Dave's row.

Once Dwight has placed his cards, how many ways can Dave place his cards such that they end up so that exactly two cards match (like in the figure above)?


The answer is 924.

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.

1 solution

Geoff Pilling
Oct 2, 2018

There are ( 7 2 ) \binom{7}{2} ways to pick which columns match. Then there are ! 5 !5 ways to arrange the remaining 5 5 columns so that they don't match, where ! n !n is the derangement formula for n n objects.

This gives:

( 7 2 ) ! 5 = 21 44 = 924 \binom{7}{2} \cdot !5 = 21 \cdot 44 = \boxed{924}

The probability P ( m , n ) P(m,n) that with m m cards dealt there are precisely n n matches, (where 0 n m 2 0 \le n \le m - 2 or n = m n = m ), is

P ( m , n ) = ( m n ) × ! ( m n ) m ! = ! ( m n ) ( m n ) ! n ! P(m,n) = \dfrac{\dbinom{m}{n} \times !(m - n)}{m!} = \dfrac{!(m - n)}{(m - n)! n!} .

For large enough m m we have P ( m , n ) 1 n ! × e P(m,n) \approx \dfrac{1}{n! \times e} , which is a good approximation even here as P ( 7 , 2 ) = ! 5 5 ! 2 ! 0.18333 P(7,2) = \dfrac{!5}{5!2!} \approx 0.18333 and 1 2 e 0.18394 \dfrac{1}{2e} \approx 0.18394 , a 0.33% error. (For m = 52 m = 52 the approximation is good to 67 decimal places.) I still find it a bit un-intuitive that once you get past m = 7 m = 7 or so P ( m , n ) P(m,n) is pretty much independent of m m .

Brian Charlesworth - 2 years, 8 months ago

Log in to reply

Interesting indeed... Perhaps the making of another problem?

Geoff Pilling - 2 years, 8 months ago

Log in to reply

Perhaps. :) Another one I'm considering is where there is a third deck, from which the 7 cards are dealt in a third row, and the question is to find the probability P 3 ( 7 , 1 ) P_{3}(7,1) that there is precisely one match through all three rows, (or generalize to n n matches). I(Strictly pairwise matches are allowed, but just one thrice-wise is.) I'm getting P 3 ( 7 , 1 ) 0.0858 P_{3}(7,1) \approx 0.0858 , which seems reasonable, but my approach doesn't yield n = 0 5 P 3 ( 7 , n ) + P 3 ( 7 , 7 ) = 1 \displaystyle \sum_{n=0}^{5} P_{3}(7,n) + P_{3}(7,7) = 1 , so I suspect my method is flawed. I find that P 3 ( 7 , 0 ) 2 e 1 e 2 0.600 P_{3}(7,0) \approx \dfrac{2}{e} - \dfrac{1}{e^{2}} \approx 0.600 , but that seems a bit low ....

Brian Charlesworth - 2 years, 8 months ago

Log in to reply

@Brian Charlesworth Interesting... Lemme ponder that one a bit...

Geoff Pilling - 2 years, 8 months ago

@Brian Charlesworth Hmmm... I wonder if we can start with a 3 card deck. i.e. P 3 ( 3 , 1 ) P_3(3,1) , and work our way up... :-/

Geoff Pilling - 2 years, 8 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...