SlideShare a Scribd company logo
1 of 3
Download to read offline
Solution
Week 80 (3/22/04)
Nine divisible by 9
First, consider the following simpler problem:
Problem: Given any five integers, show that there is at least one subset of three
integers whose sum is divisible by 3.
Solution: Let us try to find a set of five integers that contains no subset of three
integers whose sum is divisible by 3, a task that we will show is impossible. Each of
the five integers is, for our purposes, equal to 0, 1, or 2, because we are concerned
only with divisions by 3. We cannot have one of each of these, because 0 + 1 + 2 is
divisible by 3. We must therefore have at most two of the types. But the pigeonhole
principle then implies that we have at least three of one of the types. The sum of
these three integers is divisible by 3.
Returning to the original problem, pick five integers to obtain a triplet whose sum
is divisible by 3. Then pick another five integers to obtain another such triplet. We
can continue to do this for a total of five times, given the seventeen integers.
We now have five triplets, each of whose sum is divisible by 3. As far as divisions
by 9 are concerned, these sums are equal to 0, 3, or 6. We can now use the same
reasoning as in our auxiliary problem above (but with everything scaled up by a
factor of 3) to show that we can find a set of three triplets that has a sum divisible
by 9. In other words, we have found a set of nine integers whose sum is divisible by
9.
This result is a special case of the following theorem.
Theorem: Given any 2n − 1 integers, there is at least one subset of n integers
whose sum is divisible by n.
We will prove this theorem by demonstrating two lemmas.
Lemma 1: If the theorem is true for integers n1 and n2, then it is also true for
the product n1n2.
Proof: Consider a set of 2n1n2−1 integers. Under the assumption that the theorem
is true for n1, we can certainly pick a subset of n1 integers whose sum is divisible by
n1. From the remaining 2n1n2 − 1 − n1 integers we can pick another such subset of
n1 integers, and so on. We can continue to do this until we have obtained 2n2 − 1
such subsets. This is true because after forming 2n2 − 2 such subsets, there are
[2n1n2 − 1] − [(2n2 − 2)n1] = 2n1 − 1 integers left over, from which we can pick one
last such subset of n1 integers.
Now consider these 2n2 − 1 sums divided by n1. Assuming that the theorem
holds for n2, we can find n2 of these sums (divided by n1) that have a sum divisible
by n2. Bringing back in the factor of n1, we see that we have found a set of n1n2
integers whose sum is divisible by n1n2.
1
In proving the general theorem, this first lemma shows that it is sufficient to prove
the theorem for primes, p:
Lemma 2: If p is prime, then given 2p − 1 integers, there is at least one subset of
p integers whose sum is divisible by p.
Proof: Consider all the possible N ≡ 2p−1
p subsets of p integers. Label the sums
of these subsets as Sj, where 1 ≤ j ≤ N (these may be indexed in an arbitrary
manner), and consider the sum
S =
N
j=1
S
(p−1)
j . (1)
Remark: The following proof isn’t mine (I’m not sure where it came from originally). At
first glance, it might seem that adding up these (p − 1)st powers is a little out of the blue,
but it’s actually a fairly reasonable thing to do. There are two types of sums: “good” ones
that are divisible by p, and “bad” ones that aren’t. It would be nice to label them all in a
sort of binary way, say, with a “0” for good, and a “1” for bad. Fermat’s Little Theorem
(which states that if a ≡ 0 (mod p) then ap−1
≡ 1 (mod p)) provides the perfect way for
doing this.
We will prove this second lemma by demonstrating two claims:
Claim 1: S is be divisible by p.
Proof: Let the 2p − 1 integers be ai, where 1 ≤ i ≤ 2p − 1. Expand all of the
S
(p−1)
j powers and collect all the like terms in S. The terms will have the form of
some coefficient times ab1
i1
ab2
i2
· · · abk
ik
. The number, k, of different ai’s involved may
be any number from 1 to p − 1, and the bj’s must of course add up to (p − 1).
We will now show that the coefficient of an arbitrary ab1
i1
ab2
i2
· · · abk
ik
term is di-
visible by p. The coefficient will depend on the bi, but it will happen to always be
divisible by p. The coefficient may be viewed as the product of two factors.
• Firstly, there is a multinomial coefficient from each S
(p−1)
j in which the given
ab1
i1
ab2
i2
· · · abk
ik
occurs. This multinomial coefficient is p−1
b1,b2,...,bk
, but it will turn
out not to be important.
• Secondly, we must count the number of different S
(p−1)
j in which the given
ab1
i1
ab2
i2
· · · abk
ik
occurs. This number may be found as follows. We know that k
of the p integers in Sj must be a1, a2, . . . , ak. The remaining p − k integers
can be any subset of the other 2p − 1 − k integers. There are 2p−1−k
p−k such
subsets.
The coefficient of the ab1
i1
ab2
i2
· · · abk
ik
term in S is therefore p−1
b1,b2,...,bk
2p−1−k
p−k . Writing
the second factor in this as
2p − 1 − k
p − k
=
(2p − 1 − k)(2p − 2 − k) · · · p
(p − k)!
(2)
demonstrates that every coefficient is divisible by p, independent of the values of
the bi. Therefore, S is divisible by p. Q.E.D.
2
Claim 2: If none of the Sj are divisible by p, then S is not divisible by p.
Proof: Assume that none of the Sj are divisible by p. Then by Fermat’s Little
Theorem (which states that if a ≡ 0 (mod p) then ap−1 ≡ 1 (mod p)), we have
S ≡
N
i=1
1 (mod p) ≡ N (mod p). (3)
We now note that
N ≡
2p − 1
p
=
(2p − 1)(2p − 2) · · · (p + 1)
(p − 1)!
, (4)
which is not divisible by p. Therefore, S is not divisible by p. Q.E.D.
These two claims show that at least one of the Sj must be divisible by p.
Remark: For the case where n is a prime number, p, it is possible to say a bit more about
exactly how many of the Sj are divisible by p. We claim that either 1, p + 1, 2p + 1, . . ., of
the Sj are divisible by p. The reasoning is as follows.
Fermat’s Little Theorem implies that each Sj that is not divisible by p contributes 1 to
S, while each Sj that is divisible by p contributes 0 to S. Under the (incorrect) assumption
that none of the Sj are divisible by p, eq. (3) states that S ≡ N (mod p). Using eq. (4),
and noting that
(2p − 1)(2p − 2) · · · (p + 1) ≡ (p − 1)! (mod p), (5)
we see that this assumption leads to the incorrect conclusion that S ≡ 1 (mod p). But since
we know from eq. (2) that S must actually be divisible by p, then either 1, p + 1, 2p + 1,
. . ., of the Sj must be divisible by p, because each Sj that is divisible by p will contribute 0,
instead of 1, to S. Thus, for example, given five integers, there are either one, four, seven,
or ten subsets of three integers whose sum is divisible by 3.
It is easy to construct a case where only one of the Sj is divisible by p. We may pick p−1
of the 2p − 1 integers to be congruent to each other modulo p, and then pick the remaining
p integers to also be congruent to each other (but not to the other p − 1 integers) modulo p.
Then the subset consisting of these latter p integers is the only subset of p integers whose
sum is divisible by p.
3

