Number of p element subsets whose sum is divisible by p

In summary, the conversation discusses finding the number of $p$-element subsets of a set $S$ with $2p$ elements, where $p$ is an odd prime, whose sum is divisible by $p$. The conversation includes a proof using the concept of equivalence classes and a generating function, and also mentions a solution in a book by Ross Honsberger. The conversation ends with a compliment on the elegance of the proof presented.
  • #1
caffeinemachine
Gold Member
MHB
816
15
Let $S=\{ 1, 2, \ldots , 2p\}$, where $p$ is an odd prime. Find the number of $p$-element subsets of $S$ the sum of whose elements is divisible by $p$.Attempt.

Let $\mathcal{K}$ be the set of all the $p$ element subsets of $S$. Let $\sigma(K)$ denote the sum of the elements of a member $K$ of $\mathcal{K}$. Define a relation $R$ on $\mathcal{K}$ as: $ARB$ if $\sigma(A) \equiv \sigma(B) (\mod p)$, for $A,B \in \mathcal{K}$. Its clear that $R$ is an equivalence relation. Choose $K_0,K_1, \ldots , K_{p-1} \in \mathcal{K}$ such that $\sigma(K_i) \equiv i (\mod p)$. Let $[K_i]$ denote the equivalence class of $K_i$ under $R$.

Claim: $|[K_i]|=|[K_j]|$ whenever $2p>i,j>0$
Proof. Let $x \in \{ 1, \ldots , p-1\}$ be such that $ix \equiv j (\mod p)$ (Such an $x$ exists). If $x$ is odd put $y=x$ else put $y=p+x$. So in any case $y$ is odd and $0<y<2p$.
Now let $K_i = \{ a_1, \ldots , a_p \}$. Consider a set $K^{*}=\{ ya_1, \ldots , ya_p\}$, where each element of $K^{*}$ is reduced mod $2p$ if necessary. One can easily show that $ya_i$'s are all distinct, thus $K^{*} \in \mathcal{K}$. Also $\sigma(K^{*}) \equiv iy \equiv ix \equiv j (\mod p))$, thus $K^{*} \in [K_j]$. SO from each element of $[K_i]$ we can produce one element of $[K_j]$. Also, since $gcd(y,2p)=1$, it follows that two distinct elements of $[K_i]$ don't match to a same element of $[K_j]$. The claim follows.
To arrive at the required answer I just need to show that $|[K_0]|=|[K_1]|+2$. But here I am stuck.
 
Physics news on Phys.org
  • #2
Unable to get anywhere with this, I did an internet search and found that this is a problem (an exceptionally difficult one) from the 1995 International Olympiad. There is a solution in a book by Ross Honsberger (Mathematical Chestnuts from Around the World, pp.220-223; if you search for the book, you will find it freely available online in DjVu format). The solution given there consists of a direct proof, using a generating function, that $|[K_0]| = \frac1p\Bigl\{{2p\choose p} + 2(p-1)\Bigr\}.$ It does not make use of your very elegant proof that all the other sets $[K_i]$ have the same size, and it gives no clue as to why $[K_0]$ should contain two extra elements.
 
  • #3
Opalg said:
Unable to get anywhere with this, I did an internet search and found that this is a problem (an exceptionally difficult one) from the 1995 International Olympiad. There is a solution in a book by Ross Honsberger (Mathematical Chestnuts from Around the World, pp.220-223; if you search for the book, you will find it freely available online in DjVu format). The solution given there consists of a direct proof, using a generating function, that $|[K_0]| = \frac1p\Bigl\{{2p\choose p} + 2(p-1)\Bigr\}.$ It does not make use of your very elegant proof that all the other sets $[K_i]$ have the same size, and it gives no clue as to why $[K_0]$ should contain two extra elements.
Thank You Opalg. Although the proof given in Honsberger uses a totally different approach, I myself tried a generating function approach and failed. So I am happy to see a proof using generating functions.

Opalg said:
It does not make use of your very elegant proof that ...
*rubs eyes* Thank you so much for the compliment.
 

1. What is the significance of finding the number of p element subsets whose sum is divisible by p?

The significance of this calculation is that it can be used in various mathematical applications, such as in combinatorics, number theory, and probability. It can also help in solving problems related to finding the number of ways to divide a set of objects into p groups of equal size.

2. How is the number of p element subsets whose sum is divisible by p related to the concept of modular arithmetic?

This calculation is closely related to modular arithmetic because it involves finding the remainder when dividing the sum of the elements in a subset by p. This remainder represents the congruence class of the subset with respect to p, and it determines whether the sum is divisible by p or not.

3. Can the number of p element subsets whose sum is divisible by p be generalized to larger sets and divisors?

Yes, this concept can be generalized to larger sets and divisors. For example, the number of k element subsets whose sum is divisible by p can be calculated by using a similar approach, where k is any positive integer less than or equal to p.

4. How can the number of p element subsets whose sum is divisible by p be calculated efficiently?

One efficient way to calculate this number is by using the concept of generating functions. By representing the elements of the set as coefficients in a polynomial, the problem can be reduced to finding the coefficient of a specific term in the expansion of the polynomial raised to the power of p. This can be done using techniques such as the binomial theorem or dynamic programming.

5. Are there any practical applications of the concept of finding the number of p element subsets whose sum is divisible by p?

Yes, there are several practical applications of this concept. For example, it can be used in cryptography to generate secure keys by ensuring that the sum of the elements in a subset is divisible by a large prime number. It can also be used in coding theory to detect and correct errors in data transmission by dividing the data into subsets and checking if their sums are divisible by a certain prime number.

Similar threads

  • Quantum Physics
Replies
1
Views
588
  • Engineering and Comp Sci Homework Help
Replies
1
Views
964
  • Advanced Physics Homework Help
Replies
0
Views
139
  • Precalculus Mathematics Homework Help
Replies
17
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Precalculus Mathematics Homework Help
Replies
2
Views
931
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Advanced Physics Homework Help
Replies
15
Views
2K
  • Precalculus Mathematics Homework Help
Replies
16
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
2K
Back
Top