Let be a given positive integer. Find the number of permutations of such that for all we have .
Solution
We shall prove that the answer is . We shall firstly prove the following lemma;
Lemma 1. Let , then for some .
Proof. We shall prove this statement through induction on . Notice that for and for , the number would also be an element of that set. Hence, would be a permutation of
Now, let for all odd such, if then must be a permutation of the same set. Setting and such that and . Since we have already used all the numbers with the odd parts less than we find that and we are done.
We shall now claim that after the determination of all number of the form , the permutation would indeed uniquely be determined. According to the above lemma, it only suffices to restrict ourselves to the set . We draw a directed graph having vertices that are collinear, such that the in- and out- degree of each vertex is 1 and from each vertex the out edge would either go to the next vertex or to one of the vertices before hand. Now, if we determine those vertices with the edge to the next, we can uniquely determine the other edges. For this reason, we shall prove the following lemma;
Lemma 2. *If the -th vertex be the first with zero out-degree, then no edge would go out of the set of vertices . Moreover, there is only one vertex with the zero in-degree.*
Proof. Since any edge that is out from will go some vertex in the set and the has the out-degree to its left (otherwise its out-edge has yet been determined!). The first part of the lemma would be obvious. For the second part, regard that the sum of in-degrees and out-degrees would be equal. This completes our proof.
Thus, at each step that we face the first vertex with zero out-degree, we connect it to the previous vertex with the zero in-degree and continue this procedure. Since for each of we have two choices, the final answer would be , as desired.