Browse · MathNet
PrintChinese Mathematical Olympiad
China number theory
Problem
Fix a prime number , and put . For any , define For a nonempty subset of , define We say that a subset of is good if and for any subset of with , we have . Determine the maximal positive integer , such that there exist pairwise distinct good subsets of such that .
Solution
(1) For an intuitive understanding, place numbers equidistantly in a clockwise direction on the circumference of a circle with a perimeter exactly equal to . Then is precisely the distance from to in a clockwise direction. For an -element subset of (with elements arranged from smallest to largest), we have Here, indices are considered modulo . For , notice that , as the arcs from to , from to , , from to can be recombined to form circles. By the AM-GM inequality, the minimum value of the partial sum is obtained when each or . For all to reach their minimum values, it is equivalent to, for any , That is, the differences between any two numbers in the set are less than 1. (In other words, this requires to be almost equidistantly distributed on the circle.) Since multiplying the numbers in by yields distinct integers, we can set . Thus for , is the only integer among , i.e., . From we know , and from we know . Therefore, each of the aforementioned partial sums reaches its minimum value if and only if the set where . Specifically, at this time takes its minimum value among all -element subsets, meaning these are precisely all the -element good subsets. Since every element of a good subset plus (modulo ) is still a good subset, all -element good subsets are "rotationally equivalent" (they are rotations of ).
(2) For convenience of explanation and understanding, we define a graph with as vertices. If there exists an -element good subset and a -element good subset such that , then we draw a directed edge . Due to the rotational equivalence of good subsets: if some -element good subset contains an -element good subset, then every -element good subset contains some -element good subset, and every -element good subset is also contained in some -element good subset. (Clearly, graph forms a poset, i.e., if then ). Therefore, the problem transforms into considering the chains in graph , (where is the length of the chain).
We prove the following conclusions:
Conclusion 1: The complement of any -element good subset is also a good subset. Proof of Conclusion 1: Observe the following identity: i.e., is a constant value. Therefore, reaching its minimum is equivalent to reaching its minimum. Thus, a good subset is also equivalent to good subset , i.e., in graph there is an edge if and only if there is an edge .
Conclusion 2: When , any -element good subset can be contained within a rotation of its complement , i.e., graph has an edge . Proof of Conclusion 2: Take the -element good subset , then are both -element good subsets, and is a -element good subset. Thus . Alternate proof of Conclusion 2: Since , and do not intersect. Hence . Conclusion 2 holds.
The aforementioned symmetry of graph means that we only need to consider the longest chain from 1 to some number . This is because for a chain , let , , then we can form two new chains At least one of these has length . Therefore, we only need to consider "self-symmetric" chains.
Conclusion 3: When divides , there is an edge , because the good subset From this, we know that when , there is always a chain of length If the length of a chain , by symmetry, we may assume . Next, we consider the necessary conditions for an edge in graph when .
Conclusion 4: When , if an -element good subset is contained in a -element good subset , i.e., , then must be a divisor of . Proof of Conclusion 4: Without loss of generality, assume good subset contains good subset . If are not equally spaced, for example, , then the difference between adjacent elements in is which contradicts the fact that is a good subset. Therefore, must be a divisor of .
Conclusion 5: When , except when with an edge , there is no edge between and . Proof of Conclusion 5: From Conclusion 4, we know at this point , otherwise and is a multiple of , which is impossible. As in the proof of Conclusion 4, assume good subset contains good subset . Let the interval in be . Hence, there exists an interval in , so , i.e., intervals in . Clearly, the sequence is obtained from by replacing each 4 with two consecutive 2s. If the sequence contains at least two 3s, consider the number of 2s between each pair of adjacent 3s. These numbers can differ by at most 1 (otherwise, in there is a segment with consecutive 2s, another with at most 2s between two 3s, with a total difference of at least 2, contradicting being a good subset), and all these numbers are even, so they are all equal. This makes the sequence have a smaller period, contradicting the total sum of being the prime number . Therefore, contains one 3 and 2s, i.e., . The sequence contains one 3 and 4s, i.e., . In this case, take to prove Conclusion 5.
Combining Conclusions 4 and 5, we know that when , for any chain , the sequence before multiplies by several times each step, so there are at most numbers (since ), thus . If , then necessarily , , in which case only (otherwise ), i.e., .
In summary, . Thus, when , , with equality in chain (2). When , , with equality in the following chain:
---
Alternative solution.
The characterization of good subsets is similar to part (1) in Solution 1. The following discussion simplifies the subsequent proof. Notice that And when , takes all values from . Hence, modulo , is equal to . Due to the uniqueness of rotation, any -element good subset multiplied by (in the sense of modulo ) consists of consecutive numbers. Conversely, if an -element subset multiplied by consists of consecutive numbers, it must be an -element good subset. Let be the modular multiplicative inverse of modulo , then . Therefore, any -element set is a good subset if and only if it can be written as .
The following steps are similar to Conclusions 1–5 in Solution 1, but the proofs are relatively simpler.
Conclusion 1: The complement of any -element good subset is a -element good subset. Proof of Conclusion 1: Based on the above characterization, assume the -element good subset is (in the sense of modulo ), then its complement can be written as modulo . Since the modular multiplicative inverse of modulo is modulo , the set is a good subset.
Conclusion 2: If , then any -element good subset is contained in some -element good subset. Proof of Conclusion 2: Without loss of generality, assume the -element good subset is (in the sense of modulo ), then it is contained in the -element good subset .
Conclusion 3: If , then any -element good subset is contained in some -element good subset. Proof of Conclusion 3: Assume the -element good subset is (in the sense of modulo ). Let be the modular multiplicative inverse of modulo , so . Then is contained in the -element good subset .
Conclusion 4: If , then any -element good subset is contained in some -element good subset. Proof of Conclusion 4: Note that the modular multiplicative inverse of modulo is 4, and for modulo it is -2. Suppose the -element good subset is , then it is contained in the -element good subset .
Conclusion 5: If , and some -element good subset is contained in some -element good subset, then , and equality holds if and only if and .
Proof of Conclusion 5: Multiply all numbers by . Then, in the sense of modulo , an -element good subset becomes a sequence of consecutive numbers (since the original common difference was the modular inverse of modulo ), and the -element good subset also becomes an arithmetic sequence , with a common difference congruent to modulo , i.e., not congruent to modulo . Assume the transformed -element good subset is , with the first term of in , and let the common difference be , where . Note that , so every term of must be in , hence . When equality holds, must be true, thus , meaning . As , the only possibility is and .
Now returning to the original problem, for any chain of good subsets , let and . By Conclusion 5, we have Thus, . By Conclusion 1, the chain of complements also forms a chain of good subsets, and similarly, we find . Therefore, .
When , by Conclusions 1, 2, and 3, there exists a chain of good subsets , where , , for .
When , by Conclusions 1, 2, 3, and 4, there exists a chain of good subsets , where , , for , , and .
In summary, the maximum sought is .
(2) For convenience of explanation and understanding, we define a graph with as vertices. If there exists an -element good subset and a -element good subset such that , then we draw a directed edge . Due to the rotational equivalence of good subsets: if some -element good subset contains an -element good subset, then every -element good subset contains some -element good subset, and every -element good subset is also contained in some -element good subset. (Clearly, graph forms a poset, i.e., if then ). Therefore, the problem transforms into considering the chains in graph , (where is the length of the chain).
We prove the following conclusions:
Conclusion 1: The complement of any -element good subset is also a good subset. Proof of Conclusion 1: Observe the following identity: i.e., is a constant value. Therefore, reaching its minimum is equivalent to reaching its minimum. Thus, a good subset is also equivalent to good subset , i.e., in graph there is an edge if and only if there is an edge .
Conclusion 2: When , any -element good subset can be contained within a rotation of its complement , i.e., graph has an edge . Proof of Conclusion 2: Take the -element good subset , then are both -element good subsets, and is a -element good subset. Thus . Alternate proof of Conclusion 2: Since , and do not intersect. Hence . Conclusion 2 holds.
The aforementioned symmetry of graph means that we only need to consider the longest chain from 1 to some number . This is because for a chain , let , , then we can form two new chains At least one of these has length . Therefore, we only need to consider "self-symmetric" chains.
Conclusion 3: When divides , there is an edge , because the good subset From this, we know that when , there is always a chain of length If the length of a chain , by symmetry, we may assume . Next, we consider the necessary conditions for an edge in graph when .
Conclusion 4: When , if an -element good subset is contained in a -element good subset , i.e., , then must be a divisor of . Proof of Conclusion 4: Without loss of generality, assume good subset contains good subset . If are not equally spaced, for example, , then the difference between adjacent elements in is which contradicts the fact that is a good subset. Therefore, must be a divisor of .
Conclusion 5: When , except when with an edge , there is no edge between and . Proof of Conclusion 5: From Conclusion 4, we know at this point , otherwise and is a multiple of , which is impossible. As in the proof of Conclusion 4, assume good subset contains good subset . Let the interval in be . Hence, there exists an interval in , so , i.e., intervals in . Clearly, the sequence is obtained from by replacing each 4 with two consecutive 2s. If the sequence contains at least two 3s, consider the number of 2s between each pair of adjacent 3s. These numbers can differ by at most 1 (otherwise, in there is a segment with consecutive 2s, another with at most 2s between two 3s, with a total difference of at least 2, contradicting being a good subset), and all these numbers are even, so they are all equal. This makes the sequence have a smaller period, contradicting the total sum of being the prime number . Therefore, contains one 3 and 2s, i.e., . The sequence contains one 3 and 4s, i.e., . In this case, take to prove Conclusion 5.
Combining Conclusions 4 and 5, we know that when , for any chain , the sequence before multiplies by several times each step, so there are at most numbers (since ), thus . If , then necessarily , , in which case only (otherwise ), i.e., .
In summary, . Thus, when , , with equality in chain (2). When , , with equality in the following chain:
---
Alternative solution.
The characterization of good subsets is similar to part (1) in Solution 1. The following discussion simplifies the subsequent proof. Notice that And when , takes all values from . Hence, modulo , is equal to . Due to the uniqueness of rotation, any -element good subset multiplied by (in the sense of modulo ) consists of consecutive numbers. Conversely, if an -element subset multiplied by consists of consecutive numbers, it must be an -element good subset. Let be the modular multiplicative inverse of modulo , then . Therefore, any -element set is a good subset if and only if it can be written as .
The following steps are similar to Conclusions 1–5 in Solution 1, but the proofs are relatively simpler.
Conclusion 1: The complement of any -element good subset is a -element good subset. Proof of Conclusion 1: Based on the above characterization, assume the -element good subset is (in the sense of modulo ), then its complement can be written as modulo . Since the modular multiplicative inverse of modulo is modulo , the set is a good subset.
Conclusion 2: If , then any -element good subset is contained in some -element good subset. Proof of Conclusion 2: Without loss of generality, assume the -element good subset is (in the sense of modulo ), then it is contained in the -element good subset .
Conclusion 3: If , then any -element good subset is contained in some -element good subset. Proof of Conclusion 3: Assume the -element good subset is (in the sense of modulo ). Let be the modular multiplicative inverse of modulo , so . Then is contained in the -element good subset .
Conclusion 4: If , then any -element good subset is contained in some -element good subset. Proof of Conclusion 4: Note that the modular multiplicative inverse of modulo is 4, and for modulo it is -2. Suppose the -element good subset is , then it is contained in the -element good subset .
Conclusion 5: If , and some -element good subset is contained in some -element good subset, then , and equality holds if and only if and .
Proof of Conclusion 5: Multiply all numbers by . Then, in the sense of modulo , an -element good subset becomes a sequence of consecutive numbers (since the original common difference was the modular inverse of modulo ), and the -element good subset also becomes an arithmetic sequence , with a common difference congruent to modulo , i.e., not congruent to modulo . Assume the transformed -element good subset is , with the first term of in , and let the common difference be , where . Note that , so every term of must be in , hence . When equality holds, must be true, thus , meaning . As , the only possibility is and .
Now returning to the original problem, for any chain of good subsets , let and . By Conclusion 5, we have Thus, . By Conclusion 1, the chain of complements also forms a chain of good subsets, and similarly, we find . Therefore, .
When , by Conclusions 1, 2, and 3, there exists a chain of good subsets , where , , for .
When , by Conclusions 1, 2, 3, and 4, there exists a chain of good subsets , where , , for , , and .
In summary, the maximum sought is .
Final answer
2 floor(log2(p+1))
Techniques
Inverses mod nFloors and ceilingsQM-AM-GM-HM / Power MeanColoring schemes, extremal arguments