Let p be an odd prime. Find the number p-element subsets A of {1,2,3,......,2p} such that the sum of all elements of A is divisible by p.
Give numerical answer for special case of p = 13
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
I did a proof using generating functions, and I was wondering if the extra results that fell out of my approach (see the last line) are obvious using yours. I'm guessing the answer is yes?
Edited to add: I see you have already pointed out a different generalization in the comments to Ivo's solution.
I like Mark's solution and I think it's probably the right one, but here's a maybe slightly more down-to-earth solution using generating functions.
Consider the function F ( x , y ) = k = 1 ∏ 2 p ( 1 + x k y ) . Then the coefficient of y p is d = 1 ∑ ∞ a d x d where a d is the number of p -element subsets of { 1 , 2 , … , 2 p } summing to d . So we want the sum of the coefficients of x p m y p in F ( x , y ) , as m runs over all positive integers. That is, if F ( x , y ) = ∑ b , c a b , c x b y c , we want a p , p + a 2 p , p + a 3 p , p + ⋯ .
There is a trick for this: let ω be a primitive 1 3 th root of unity, and look at G ( y ) = p 1 d = 0 ∑ p − 1 F ( ω d , y ) . Then G ( y ) = p 1 d = 0 ∑ p − 1 b , c ∑ a b , c ω d b y c = b , c ∑ a b , c y c ( p 1 d = 0 ∑ p − 1 ( ω b ) d ) = b , c ∑ a b , c y c ( { 0 1 if p ∤ b if p ∣ b ) = c ∑ ( a p , c + a 2 p , c + ⋯ ) y c , so the coefficient of y p in G ( y ) is exactly the number we want.
Now G ( y ) = p 1 d = 0 ∑ p − 1 F ( ω d , y ) = p 1 d = 0 ∑ p − 1 k = 1 ∏ 2 p ( 1 + ω d k y ) = p 1 d = 0 ∑ p − 1 k = 1 ∏ 2 p ( y + ω − d k ) (to go from the second to the third line, note that we are multiplying each product by ∏ k = 1 2 p ω − d k = ω − d p ( 2 p + 1 ) = 1 ), and note now that − ω − d k runs--twice--over the roots of y p + 1 if 1 ≤ d ≤ p − 1 , and otherwise ∏ k = 1 2 p ( 1 + ω d k y ) = ( 1 + y ) 2 p if d = 0 .
Putting it all together, we get G ( y ) = p 1 ( ( 1 + y ) 2 p + ( p − 1 ) ( y p + 1 ) 2 ) , so the coefficient of y p is just p 1 ( ( p 2 p ) + 2 ( p − 1 ) ) . When p = 1 3 this is 8 0 0 0 4 8 .
Unless I'm mistaken, it seems like looking at the coefficients of other powers of y gives an easy way to compute the number of c -element subsets of { 1 , … , 2 p } whose sum is a multiple of p , for any c , namely: p 1 ( c 2 p ) unless c = 0 , p , 2 p ; the above formula if c = p ; and of course 1 if c = 0 , 2 p .
If we are interested in c -subsets of { 0 , 1 , . . . , 2 p − 1 } that are divisible by p , where c and p are coprime, I would adjust my group action slightly. For a ∈ Z p , and 0 ≤ x ≤ p − 1 , define 0 ≤ a ⋆ x ≤ p − 1 so that a ⋆ x ≡ a + x ( m o d p ) , and define a ⋆ ( p + x ) = p + ( a ⋆ x ) . Thus Z p acts on {0,1,...,p-1) in the usual way, and on { p , p + 1 , . . . , 2 p − 1 } in the usual way, with p added. Then we define a ⋆ X = { a ⋆ x ∣ x ∈ X } , obtaining an action of Z p on the c -subsets of { 0 , 1 , 2 , . . . , 2 p − 1 } . This action has the property that T ( a ⋆ X ) ≡ a c + T ( X ) ( m o d p ) for all a and for all c -subsets X . This means that all the orbits of this action have p elements, and that one element of each orbit has T ( X ) ≡ 0 ( m o d p ) . Thus there are p − 1 ( c 2 p ) orbits, and so p − 1 ( c 2 p ) c -subsets with total divisible by p .
Not a complete solution.
There's ( 1 3 2 6 ) total subsets. It makes some sense that about 1 3 1 of them would give a remainder of 0 ( m o d 1 3 ) , so a reasonable guess at the answer would be 1 3 1 ( 1 3 2 6 ) = 8 0 0 0 4 6 . ( 1 5 3 8 4 6 ) , which is already really close. As it turns out, all remainders other than 0 have 8 0 0 0 4 6 subsets corresponding to them, and 0 has 8 0 0 0 4 8 . It's therefore probably possible to find a one-to-one correspondence between the subsets for each nonzero remainder, although I wasn't able to find one. Help here would be appreciated.
Anyway, here's a cheating solution utilizing a python program to find the answer: a ( x , y , z , n ) is the number of subsets of cardinality y of the first x integers giving a sum of z ( m o d n ) :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
Try my solution to see why there are 8 0 0 0 4 8 sets with remainder 0 , and 8 0 0 0 4 6 sets with each of the other remainders. The orbits { A } and { B } give the extra two sets.
Log in to reply
Really instructive approach! I enjoyed reading your formalization of the one-to-one correspondence you found, thanks for sharing. Also, one could use this argument to prove that ( p 2 p ) = 2 ( m o d p ) , since the answer must be a whole number.
Log in to reply
Note that ( p 2 p ) = p 2 × ( ( p − 1 ) ! ) 2 2 p 2 × ( p − 1 ) ! × ( p + 1 ) ( p + 2 ) ⋯ ( 2 p − 1 ) = ( p − 1 ) ! 2 ( p + 1 ) ( p + 2 ) ⋯ ( 2 p − 1 ) and ( p − 1 ) ! ≡ − 1 ( m o d p ) , so that ( p 2 p ) ≡ − 2 ( p + 1 ) ( p + 2 ) ⋯ ( 2 p − 1 ) ≡ − 2 × 1 × 2 × ⋯ ( p − 1 ) ≡ − 2 ( p − 1 ) ! ≡ 2 ( m o d p )
Log in to reply
@Mark Hennings – I realized you could use Lucas’ theorem, but thanks anyways.
I noticed this as well as I was writing up my solution. Very pretty.
Problem Loading...
Note Loading...
Set Loading...
Change the problem slightly, to consider the p element subsets of { 0 , 1 , 2 , . . . , 2 p − 1 } that have sum divisible by p (in other words, replace 2 p by 0 ). This makes some of the later mathematics simpler.
Define the sets A = { 0 , 1 , 2 , . . . , p − 1 } and B = { p , p + 1 , p + 2 , . . . , 2 p − 1 } . Note that A is an abelian group with respect to addition modulo p . Let S be the set of all subsets of { 0 , 1 , 2 , . . . , 2 p − 1 } with p elements, noting that ∣ S ∣ = ( p 2 p ) . Let T ( X ) be the sum (modulo p ) of the elements of X ∈ S .
We can define a group action of A on S by setting a ⋆ X = { a + x ∣ ∣ x ∈ X ∩ A } ∪ ( X ∩ B ) a ∈ A , X ∈ S so the group action is for a to be added (modulo p ) to the elements of X that are less than p , with all other elements being left alone. Note that A , B ∈ S are such that a ⋆ A = A and a ⋆ B = B for all a ∈ A . If X ∈ S and X = A , B , then ∣ X ∩ A ∣ = n for some 1 ≤ n ≤ p − 1 It is then clear that T ( a ⋆ X ) ≡ a n + T ( X ) ( m o d p ) . Thus T ( a ⋆ X ) ≡ T ( b ⋆ X ) ( m o d p ) if a , b ∈ A with a = b . Thus the orbit Ω ( X ) = { a ⋆ X ∣ a ∈ A } of X will have p elements in it, and exactly one element Y out of that orbit with have total T ( Y ) ≡ 0 ( m o d p ) .
By the standard theory of group actions, it is possible to write S as a disjoint union of orbits. Two orbits are { A } and { B } , and all other orbits have p elements in them. Since p is odd we see that T ( A ) ≡ 2 1 p ( p − 1 ) ≡ 0 ( m o d p ) and also T ( B ) ≡ T ( A ) + p 2 ≡ 0 ( m o d p ) Thus we see that each orbit of S contains exactly one set Y ∈ S such that T ( Y ) ≡ 0 ( m o d p ) .
Thus there are exactly as many subsets of { 0 , 1 , 2 , . . . , 2 p − 1 } with p elements whose elements add to a multiple of p as there are orbits in S , namely p 1 [ ( p 2 p ) − 2 ] + 2 In the case p = 1 3 , we obtain the answer 8 0 0 0 4 8 .