taocp

This site has no text of the book. Keep your own copy of TAOCP next to it. See what is checked.

Exercise · Volume 1 · 1.2.6-3

Exercise 1.2.6-3

proved in Lean solution written

Rating00
KindK3, find a value: compute a number, a set or a closed form from the written solution
SectionSection 1.2.6 of Volume 1. Companion chapter: Binomial coefficients

The task

Count the hands of 1313 cards from a deck of 5252 cards, where the order of the cards in the hand does not count.

The exact wording is in your copy of the book.

Hints

Open one hint at a time. Try the exercise again after each.

Hint 1

A hand is a 1313-combination of 5252 objects. Use eq. 1.2.6(2).

Solution

Show the solution

The number of hands is (5213)=52⋅51⋯4013⋅12⋯1.\binom{52}{13} = \frac{52 \cdot 51 \cdots 40}{13 \cdot 12 \cdots 1}. To avoid large numbers, build the value one factor at a time with (52k)=(52k−1)⋅53−kk\binom{52}{k} = \binom{52}{k-1} \cdot \frac{53-k}{k}. Each step gives an integer.

kk (52k)\binom{52}{k}
1 52
2 1326
3 22100
4 270725
5 2598960
6 20358520
7 133784560
8 752538150
9 3679075400
10 15820024220
11 60403728840
12 206379406870
13 635013559600

For example, the step from k=4k = 4 to k=5k = 5 is 270725⋅48/5=2598960270725 \cdot 48 / 5 = 2598960. So there are 635013559600635013559600 hands.

Check

The entry for k=5k = 5 is 25989602598960, the known number of poker hands. Also eq. 1.2.6(7) gives 13(5213)=52(5112)13\binom{52}{13} = 52\binom{51}{12}, so (5213)=4(5112)\binom{52}{13} = 4\binom{51}{12}, and 635013559600/4=158753389900=(5112)635013559600 / 4 = 158753389900 = \binom{51}{12}.

Remarks

Exercise 1.2.6-4 factors this number into primes. The table also shows how fast the row 5252 of Pascal's triangle grows.

This solution is drafted, and a person has not reviewed it yet. The source.

In Lean

proved The statement and its proof are in Lean. The kernel accepts the proof, and it uses the standard axioms only.

The status is computed from the Lean build. The node of the map.

Something is wrong? Report it.