More Related Content

What's hot

Mcs lecture19.methods ofproof(1)
Mcs lecture19.methods ofproof(1)Mcs lecture19.methods ofproof(1)
Mcs lecture19.methods ofproof(1)
kevinwu1994
 
Mathematical Induction
Mathematical InductionMathematical Induction
Mathematical Induction
Edelyn Cagas
 
11X1 T14 09 mathematical induction 2 (2010)
11X1 T14 09 mathematical induction 2 (2010)11X1 T14 09 mathematical induction 2 (2010)
11X1 T14 09 mathematical induction 2 (2010)
Nigel Simmons
 
Mathematical induction
Mathematical inductionMathematical induction
Mathematical induction
Sman Abbasi
 
5.4 mathematical induction
5.4 mathematical induction5.4 mathematical induction
5.4 mathematical induction
math260
 
Math induction principle (slides)
Math induction principle (slides)Math induction principle (slides)
Math induction principle (slides)
IIUM
 

What's hot (18)

Discrete Math Lecture 03: Methods of Proof
Discrete Math Lecture 03: Methods of ProofDiscrete Math Lecture 03: Methods of Proof
Discrete Math Lecture 03: Methods of Proof
 
The 2 Goldbach's Conjectures with Proof
The 2 Goldbach's Conjectures with Proof The 2 Goldbach's Conjectures with Proof
The 2 Goldbach's Conjectures with Proof
 
Mathematical induction and divisibility rules
Mathematical induction and divisibility rulesMathematical induction and divisibility rules
Mathematical induction and divisibility rules
 
