Exercise · Volume 1 · 2.2.1-9
Exercise 2.2.1-9
not stated yet in Lean solution written
| Rating | M20 |
|---|---|
| Markers | M (mathematical) |
| Kind | K1, prove: show that a stated fact is true from the written solution |
| Section | Section 2.2.1 of Volume 1 |
The task
Let be the number of permutations of elements that an input-restricted deque gives. Show that is also the number that an output-restricted deque 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
Run a sequence of moves backwards in time. Which end of the deque is then the input end?
Hint 2
Write down the permutation that the reversed run gives, after you rename the cars so that the input is again.
Solution
Show the solution
Plan. Reverse time. A run of one machine becomes a run of the other. The change of names is a bijection of the set of permutations.
Take a run of an input-restricted deque that turns into . Cars enter at the left end only. They leave at either end. Play this run backwards. Now the cars enter at the old output ends, so at either end. They leave at the old input end, so at one end only. The cars enter in the order and leave in the order . This is a run of an output-restricted deque.
Rename the cars so that the input is . The car is the -th to enter, so it gets the name . The car with value has the name , where is the inverse permutation. The -th car to leave is the one with value . So the output of the renamed run is the permutation with
The map is its own inverse. To see this, note that gives , so , and hence . Then . So is a bijection of the set of all permutations.
The argument shows that maps every permutation of the input-restricted deque to a permutation of the output-restricted deque. The same argument, with the two machines exchanged, shows that maps every permutation of the output-restricted deque to a permutation of the input-restricted deque. Since is its own inverse, it maps the first set onto the second. So the two sets have the same size.
Check
For I computed both sets by search. Both have elements. The map sent each set onto the other.
Remarks
For the map sends the permutation of the input-restricted deque to , the permutation of the output-restricted deque in Exercise 2.2.1-7.
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.