Skip to main content
OlympiadHQ

Browse · MathNet

Print

Preselection tests for the full-time training

Saudi Arabia counting and probability

Problem

How many permutations of are there satisfying the condition for all when and when ?
Solution
Let be the number of permutations satisfying these conditions.

For , the conditions are and . Among the permutations of , half of them satisfy the condition . Among these permutations, half of them satisfy also the condition . Therefore, there are permutations satisfying both conditions and .

To compute , it is easier to subtract from the number of permutations which do not satisfy the condition . These permutations satisfy the condition with no condition on . Since there are possibilities for , there are such permutations and For . There are more conditions and the method used for becomes complicated. That is why, we will use a different method based on an inductive relation for .

For there are no conditions on the permutations. So For , there is only one condition: . This gives, For , we have the conditions . This means that at most there are only at most which can be greater than . Therefore .

(a) When , there are as many permutations as for , that is .

(b) When , because of the conditions , we have . - If , there are as many permutations as for , that is . - If , because of the conditions we have . i. If , there are as many permutations as for , that is . ii. If then and there are as many permutations as for , that is .

(c) When , because of the conditions , we have either or . In each case there are as many permutations as for , that is .

Hence, we obtain the inductive relation Therefore
Final answer
25 for n=5, 124 for n=7

Techniques

Recursion, bijectionEnumeration with symmetry