[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference rusure::math

Title:Mathematics at DEC
Moderator:RUSURE::EDP
Created:Mon Feb 03 1986
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2083
Total number of notes:14613

2031.0. "Cards, colour and probability" by AUSSIE::GARSON (achtentachtig kacheltjes) Sat Mar 16 1996 18:20

    From a normal deck of playing cards I choose at random n=4 cards in a
    manner such that I can see the cards and my colleague cannot. On noting
    the number of black cards and the number of red cards amongst those
    that I chose, I quickly compute that if my colleague chooses two cards
    at random from the cards that I chose, the probability that he chooses
    two red cards is exactly 0.5.
    
    I now repeat the procedure with a different value for n and find that
    the probability is again 0.5. What is this value for n?
    
    [dg: This problem comes from breakfast radio where listeners are
     invited to phone in as soon as they have a solution. There are
     obviously some people who are more alive at 7:30am than I am!
    
     P.S. There is a unique solution subject to the physical constraints of
     the scenario.]
T.RTitleUserPersonal
Name
DateLines
2031.1CSC32::D_DERAMODan D'Eramo, Customer Support CenterSun Mar 17 1996 16:525
        Spoiler...
        
	21
        
        Dan
2031.2tough for brekkie timeTPOVC::BUCHANANMon Mar 18 1996 07:078
	SPeller...
    	
    
    
    	And the next one would be 120, requiring three decks of cards,
    contrary to the problem statement.
    
    Andrew
2031.3AUSSIE::GARSONachtentachtig kacheltjesMon Mar 18 1996 16:584
    re .2
    
    Wouldn't that be four packs of cards?
    120 = 35->2 packs + 85->4 packs
2031.4High quality radioCHEFS::STRANGEWAYSAndy Strangeways@REO DTN 830-3216Tue Mar 19 1996 05:347
    So how long was it before the first calls came in? Does this program
    make a habit of throwing non-trivial math questions at breakfasting
    listeners? If so, they're to be highly commended for breaking with the
    "listeners/viewers should be always be treated as morons" code. We
    could do with more of this!
    
    Andy.
2031.5AUSSIE::GARSONachtentachtig kacheltjesTue Mar 19 1996 16:377
    re .4                                                  
    
    With the caveat that I don't normally listen to it and wasn't listening
    all that closely...response time on this problem was not more than 10
    minutes; and I gained the impression that some kind of mind-stretching
    "puzzle" is set each day. If I can catch another one, I'll post it so
    you have more of the flavour. This is on "state" radio.
2031.6AUSS::GARSONachtentachtig kacheltjesWed Apr 03 1996 23:224
    re .4
    
    I caught one the other day...The question was "What is the probability
    of being dealt a royal flush?" [A royal flush is A,K,Q,J,10 of same suit.]
2031.7Never in 5 cards, for meEVMS::HALLYBFish have no concept of fireThu Apr 04 1996 11:036
    Standard 52-card deck, no wild cards? That's easy to calculate.
    But I can tell you from memory: 4 in 2,598,950 or ~0.00000154
    
    If you're playing with a pinochle deck the odds are considerably lower.
    
      John
2031.8misspent youth? (-:AUSS::GARSONachtentachtig kacheltjesSat Apr 06 1996 05:1613
    re .7
    
    Yes, standard deck.
    
    4/C(52,5) is the easy way to see the answer immediately. The caller
    supplied solution was
    
    20   4    3    2    1
    -- * -- * -- * -- * --
    52   51   50   49   48
    
    by looking at the number of cards that can be dealt at each stage that
    will lead to a royal flush and the number of cards remaining.
2031.9AUSS::GARSONachtentachtig kacheltjesMon Apr 08 1996 20:0522
    re .7
    
    So, how about the following...
    
    A standard deck of 52 cards is shuffled and then displayed to you i.e.
    all the cards and their order. Five cards are dealt to you. You then
    get the chance to discard from zero to five cards, replacing them with
    the same number of cards from the top of the deck. What is the probability
    of finishing with a royal flush (assuming 'sensible' decision making)?
    
    What if you get a second opportunity for discard and replace?
    
    [Presumably the probability is going up at each stage.]
    
    This of course corresponds to an ideal situation (of perfect information
    or possibly a bit of cheating). What if you have to specify your discard/
    replace strategy in advance and can't see the cards that you could get as
    replacement? i.e. a more realistic scenario. What is the optimal strategy
    and what would the probability of finishing with a royal flush be?
    
    [Presumably the probability of finishing with a royal flush is between
    the answer in reply .7 and the answer above.]
2031.10HANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Tue Apr 09 1996 16:4114
 
    A standard deck of 52 cards is shuffled and then displayed to you i.e.
    all the cards and their order. Five cards are dealt to you. You then
    get the chance to discard from zero to five cards, replacing them with
    the same number of cards from the top of the deck. What is the probability
    of finishing with a royal flush (assuming 'sensible' decision making)?


The answer is 0 or 1, depending on what the first 5 cards are on the top
of the deck !  This is because you said "and then displayed to you".  Hence
we *know* for sure whether a replacement from zero to five cards will or won't
produce a royal flush.

/Eric
2031.11nitpickingFLOYD::YODERMFYWed Apr 10 1996 18:435
>The answer is 0 or 1, depending on what the first 5 cards are on the
top of the deck !

Presumably you meant 10, not 5; and 15 for the case where you get to
draw twice, etc.
2031.12AUSS::GARSONachtentachtig kacheltjesWed Apr 10 1996 19:4513
    re .10
    
    You have to specify the probability of finishing with a royal flush now
    before we even start the procedure - but perhaps the wording could have
    been better. Looked at another way, yes, each of the 52! shufflings of the
    pack leads to an outcome of 0 or 1 and the probability is the average of
    those outcomes.
    
    re .*
    
    Just in case people didn't notice, it is not the case that you finish with
    a royal flush if the first 10 (or 15) cards contain a royal flush. The order
    is important too.
2031.13how to solve 1-draw caseFLOYD::YODERMFYThu Apr 11 1996 14:2226
You can use the principle of inclusion and exclusion to simplify the problem
when 1 draw is allowed.  The answer is 4p - 6q where p is the probability that
you can get some particular royal flush (say spades), and q is the probability
that you can get either of two particular royal flushes (say spades and hearts).

You can get two iff the top 5 cards are a royal flush, and the next 5 are also. 
This is because the 10th card is obtainable only if 5 cards are discarded,
whence the 6th through 10th cards must be of the same suit.

So q = 2*5!*5!*42!/52! (the factor of 2 is there since either spades or hearts
can come first).

p is the sum over 0 <= i <= 5 that i cards must be drawn to get the 10 through
ace of spades; thus there must be 5-i of the needed cards in the first 5, and
the next i cards must be exactly the remaining needed high spades.

There are C(5,5-i)=C(5,i) ways that the 5-i high spades can appear among the top
5 cards; there are 5! ways to order the 5 high spades in the overall
arrangement, and 47! ways to order the remaining cards, for any such set of
positions, so the overall probability is

[6(sum C(5,i))*5!*47! - 12*5!*5!*42!]/52!

 = (6*32*5!*47! - 12*5!*5!*42!)/52!

since the sum of C(5,i) is 2^5 = 32.
2031.14AUSS::GARSONachtentachtig kacheltjesWed Apr 24 1996 00:0223
re .13
    
>[6(sum C(5,i))*5!*47! - 12*5!*5!*42!]/52!
>
> = (6*32*5!*47! - 12*5!*5!*42!)/52!
    
    It looks to me that both of those occurences of 6 should be a 4.
    
    Assuming that that is the case then this evaluates to
    
           1090801
    --------------------
    13*17*49*23*47*44*43

    which is slightly less than 32 times the probability of being dealt a
    royal flush. [The "32 times" is the "4p" and the "slightly less" is the
    "-6q".] Anyway the probability is about 1 in 20304.
    
    This was on the basis of full information. What happens if we are
    forced to decide how many to discard from the first five before seeing
    the next five? Obviously this means specifying some strategy. It seems
    to me (intuitively) that no strategy can equal the case of full information.
                   
2031.15I stand correctedFLOYD::YODERMFYWed Apr 24 1996 10:234
    "It looks to me that both of those occurrences of 6 should be a 4."
    
    You are right.
    
2031.16strategy - the easy partCSSE::NEILSENWally Neilsen-SteinhardtWed Apr 24 1996 13:2024
Since we don't have to worry about bluffing or going for lower value hands, the
strategy is pretty simple:

	Identify the cards you are holding which require the fewest cards to 
	complete a royal flush.  Discard the rest and draw.

Two nits:

	If you have two equal ways to complete a royal flush (for example, 
	holding Queen of Hearts, Jack of Diamonds and three low cards) then
	pick one way and discard the rest.

	If you have discarded once, remembering the discards might change 
	your strategy, very occasionally.  (For example, you are dealt King 
	and Queen of Hearts, Jack of Diamonds, and two low cards.  You 
	hold the King and Queen, and you draw Ace, Queen and ten of Diamonds.
	In this case you discard the three diamonds and draw three.)

I think this strategy is optimal, but I can't prove it.  And I certainly can't
compute the probability of ending with a royal flush using it.

I agree that this strategy is inferior to perfect information, for some oderings
of the deck.  For example, the five cards to be drawn next may contain a royal
flush.  Empirical proof:  marked decks exist.