Browse · MathNet
PrintMacedonian Mathematical Olympiad
North Macedonia counting and probability
Problem
Let be a positive integer and be nonnegative real number. Find the number of the sequences of real numbers , such that the absolute value of the difference of every two consecutive terms is equal to .
Solution
Let us suppose that the sequence satisfy the condition of the problem. Then Also where the number of pairs of brackets of the right-hand side is . We consider two cases: is odd and is even number.
Case 1. is odd, i.e. is even number. Then the equality (2) get the form , where , . The choice of , determine a sequence , satisfying the sequence (1). Let we
note that the sum of the right-hand side of the equality (for one choice of ) is even number of times , and the left-hand side is , i.e. odd number times . Therefore, the right-hand side is equal to , for some , and the left-hand side is equal to . The last is possible only if and then we obtain the sequence , i.e. there exists only one sequence with the desired property.
Case 2. is even, i.e. is odd number. If , then . Let . Then again from the equality (2) we obtain Hence, the problem can be transformed to find the number of choices of such that . If on the left-hand side of the equality we have , then it must, on the right-hand side of the equality, the difference between the number of the positive and the number of the negative constants to be exactly 1, i.e. must appear times, and appears exactly ways. Such type of choices can be made on ways (for a sequence with length we choose positions where we will put , and on the rest we will put ). On the exact same number of ways can be written the sum of the right-hand side is the sum of the left-hand side is . So, the total number of such representations is . Finally, if with we denote the number of the sequences satisfying the condition of the problem, then
Case 1. is odd, i.e. is even number. Then the equality (2) get the form , where , . The choice of , determine a sequence , satisfying the sequence (1). Let we
note that the sum of the right-hand side of the equality (for one choice of ) is even number of times , and the left-hand side is , i.e. odd number times . Therefore, the right-hand side is equal to , for some , and the left-hand side is equal to . The last is possible only if and then we obtain the sequence , i.e. there exists only one sequence with the desired property.
Case 2. is even, i.e. is odd number. If , then . Let . Then again from the equality (2) we obtain Hence, the problem can be transformed to find the number of choices of such that . If on the left-hand side of the equality we have , then it must, on the right-hand side of the equality, the difference between the number of the positive and the number of the negative constants to be exactly 1, i.e. must appear times, and appears exactly ways. Such type of choices can be made on ways (for a sequence with length we choose positions where we will put , and on the rest we will put ). On the exact same number of ways can be written the sum of the right-hand side is the sum of the left-hand side is . So, the total number of such representations is . Finally, if with we denote the number of the sequences satisfying the condition of the problem, then
Final answer
r(n, C) = 1 if C = 0; r(n, C) = 0 if n is odd and C > 0; r(n, C) = 2 * binomial(n - 1, n/2) if n is even and C > 0.
Techniques
Counting two waysRecursion, bijection