Exercise · Volume 1 · 1.2.10-19
Exercise 1.2.10-19
not stated yet in Lean solution written
| Rating | M21 |
|---|---|
| Markers | M (mathematical) |
| Kind | K1, prove: show that a stated fact is true from the written solution |
| Section | Section 1.2.10 of Volume 1. Companion chapter: Analysis of an algorithm |
The task
Show that is a left-to-right maximum of a permutation exactly when is a right-to-left minimum of the inverse permutation.
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
Write the condition for with , and rewrite it with the inverse in place of .
Solution
Show the solution
Let , so . All values are distinct. The element is a left-to-right maximum when for all . We rewrite this condition step by step.
- Every has if and only if every with has (the value cannot sit at , and since ).
- Put . The values are exactly the values with , and . So the condition says: every has .
- Since , this says that for all , which means that is smaller than all the entries to its right. That is, is a right-to-left minimum of .
Each step is an equivalence, so the two conditions agree.
Check
Take . The left-to-right maxima are at the positions and (the values and ). The inverse is . Its right-to-left minima are the entries (at place ) and (at place ), so the set of values is the set of positions found for .
Remarks
A left-to-right maximum of is a record, and the number of records is the quantity in the text. The bijection shows that the records of and of (as minima) have the same count.
This solution is drafted, and a person has not reviewed it yet. The source.
In Lean
not stated yet The exercise is not stated in Lean yet.
The status is computed from the Lean build. The node of the map.
Something is wrong? Report it.