2

If a deck of 52 playing cards is randomly shuffled and I name two cards without specifying a suit (for example, 7 and king), what is the probability that those two cards (of any suit) will appear next to each other in the order specified somewhere in the deck? So, if I chose 7 as my first card and king as my second card, it would be a "success" if the shuffled deck contained a 7 of any suit followed by a king of any suit.

Thanks for any help!

3 Answers3

4

Consider a random arrangement of the 48 cards left in the deck after the four kings have been removed. What's the probability that if I randomly place the four kings back into the deck, none of the four kings will be positioned immediately after a seven?

When placing the first king back into the deck, there are 49 possible 'slots', but four of them (the ones immediately following each of the four sevens) are ones I want to avoid, so the probability of placing the first king back in the deck so that it's not positioned immediately after a seven will be $\frac{45}{49}$. Similarly, the probability of placing the second, third and fourth kings back so they don't immediately follow a seven will be $\frac{46}{50},\frac{47}{51}$ and $\frac{48}{52}$ respectively.

Thus the probability that a randomly shuffled deck has no kings immediately following a seven is

$$\frac{45}{49} \times \frac{46}{50} \times \frac{47}{51} \times \frac{48}{52}$$

which means your probability of "success" is

$$1 - \left( \frac{45}{49} \times \frac{46}{50} \times \frac{47}{51} \times \frac{48}{52} \right) \approx 0.281$$

A.J.
  • 3,967
  • +1, nice solution. I added an answer that tries to explain why this looks like choosing $4$ cards out of $52$ that aren't kings. – joriki Feb 08 '23 at 10:05
  • What if some 7's are placed succesively? There are less than 4 slots that immediately follow 7 then. – kludg Feb 08 '23 at 11:28
  • 1
    @kludg No. Even if two 7s are adjacent to start with, there is a slot after each of them - the first slot between the 7s, the second slot after the second 7. There is a slot after every card (7 or not), and one extra slot before the first card. – Jaap Scherphuis Feb 08 '23 at 14:07
  • @JaapScherphuis It is not clear for me then how number of slots is computed, – kludg Feb 08 '23 at 14:29
  • Thank you! This is brilliant. – Greg McAlpin Feb 08 '23 at 14:36
  • 1
    @kludg With a deck of 48 cards there are 49 places where another card could be added. It's that simple. It doesn't matter what the cards are, with a deck of n cards, there are n+1 places where an extra card could be added. During the process of adding the 4 kings one by one, we want to avoid putting a king directly after any of the 4 sevens, because once that happens we can't ever fix it, not even by inserting the next king between them. – Jaap Scherphuis Feb 08 '23 at 14:41
  • @JaapScherphuis Thanks. So I guess one slot is before the first card, one slot after the last, and the rest are between each pair of nearest neighbours. – kludg Feb 08 '23 at 15:11
2

Interestingly, the correct result in @A.J.’s answer can also be obtained with this flawed argument: We can choose $4$ cards to put after the $7$s; all such choices are equally likely, so the probability that there are no kings among the chosen cards is

$$ \frac{\binom{48}4}{\binom{52}4}=\frac{48\cdot47\cdot46\cdot45}{52\cdot51\cdot50\cdot49}\;. $$

There are two errors in this argument, and it’s interesting that they cancel. One is that a $7$ might be at the end of the deck, and then there’s no card after it. The other is that we can’t put a $7$ after itself, but the $7$s were included in the cards picked (and they must be, as we can put another $7$ after a $7$).

That raises the question whether we can formulate a correct version of this argument that derives the result by choosing cards rather than slots (as @A.J.’s answer does).

Add a $53$rd marker card and uniformly randomly arrange the $53$ cards in a circle. In choosing the card that comes (say, clockwise) after the $7$ of hearts, there are now $52$ other cards to choose from, and $48$ of them are non-kings. Then we can choose one of $51$ cards that comes after the $7$ of spades, and $47$ of them are non-kings, and so on. The probability that no king comes after a $7$ is thus

$$ \frac{48\cdot47\cdot46\cdot45}{52\cdot51\cdot50\cdot49}\;. $$

Now open the circle into a linear deck arrangement by removing the added marker card.

So the flawed argument yields the correct result because in each choice we can replace the excess option of placing the $7$ after itself by the missing option of placing the marker card after it.

joriki
  • 242,601
  • 1
    Nice solution, too. My instinct is always to try combinatorial approaches first as well, but I couldn't quite see how to make it work here. Marker card! – A.J. Feb 09 '23 at 03:51
  • Why doesn't this approach give an exact answer if "success" is Kings on either side of a $7 ?$ – true blue anil Feb 14 '23 at 15:58
  • @trueblueanil: I'm not sure in which form you'd expect it to work in that case – could you elaborate? A.J.'s answer also doesn't work in that case because the number of admissible slots for the kings depends on whether any $7$s are consecutive (which it doesn't in the original problem). – joriki Feb 14 '23 at 16:14
  • I guess the problem arises in this case due to two or more adjacent $7's$ – true blue anil Feb 14 '23 at 16:43
1

by P.I.E,

let the cards be $A_1, A_2, A_3, A_4, B^4, C^{44}$ where A denotes the four specific 7's, B stand for kings and C for other cards. let

$N_0= { 4 \choose 0} {52!\over 44!4!} $ decks that contain at least zero AB blocks

$N_1= { 4 \choose 1} {51!\over 44!3!} $ decks that contain at least one AB blocks ( overcounted )

$N_2= { 4 \choose 2} {50!\over 44!2!} $ decks that contain at least two AB blocks ( overcounted )

$N_3= { 4 \choose 3} {49!\over 44!1!} $ decks that contain at least three AB blocks ( overcounted )

$N_4= { 4 \choose 4} {48!\over 44!0!} $ decks that contain at least four AB blocks

After using P.I.E we get

$4,669,920$ decks that contains exactly four AB's $=0.0003 $ %

$896,624,640$ decks that contains exactly three AB's $=0.07 $ %

$31,606,018,560$ decks that contains exactly two AB's $=2.5 $ %

$323,083,745,280$ decks that contains exactly one AB's $=25.55 $ %

$908,673,033,600$ decks that contains no AB's $=71.87 $ %

== COMMENT regarding the two fast solutions above ==

they are essentially the same.

When adding K's,

first K has to be placed in one of $1 + 0 + 4 + 44$ positions

second K has to be placed in one of $1 + 1 + 4 + 44$ positions

third K has to be placed in one of $1 + 2 + 4 + 44$ positions

fourth K has to be placed in one of $1 + 3 + 4 + 44$ positions

When removing 7's

first seven is to be removed from one of $1 + 3 + 4 + 44$ positions

second seven is to be removed from one of $1 + 2 + 4 + 44$ positions

third seven is to be removed from one of $1 + 1 + 4 + 44$ positions

fourth seven is to be removed from one of $1 + 0 + 4 + 44$ positions

for exemple, first $3$ refers to 3 kings other than the last king the second $3$ refers to three 7's other than the first 7.

$1$ refers to an extra slot wherever it is. $4$ denotes bad choices, $44$ counts "any cards" .

Boyku
  • 740