Exercise · Volume 1 · 1.2.5-3
Exercise 1.2.5-3
proved in Lean solution written
| Rating | 10 |
|---|---|
| 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
Apply the two methods of the section to the permutation and list the five permutations of that each method gives.
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
Method 1 inserts the new largest number in every place. Method 2 adds a new last element and renames.
Hint 2
For Method 2 take in turn. Add to each old entry that is at least , then write at the right end.
Solution
Show the solution
Method 1 inserts the number at the five places of , from the left end to the right end:
Method 2 takes . Entries that are at least go up by , and is appended.
| old entries after the raise | result | |
|---|---|---|
| 1 | ||
| 2 | ||
| 3 | ||
| 4 | ||
| 5 |
Both lists have five permutations of , as the rule requires.
Check
A short program for each method gives the same two lists. Each of the ten rows is a permutation of , and the five rows of one method are different. The last row of both methods is : for Method 1 the number goes to the right end, and for Method 2 the value raises nothing.
Remarks
The two lists share only and . Method 1 gives the permutations that become when is removed. Method 2 gives those whose first four entries are in the same relative order as .
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. Lean states the parts one by one.
- Problem (a):
TAOCP.S1_2_5.Ex3.a.statementaxioms: none - Solution (a):
TAOCP.S1_2_5.Ex3.a.solvedaxioms: none - Problem (b):
TAOCP.S1_2_5.Ex3.b.statementaxioms: none - Solution (b):
TAOCP.S1_2_5.Ex3.b.solvedaxioms: none
The status is computed from the Lean build. The node of the map.
Something is wrong? Report it.