Exercise · Volume 1 · 1.2.5-1
Exercise 1.2.5-1
proved in Lean solution written
| Rating | 00 |
|---|---|
| Kind | K3, find a value: compute a number, a set or a closed form from the written solution |
| Section | Section 1.2.5 of Volume 1. Companion chapter: Permutations and factorials |
The task
Count the orders in which a deck of 52 different cards can lie.
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
Section 1.2.5 counts the orders of distinct objects: see eq. (4) and the choice of the places one by one.
Hint 2
Fill the places from the top. Count the cards that remain for each place.
Solution
Show the solution
The top place takes any of the 52 cards. The second place takes any of the 51 cards that are left. Each further place has one choice less, and the last place has one choice. The number of orders is the product of the choices:
The value is
It has 68 decimal digits and it is about .
Check
For 3 cards the same rule gives orders, the list of eq. 1.2.5(1). Python gives math.factorial(52) as the number above, and len(str(math.factorial(52))) is 68. A second test: , so the number has digits and starts with .
Remarks
A fair shuffle picks one of these orders with probability . The count is so large that a well shuffled deck is, with near certainty, in an order that has never occurred before. The general rule is in Section 1.2.5 of C1.
This solution is checked, 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.
- Problem:
TAOCP.S1_2_5.Ex1.statementaxioms: Classical.choice, Quot.sound, propext - Solution:
TAOCP.S1_2_5.Ex1.solvedaxioms: Classical.choice, Quot.sound, propext
The status is computed from the Lean build. The node of the map.
Something is wrong? Report it.