Mcs lecture19.methods ofproof(1)
Mcs lecture19.methods ofproof(1)Mcs lecture19.methods ofproof(1)
Mcs lecture19.methods ofproof(1)
 
Mathematical Induction
Mathematical InductionMathematical Induction
Mathematical Induction
 
Proof By Contradictions
Proof By ContradictionsProof By Contradictions
Proof By Contradictions
 
Fskik 1 nota
Fskik 1   notaFskik 1   nota
Fskik 1 nota
 
5.1 Induction
5.1 Induction5.1 Induction
5.1 Induction
 
Per4 induction
Per4 inductionPer4 induction
Per4 induction
 
Recurrence Relation
Recurrence RelationRecurrence Relation
Recurrence Relation
 
11X1 T14 09 mathematical induction 2 (2010)
11X1 T14 09 mathematical induction 2 (2010)11X1 T14 09 mathematical induction 2 (2010)
11X1 T14 09 mathematical induction 2 (2010)
 
Principle of mathematical induction
Principle of mathematical inductionPrinciple of mathematical induction
Principle of mathematical induction
 
Mathematical induction
Mathematical inductionMathematical induction
Mathematical induction
 
Rules of Exponents
Rules of ExponentsRules of Exponents
Rules of Exponents
 
5.4 mathematical induction
5.4 mathematical induction5.4 mathematical induction
5.4 mathematical induction
 
Mathematical induction
Mathematical inductionMathematical induction
Mathematical induction
 
Math induction principle (slides)
Math induction principle (slides)Math induction principle (slides)
Math induction principle (slides)
 
recurrence relations
 recurrence relations recurrence relations
recurrence relations
 

Viewers also liked

Analisis butir solal pd fisika xii ipa2 a
Analisis butir solal pd fisika xii ipa2 aAnalisis butir solal pd fisika xii ipa2 a
Analisis butir solal pd fisika xii ipa2 a
eli priyatna laidan
 
[Materi umum] permen nomor 24 sk pelaksanaan si skl
[Materi umum] permen nomor 24 sk pelaksanaan si skl[Materi umum] permen nomor 24 sk pelaksanaan si skl
[Materi umum] permen nomor 24 sk pelaksanaan si skl
eli priyatna laidan
 
Pertemuan 6 media transmisi-wireless ok
Pertemuan 6   media transmisi-wireless okPertemuan 6   media transmisi-wireless ok
Pertemuan 6 media transmisi-wireless ok
eli priyatna laidan
 
Unidad xiv tutela de los derechos reales publicidad registral
Unidad xiv tutela de los derechos reales  publicidad registralUnidad xiv tutela de los derechos reales  publicidad registral
Unidad xiv tutela de los derechos reales publicidad registral
damian flori
 
Analisis butir solal pd fisika xii ip s1a
Analisis butir solal pd fisika xii ip s1aAnalisis butir solal pd fisika xii ip s1a
Analisis butir solal pd fisika xii ip s1a
eli priyatna laidan
 

Viewers also liked (9)

Analisis pg tik x ii ips4 0910
Analisis pg  tik x ii ips4 0910Analisis pg  tik x ii ips4 0910
Analisis pg tik x ii ips4 0910
 
Silabus tik kelas 2
Silabus tik kelas 2Silabus tik kelas 2
Silabus tik kelas 2
 
Analisis butir solal pd fisika xii ipa2 a
Analisis butir solal pd fisika xii ipa2 aAnalisis butir solal pd fisika xii ipa2 a
Analisis butir solal pd fisika xii ipa2 a
 
[Materi umum] permen nomor 24 sk pelaksanaan si skl
[Materi umum] permen nomor 24 sk pelaksanaan si skl[Materi umum] permen nomor 24 sk pelaksanaan si skl
[Materi umum] permen nomor 24 sk pelaksanaan si skl
 
Pertemuan 9 ip address ok
Pertemuan 9   ip address okPertemuan 9   ip address ok
Pertemuan 9 ip address ok
 
Pertemuan 6 media transmisi-wireless ok
Pertemuan 6   media transmisi-wireless okPertemuan 6   media transmisi-wireless ok
Pertemuan 6 media transmisi-wireless ok
 
Unidad xiv tutela de los derechos reales publicidad registral
Unidad xiv tutela de los derechos reales  publicidad registralUnidad xiv tutela de los derechos reales  publicidad registral
Unidad xiv tutela de los derechos reales publicidad registral
 
