Mathematics for Computer Science

(Frankie) #1

15.13. A Magic Trick 495


Problem 15.14.
In a standard 52-card deck, each card has one of thirteenranks in the set,R, and
one of foursuits in the set,S, where


RWWDfA;2;:::;10;J;Q;Kg;
SWWDf|;};~;g:

A 5-cardhandis a set of five distinct cards from the deck.
For each part describe a bijection between a set that can easily be counted using
the Product and Sum Rules of Ch. 15.1, and the set of hands matching the specifi-
cation.Give bijections, not numerical answers.
For instance, consider the set of 5-card hands containing all 4 suits. Each such
hand must have 2 cards of one suit. We can describe a bijection between such hands
and the setSR 2 R^3 whereR 2 is the set of two-element subsets ofR. Namely,
an element
.s;fr 1 ;r 2 g;.r 3 ;r 4 ;r 5 // 2 SR 2 R^3


indicates



  1. the repeated suit,s 2 S,

  2. the set,fr 1 ;r 2 g2R 2 , of ranks of the cards of suit,s, and

  3. the ranks.r 3 ;r 4 ;r 5 /of remaining three cards, listed in increasing suit order
    where|}~.


For example,


.|;f10;Ag;.J;J;2//! fA|;10|;J};J~;2g:

(a)A single pair of the same rank (no 3-of-a-kind, 4-of-a-kind, or second pair).

(b)Three or more aces.

Problem 15.15.
Suppose you have seven dice — each a different color of the rainbow; otherwise
the dice are standard, with faces numbered 1 to 6. Arollis a sequence specify-
ing a value for each die in rainbow (ROYGBIV) order. For example, one roll is
.3;1;6;1;4;5;2/indicating that the red die showed a 3, the orange die showed 1,
the yellow 6,....
For the problems below, describe a bijection between the specified set of rolls
and another set that is easily counted using the Product, Generalized Product, and

Free download pdf