Browse · MathNet
PrintRomanian Master of Mathematics
Romania counting and probability
Problem
Let be a positive integer. Initially, a bishop is placed in each square of the top row of a chessboard; those bishops are numbered from 1 to , from left to right. A jump is a simultaneous move made by all bishops such that the following conditions are satisfied: each bishop moves diagonally, in a straight line, some number of squares, and at the end of the jump, the bishops all stand in different squares of the same row. Find the total number of permutations of the numbers 1, 2, \ldots, with the following property: There exists a sequence of jumps such that all bishops end up on the bottom row arranged in the order , from left to right.
Solution
First solution. The required number is . On a jump, every bishop moves the same number of rows up or down; call this number of rows the length of the jump.
Step 1. We show that the length of any jump is of the form for some integer . Assign each bishop the number of the column it is situated on before the jump. Let be the length of the jump; then each bishop's column number either increases by , or decreases by in the jump. Thus, bishops 1, 2, \ldots, should move to columns , , \ldots, , as they cannot move leftwards. On the other hand, after the jump columns 1, 2, \ldots, should be filled by the bishops , , \ldots, . So the leftmost bishops still fill the columns 1, 2, \ldots, after the jump.
Repeating the argument shows that the next bishops move rightwards, and the next bishops beyond move leftwards, and so on and so forth. Finally, the bishops all split into contiguous groups of length , and in each group the leftmost bishops move rightwards, whereas the rightmost bishops move leftwards. Hence , so is indeed of the form with .
Step 2. To make a more explicit description of the column change during the jump, assign each column the -digit binary expansion of less 1 its number, augmented with zeroes leftwards if necessary. It is then easily seen that a jump of length just switches the -th digit from the left, 0 to 1 and vice versa. Thus, the resulting permutation also has the following form: For every , the -th digit is either swapped for all bishops, or it is preserved for them all. Moreover, notice that the total length of all jumps is odd, so there will be an odd number of jumps of length 1. Hence the 0-th (the rightmost) digit will be switched anyway. This leaves the room for possible permutations.
Step 3. It remains to show that all permutations are indeed possible. Let us show how to reach any of them. Start by getting to the bottom row by downward jumps of lengths 1, 2, 4, ..., that will switch all digits. Now, if we want to switch the -th digit back, , make two upward jumps of length , followed by a downward jump of length . Combine such modifications for all possible digit combinations to get all desired permutations.
---
Alternative solution.
Second solution. Proceed until the end of Step 1 just like in the first solution. Then extend the board to a vertical strip of width , this will not affect the result, as it will be seen at the end of the proof. We will show that any two jumps commute. Consider two jumps of length and with , and call them the -jump and the -jump. As described in the first step, the bishops will be split in contiguous groups. For the -jump, we look at groups of length , call these -groups; for the -jump, we look at groups of length , call these -groups. Since divides , any -group is fully contained in a single -group, and a -group contains an even number of -groups. First, let's look at the first two -groups, and denote by the -groups contained in the first -group, and the -groups contained in the second -group, where . The -jump will swap with , and same for their counterparts, whereas a -jump will swap with . When putting these together, it follows that applying both jumps in either order gives the same result: is swapped with and is swapped with . Repeat now the same argument for the next two -groups, and so on and so forth, until the entire row will be accounted for. We will now establish a bijection from the odd numbers between 1 and to the desired permutations. Let be an odd number between 1 and , where each is either 0 or 1, in particular . Perform jumps of length in increasing order of , then perform additional jumps of length 1 in order to reach the final row. This will result in a permutation , and set . This provides a well defined function . To prove injective, it suffices to look at bishop numbered 1 and show that it will end up in position . For any of jump of length , this bishop will move rightwards, as its position just before the jump was . Therefore, before the additional jumps of length 1, this bishop will reach position . Any two jumps of same length cancel each other out, and there is an even number of additional jumps of length 1, so the final position will also be . Consequently, is injective. To prove surjective, consider a with the desired property, let be the number of jumps of length , and let be the remainder of modulo 2. Since the total length of all jumps is odd, there has to be an odd number of jumps of length 1, so . Let , and note that this is an odd number between 1 and . From Step 2 in Solution 1, the order of the jumps does not matter. Since two consecutive jumps of same length cancel each other out, performing jumps of length is the same as performing jumps of length . So , as the additional jumps of length 1 at the end also cancel each other out.
---
Alternative solution.
Third solution. Run again Step 1 through in Solution 1. Look at the two halves and and let be the counterpart of in the other half, where the sign is chosen appropriately. A jump of length will swap the halves between themselves, so will be swapped with . From Step 1, it follows that any shorter jump will only perform swaps inside a single half, and will act the same way on the other half; specifically, if a jump swaps with , it will also swap with . Furthermore, applying two jumps of will just cancel each other out, regardless of any other jumps in between, because we swapped with twice, and the inner configuration of each half is changed in the same way. Induct now on . There are possible permutations for the board. Performing jumps of the same length on a board gives the same configuration in each of the two halves. Now we can either apply a jump of length , which will swap the halves, or we can apply two jumps of length , which will cancel each other. This provides a construction for permutations in the board. To show that these are the only ones, consider now a valid permutation for the board which is obtained from some jumps. First, discard the jumps of length , then attempt to apply the rest on the board. If a jump would exit the board, then make the jump of the same length in the opposite direction instead, which will stay on the board because its length is at most . Since the length is the same, the resulting bishop configuration is also the same. Since the total length of the moves executed so far is odd, we can make an even number of moves of length 1 in order to reach the final row of the board, and this will not change the configuration in the end. Therefore, we obtain a corresponding permutation for the case which describes the configuration in each of the halves. From there, the only variations are whether the halves are swapped or not, depending on whether the number of jumps of length was odd or even. So this valid permutation corresponds to one constructed in the earlier paragraph, which completes the induction.
Step 1. We show that the length of any jump is of the form for some integer . Assign each bishop the number of the column it is situated on before the jump. Let be the length of the jump; then each bishop's column number either increases by , or decreases by in the jump. Thus, bishops 1, 2, \ldots, should move to columns , , \ldots, , as they cannot move leftwards. On the other hand, after the jump columns 1, 2, \ldots, should be filled by the bishops , , \ldots, . So the leftmost bishops still fill the columns 1, 2, \ldots, after the jump.
Repeating the argument shows that the next bishops move rightwards, and the next bishops beyond move leftwards, and so on and so forth. Finally, the bishops all split into contiguous groups of length , and in each group the leftmost bishops move rightwards, whereas the rightmost bishops move leftwards. Hence , so is indeed of the form with .
Step 2. To make a more explicit description of the column change during the jump, assign each column the -digit binary expansion of less 1 its number, augmented with zeroes leftwards if necessary. It is then easily seen that a jump of length just switches the -th digit from the left, 0 to 1 and vice versa. Thus, the resulting permutation also has the following form: For every , the -th digit is either swapped for all bishops, or it is preserved for them all. Moreover, notice that the total length of all jumps is odd, so there will be an odd number of jumps of length 1. Hence the 0-th (the rightmost) digit will be switched anyway. This leaves the room for possible permutations.
Step 3. It remains to show that all permutations are indeed possible. Let us show how to reach any of them. Start by getting to the bottom row by downward jumps of lengths 1, 2, 4, ..., that will switch all digits. Now, if we want to switch the -th digit back, , make two upward jumps of length , followed by a downward jump of length . Combine such modifications for all possible digit combinations to get all desired permutations.
---
Alternative solution.
Second solution. Proceed until the end of Step 1 just like in the first solution. Then extend the board to a vertical strip of width , this will not affect the result, as it will be seen at the end of the proof. We will show that any two jumps commute. Consider two jumps of length and with , and call them the -jump and the -jump. As described in the first step, the bishops will be split in contiguous groups. For the -jump, we look at groups of length , call these -groups; for the -jump, we look at groups of length , call these -groups. Since divides , any -group is fully contained in a single -group, and a -group contains an even number of -groups. First, let's look at the first two -groups, and denote by the -groups contained in the first -group, and the -groups contained in the second -group, where . The -jump will swap with , and same for their counterparts, whereas a -jump will swap with . When putting these together, it follows that applying both jumps in either order gives the same result: is swapped with and is swapped with . Repeat now the same argument for the next two -groups, and so on and so forth, until the entire row will be accounted for. We will now establish a bijection from the odd numbers between 1 and to the desired permutations. Let be an odd number between 1 and , where each is either 0 or 1, in particular . Perform jumps of length in increasing order of , then perform additional jumps of length 1 in order to reach the final row. This will result in a permutation , and set . This provides a well defined function . To prove injective, it suffices to look at bishop numbered 1 and show that it will end up in position . For any of jump of length , this bishop will move rightwards, as its position just before the jump was . Therefore, before the additional jumps of length 1, this bishop will reach position . Any two jumps of same length cancel each other out, and there is an even number of additional jumps of length 1, so the final position will also be . Consequently, is injective. To prove surjective, consider a with the desired property, let be the number of jumps of length , and let be the remainder of modulo 2. Since the total length of all jumps is odd, there has to be an odd number of jumps of length 1, so . Let , and note that this is an odd number between 1 and . From Step 2 in Solution 1, the order of the jumps does not matter. Since two consecutive jumps of same length cancel each other out, performing jumps of length is the same as performing jumps of length . So , as the additional jumps of length 1 at the end also cancel each other out.
---
Alternative solution.
Third solution. Run again Step 1 through in Solution 1. Look at the two halves and and let be the counterpart of in the other half, where the sign is chosen appropriately. A jump of length will swap the halves between themselves, so will be swapped with . From Step 1, it follows that any shorter jump will only perform swaps inside a single half, and will act the same way on the other half; specifically, if a jump swaps with , it will also swap with . Furthermore, applying two jumps of will just cancel each other out, regardless of any other jumps in between, because we swapped with twice, and the inner configuration of each half is changed in the same way. Induct now on . There are possible permutations for the board. Performing jumps of the same length on a board gives the same configuration in each of the two halves. Now we can either apply a jump of length , which will swap the halves, or we can apply two jumps of length , which will cancel each other. This provides a construction for permutations in the board. To show that these are the only ones, consider now a valid permutation for the board which is obtained from some jumps. First, discard the jumps of length , then attempt to apply the rest on the board. If a jump would exit the board, then make the jump of the same length in the opposite direction instead, which will stay on the board because its length is at most . Since the length is the same, the resulting bishop configuration is also the same. Since the total length of the moves executed so far is odd, we can make an even number of moves of length 1 in order to reach the final row of the board, and this will not change the configuration in the end. Therefore, we obtain a corresponding permutation for the case which describes the configuration in each of the halves. From there, the only variations are whether the halves are swapped or not, depending on whether the number of jumps of length was odd or even. So this valid permutation corresponds to one constructed in the earlier paragraph, which completes the induction.
Final answer
2^{n-1}
Techniques
Invariants / monovariantsRecursion, bijectionInduction / smoothing