Exercise · Volume 1 · 1.2.6-56
Exercise 1.2.6-56
proved in Lean solution written
| Rating | 20 |
|---|---|
| Kind | K3, find a value: compute a number, a set or a closed form from the written solution |
| Section | Section 1.2.6 of Volume 1. Companion chapter: Binomial coefficients |
The task
Write each from to as with .
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
Take the largest with , then handle the remainder in the same way with .
Hint 2
Show that follows from the choice of .
Solution
Show the solution
Greedy method. Choose as the largest number with . Let . Choose as the largest number with , and let .
Why this works and gives : by the choice of , , so , and . Likewise . And the triple is unique, because any triple with has , so fixes , and the same argument fixes and then . For small take , , , so that the value is .
The triples for are
Check
For : . For : . For : . A program check shows that all triples satisfy and give .
Remarks
Every natural number has exactly one such representation with any fixed number of terms. This is the combinatorial number system. It orders the -subsets of the naturals, as with .
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.
- Problem:
TAOCP.S1_2_6.Ex56.statementaxioms: none - Solution:
TAOCP.S1_2_6.Ex56.solvedaxioms: propext
The status is computed from the Lean build. The node of the map.
Something is wrong? Report it.