PDA

View Full Version : Proposition bet - 2 cards next to each other in a pack


twistedbeats
02-16-2005, 11:04 AM
i just flat out don't know how to calculate this one. the bet is choose one card rank, 2 through ace. choose another. search through the pack. at least one of card rank a will be touching card rank b. my initial way of calculating was saying that for every card there are 47 cards that don't win the bet before the card and 46 cards after, so the probability is 1 - [(47/51)^8 * (46/51)^8] but that doesn't take into account the the times either card a or card b are on the ends of the deck, plus it just doesn't look right. any help is appreciated.

gaming_mouse
02-16-2005, 01:00 PM
The basic strategy is to find the chance of this not happening, ie, no two cards of rank "a" and "b" are contiguous.

Imagine 52 slots, each slot to contain a card of the deck. Imagine all the slots empty, and we will first distribute the cards of rank "a" randomly into them.

There are different kinds of situations which may arise. For example, all the cards of rank "a" might be next to one another. One of the cards might be at an endpoint, two of the cards could be at opposite endpoints, or none of the four cards could be at an endpoint.

In any case, the key thing to note for each of the possibilities is how many slots become "illegal" for cards of rank "b". For example, if all cards of rank "a" are touching, and one of them is also touching an endpoint, only one slot becomes "illegal". If all the card of "a" are touching but none of them also touches an endpoint, two slots become illegal. It should be clear that the maximum number of illegal slots is 8. Now let E = the event that no cards of rank "a" and "b" are touching, and let I1 = the case of 1 illegal card, I2 = the case of 2 illegal cards, etc. Then:

P(E) = P(E|I1)*P(I1) + P(E|I2)*P(I2) + .... + P(E|I8)*P(I8)

Now the most common situation will be I8. In this case the cards of rank "a" are maximally spread out in such a way that 8 slots become illegal -- the two slots flanking each card of rank "a" -- and no two cards invalidate the same slot. The chance of this situation occuring is:

(50/52)*(48/51)*(46/50)*(44/49)=0.747622126

When this happens the chance of E is:

(40 choose 4)*4!*44!/48!=0.469678281

Thus P(E|I8)*P(I8) = 0.747622126*0.469678281=.35

We have now proved that P(E) is at least 35%.

The remaining terms in the series are more difficult and tedious to calculate, but contibute less and less, with the I7 term contibuting the second most, at approximately:

(1-.74)*.5=.13

Getting an exact answer this way is a chore I don't want to complete, but it could be done fairly easily. I'd estimate that the final answer for P(E) is between 50% and 60%, which means the answer to the origianl question is somewhere between 40% and 50%.

HTH,
gm

MickeyHoldem
02-16-2005, 01:06 PM
Well, ignoring the ends for a moment... the absolute best case would be 8 chances for a touch or...

1 - (44/48 * 43/47 * 42/46 * 41/45 * 40/44 * 39/43 * 38/42 * 37/42)
= 53%

You need to work out what percentage of arrangements offer 8 chances, 7 chances, ...., down to the 1 chance offered when the first or last 4 cards are of rank a.

Looks like alot of work!!

gaming_mouse
02-16-2005, 01:44 PM
I just realized, you could also solve this using inclusion exlusion, solving P(A or B or C or D) where:

A= the chance that rank "a" of hearts is next to a rank "b"
B= "" of clubs ""
...etc

Getting an exact answer would still be a decent of amount work, but doing the first two terms would not be, and that would give you a pretty good approximation. More importantly, it would give you an exact bound on the error of the approx.

gm

Siegmund
02-16-2005, 08:48 PM
Mickey's estimate is very close. The problems with 'wraparound ends' are quite rare. But, the exact calculation is not really that much work:

Consider a deck with 4 cards marked "A", 4 cards marked "B", and 44 blank cards.

First, shuffle the 8 marked cards. They can land in any of 8C4 = 70 orders.

Then, consider every possible way of inserting the 44 blank cards into 9 'bins': on top of the first marked card, between the first and second marked cards, between the second and third marked cards, ... , under the last marked cards.

There is a formula for putting identical objects into bins: (N+R-1)C(R), where R= # bins, N = # objects. SO, here, there are 52C9 ways to insert the blank cards into each deck.

Now.

Suppose we want to make sure that A and B never land beside each other.

What we have to do is insert some of the blank cards non-randomly.

Into "AAAABBBB", we need insert only one blank card between A and B, and then let the other 43 fall randomly. Into "ABABABAB" we need insert seven blanks, and we have only 37 left to fall randomly.

Of the 70 arrangements of the marked cards, 1/35 of them need 1 card inserted, 3/35 need 2, 9/35 need 3, 4, or 5, 3/35 need 6, and 1/35 need 7.

The probability we want is, then:

1/35 * 51C9 / 52C9 +
3/35 * 50C9 / 52C9 +
9/35 * 49C9 / 52C9 +
9/35 * 48C9 / 52C9 +
9/35 * 47C9 / 52C9 +
3/35 * 46C9 / 52C9 +
1/35 * 45C9 / 52C9

= 60,597,828,346 / 128, 767, 639, 000 ~ 47.0598%.

Thus the chance they DO match, is 52.9402%. Sounds like a nice proposition bet to file away in your memory bank. A lot of people will guess it's much worse than even money.