5 ip address
5 ip address5 ip address
5 ip address
 
Analisis butir solal pd fisika xii ip s1a
Analisis butir solal pd fisika xii ip s1aAnalisis butir solal pd fisika xii ip s1a
Analisis butir solal pd fisika xii ip s1a
 

Similar to Sol80

Similar to Sol80 (20)

Number theory
Number theoryNumber theory
Number theory
 
Set Of Primes Is Infinite - Number Theory
Set Of Primes Is Infinite - Number TheorySet Of Primes Is Infinite - Number Theory
Set Of Primes Is Infinite - Number Theory
 
Solutions Manual for An Introduction To Abstract Algebra With Notes To The Fu...
Solutions Manual for An Introduction To Abstract Algebra With Notes To The Fu...Solutions Manual for An Introduction To Abstract Algebra With Notes To The Fu...
Solutions Manual for An Introduction To Abstract Algebra With Notes To The Fu...
 
A Proof of Twin primes and Golbach's Conjecture
A Proof of Twin primes and Golbach's ConjectureA Proof of Twin primes and Golbach's Conjecture
A Proof of Twin primes and Golbach's Conjecture
 
mathematicalinductionanddivisibilityrules-160711105713.pdf
mathematicalinductionanddivisibilityrules-160711105713.pdfmathematicalinductionanddivisibilityrules-160711105713.pdf
mathematicalinductionanddivisibilityrules-160711105713.pdf
 
Ijetr011954
Ijetr011954Ijetr011954
Ijetr011954
 
Number theory
Number theoryNumber theory
Number theory
 
Factorials as sums
Factorials as sumsFactorials as sums
Factorials as sums
 
Introduction to probability solutions manual
Introduction to probability   solutions manualIntroduction to probability   solutions manual
Introduction to probability solutions manual
 
Sol16
Sol16Sol16
Sol16
 
Sol60
Sol60Sol60
Sol60
 
Sol60
Sol60Sol60
Sol60
 
Number theory
Number theoryNumber theory
Number theory
 
Construction of BIBD’s Using Quadratic Residues
Construction of BIBD’s Using Quadratic ResiduesConstruction of BIBD’s Using Quadratic Residues
Construction of BIBD’s Using Quadratic Residues
 
Chap2
Chap2Chap2
Chap2
 
Induction.pdf
Induction.pdfInduction.pdf
Induction.pdf
 
Lect 18
Lect 18Lect 18
Lect 18
 
X ch 1 real numbers
X  ch 1  real numbersX  ch 1  real numbers
X ch 1 real numbers
 
Ch08
Ch08Ch08
Ch08
 
On Power Tower of Integers
On Power Tower of IntegersOn Power Tower of Integers
On Power Tower of Integers
 

More from eli priyatna laidan

More from eli priyatna laidan (20)

Up ppg daljab latihan soal-pgsd-set-2
Up ppg daljab latihan soal-pgsd-set-2Up ppg daljab latihan soal-pgsd-set-2
Up ppg daljab latihan soal-pgsd-set-2
 
Soal utn plus kunci gurusd.net
Soal utn plus kunci gurusd.netSoal utn plus kunci gurusd.net
Soal utn plus kunci gurusd.net
 
Soal up sosial kepribadian pendidik 5
Soal up sosial kepribadian pendidik 5Soal up sosial kepribadian pendidik 5
Soal up sosial kepribadian pendidik 5
 
Soal up sosial kepribadian pendidik 4
Soal up sosial kepribadian pendidik 4Soal up sosial kepribadian pendidik 4
Soal up sosial kepribadian pendidik 4
 
Soal up sosial kepribadian pendidik 3
Soal up sosial kepribadian pendidik 3Soal up sosial kepribadian pendidik 3
Soal up sosial kepribadian pendidik 3
 
Soal up sosial kepribadian pendidik 2
Soal up sosial kepribadian pendidik 2Soal up sosial kepribadian pendidik 2
Soal up sosial kepribadian pendidik 2
 
Soal up sosial kepribadian pendidik 1
Soal up sosial kepribadian pendidik 1Soal up sosial kepribadian pendidik 1
Soal up sosial kepribadian pendidik 1
 
Soal up akmal
Soal up akmalSoal up akmal
Soal up akmal
 
Soal tkp serta kunci jawabannya
Soal tkp serta kunci jawabannyaSoal tkp serta kunci jawabannya
Soal tkp serta kunci jawabannya
 
Soal tes wawasan kebangsaan
Soal tes wawasan kebangsaanSoal tes wawasan kebangsaan
Soal tes wawasan kebangsaan
 
Soal sospri ukm ulang i 2017 1 (1)
Soal sospri ukm ulang i 2017 1 (1)Soal sospri ukm ulang i 2017 1 (1)
Soal sospri ukm ulang i 2017 1 (1)
 
Soal perkembangan kognitif peserta didik
Soal perkembangan kognitif peserta didikSoal perkembangan kognitif peserta didik
Soal perkembangan kognitif peserta didik
 
Soal latihan utn pedagogik plpg 2017
Soal latihan utn pedagogik plpg 2017Soal latihan utn pedagogik plpg 2017
Soal latihan utn pedagogik plpg 2017
 
Rekap soal kompetensi pedagogi
Rekap soal kompetensi pedagogiRekap soal kompetensi pedagogi
Rekap soal kompetensi pedagogi
 
Bank soal pedagogik terbaru 175 soal-v2
Bank soal pedagogik terbaru 175 soal-v2Bank soal pedagogik terbaru 175 soal-v2
Bank soal pedagogik terbaru 175 soal-v2
 
Bank soal ppg
Bank soal ppgBank soal ppg
Bank soal ppg
 
Soal cpns-paket-17
Soal cpns-paket-17Soal cpns-paket-17
Soal cpns-paket-17
 
Soal cpns-paket-14
Soal cpns-paket-14Soal cpns-paket-14
Soal cpns-paket-14
 
Soal cpns-paket-13
Soal cpns-paket-13Soal cpns-paket-13
Soal cpns-paket-13
 
Soal cpns-paket-12
Soal cpns-paket-12Soal cpns-paket-12
Soal cpns-paket-12
 

Recently uploaded

Recently uploaded (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 

Sol80

  • 1. Solution Week 80 (3/22/04) Nine divisible by 9 First, consider the following simpler problem: Problem: Given any five integers, show that there is at least one subset of three integers whose sum is divisible by 3. Solution: Let us try to find a set of five integers that contains no subset of three integers whose sum is divisible by 3, a task that we will show is impossible. Each of the five integers is, for our purposes, equal to 0, 1, or 2, because we are concerned only with divisions by 3. We cannot have one of each of these, because 0 + 1 + 2 is divisible by 3. We must therefore have at most two of the types. But the pigeonhole principle then implies that we have at least three of one of the types. The sum of these three integers is divisible by 3. Returning to the original problem, pick five integers to obtain a triplet whose sum is divisible by 3. Then pick another five integers to obtain another such triplet. We can continue to do this for a total of five times, given the seventeen integers. We now have five triplets, each of whose sum is divisible by 3. As far as divisions by 9 are concerned, these sums are equal to 0, 3, or 6. We can now use the same reasoning as in our auxiliary problem above (but with everything scaled up by a factor of 3) to show that we can find a set of three triplets that has a sum divisible by 9. In other words, we have found a set of nine integers whose sum is divisible by 9. This result is a special case of the following theorem. Theorem: Given any 2n − 1 integers, there is at least one subset of n integers whose sum is divisible by n. We will prove this theorem by demonstrating two lemmas. Lemma 1: If the theorem is true for integers n1 and n2, then it is also true for the product n1n2. Proof: Consider a set of 2n1n2−1 integers. Under the assumption that the theorem is true for n1, we can certainly pick a subset of n1 integers whose sum is divisible by n1. From the remaining 2n1n2 − 1 − n1 integers we can pick another such subset of n1 integers, and so on. We can continue to do this until we have obtained 2n2 − 1 such subsets. This is true because after forming 2n2 − 2 such subsets, there are [2n1n2 − 1] − [(2n2 − 2)n1] = 2n1 − 1 integers left over, from which we can pick one last such subset of n1 integers. Now consider these 2n2 − 1 sums divided by n1. Assuming that the theorem holds for n2, we can find n2 of these sums (divided by n1) that have a sum divisible by n2. Bringing back in the factor of n1, we see that we have found a set of n1n2 integers whose sum is divisible by n1n2. 1
  • 2. In proving the general theorem, this first lemma shows that it is sufficient to prove the theorem for primes, p: Lemma 2: If p is prime, then given 2p − 1 integers, there is at least one subset of p integers whose sum is divisible by p. Proof: Consider all the possible N ≡ 2p−1 p subsets of p integers. Label the sums of these subsets as Sj, where 1 ≤ j ≤ N (these may be indexed in an arbitrary manner), and consider the sum S = N j=1 S (p−1) j . (1) Remark: The following proof isn’t mine (I’m not sure where it came from originally). At first glance, it might seem that adding up these (p − 1)st powers is a little out of the blue, but it’s actually a fairly reasonable thing to do. There are two types of sums: “good” ones that are divisible by p, and “bad” ones that aren’t. It would be nice to label them all in a sort of binary way, say, with a “0” for good, and a “1” for bad. Fermat’s Little Theorem (which states that if a ≡ 0 (mod p) then ap−1 ≡ 1 (mod p)) provides the perfect way for doing this. We will prove this second lemma by demonstrating two claims: Claim 1: S is be divisible by p. Proof: Let the 2p − 1 integers be ai, where 1 ≤ i ≤ 2p − 1. Expand all of the S (p−1) j powers and collect all the like terms in S. The terms will have the form of some coefficient times ab1 i1 ab2 i2 · · · abk ik . The number, k, of different ai’s involved may be any number from 1 to p − 1, and the bj’s must of course add up to (p − 1). We will now show that the coefficient of an arbitrary ab1 i1 ab2 i2 · · · abk ik term is di- visible by p. The coefficient will depend on the bi, but it will happen to always be divisible by p. The coefficient may be viewed as the product of two factors. • Firstly, there is a multinomial coefficient from each S (p−1) j in which the given ab1 i1 ab2 i2 · · · abk ik occurs. This multinomial coefficient is p−1 b1,b2,...,bk , but it will turn out not to be important. • Secondly, we must count the number of different S (p−1) j in which the given ab1 i1 ab2 i2 · · · abk ik occurs. This number may be found as follows. We know that k of the p integers in Sj must be a1, a2, . . . , ak. The remaining p − k integers can be any subset of the other 2p − 1 − k integers. There are 2p−1−k p−k such subsets. The coefficient of the ab1 i1 ab2 i2 · · · abk ik term in S is therefore p−1 b1,b2,...,bk 2p−1−k p−k . Writing the second factor in this as 2p − 1 − k p − k = (2p − 1 − k)(2p − 2 − k) · · · p (p − k)! (2) demonstrates that every coefficient is divisible by p, independent of the values of the bi. Therefore, S is divisible by p. Q.E.D. 2
  • 3. Claim 2: If none of the Sj are divisible by p, then S is not divisible by p. Proof: Assume that none of the Sj are divisible by p. Then by Fermat’s Little Theorem (which states that if a ≡ 0 (mod p) then ap−1 ≡ 1 (mod p)), we have S ≡ N i=1 1 (mod p) ≡ N (mod p). (3) We now note that N ≡ 2p − 1 p = (2p − 1)(2p − 2) · · · (p + 1) (p − 1)! , (4) which is not divisible by p. Therefore, S is not divisible by p. Q.E.D. These two claims show that at least one of the Sj must be divisible by p. Remark: For the case where n is a prime number, p, it is possible to say a bit more about exactly how many of the Sj are divisible by p. We claim that either 1, p + 1, 2p + 1, . . ., of the Sj are divisible by p. The reasoning is as follows. Fermat’s Little Theorem implies that each Sj that is not divisible by p contributes 1 to S, while each Sj that is divisible by p contributes 0 to S. Under the (incorrect) assumption that none of the Sj are divisible by p, eq. (3) states that S ≡ N (mod p). Using eq. (4), and noting that (2p − 1)(2p − 2) · · · (p + 1) ≡ (p − 1)! (mod p), (5) we see that this assumption leads to the incorrect conclusion that S ≡ 1 (mod p). But since we know from eq. (2) that S must actually be divisible by p, then either 1, p + 1, 2p + 1, . . ., of the Sj must be divisible by p, because each Sj that is divisible by p will contribute 0, instead of 1, to S. Thus, for example, given five integers, there are either one, four, seven, or ten subsets of three integers whose sum is divisible by 3. It is easy to construct a case where only one of the Sj is divisible by p. We may pick p−1 of the 2p − 1 integers to be congruent to each other modulo p, and then pick the remaining p integers to also be congruent to each other (but not to the other p − 1 integers) modulo p. Then the subset consisting of these latter p integers is the only subset of p integers whose sum is divisible by p. 3