SlideShare a Scribd company logo
This note is about a delightful application of complex numbers to combinatorics and to integer divisi-
bility problems in general. I learnt this from an excellent Math Stackexchange answer by Qiaochu Yuan.
(http://math.stackexchange.com/questions/4961/interesting-results-easily-achieved-using-complex-numbers)
    Let 1, ω, ω 2 , . . . , ω p−1 be the p roots of unity for some prime p. Consider the sum
                                                                  p−1
                                                          Sk =          (ω i )k
                                                                  i=0
of the kth powers of the roots of unity. It is easy to show that
                                                                  p     if p | k
                                                   Sk =                                                                      (1)
                                                                  0        else
This can be shown for instance by considering the equation xp − 1 = 0 that ω i satisfies and using the fact
                                                                                    p−1
that the sum of the roots of this polynomial must equal 0, i.e.,                    i=0   ω i = 0. Since p is a prime, the claim
in equation (1) follows. This is a very useful property to have - we are able to ascertain divisibility of an
arbitrary integer k by a prime p simply by looking at the value that an algebraic expression Sk takes. The
fact itself isn’t very deep - there is nothing more fundamental going on here than the fact that cos(2πx) and
sin(2πx) have zeroes at half-integral and integral locations respectively. However, complex numbers provide
us a very succint way of expressing this fact and also give us lots of notational flexibility for algebraic
manipulation.
    Lets look at a simple application of this fact. Consider the following question
    Question: How many subsets of an n-element set have cardinalities divisible by 3? In other words,
evaluate                                                      n
                                                              3
                                                                      n
                                                                      3k
                                                           k=0
.
    We start with the familiar binomial identity
                                                  n
                                                           n k
                                                             x = (1 + x)n
                                                           k
                                              k=0
. Substituting the roots of unity one by one into this yields
                                              n
                                                          n k
                                                            1              = 2n                                              (2)
                                                          k
                                             k=0
                                              n
                                                       n k
                                                         ω            = (1 + ω)n                                             (3)
                                                       k
                                            k=0
                                            n
                                                      n 2k
                                                        ω          = (1 + ω 2 )n                                             (4)
                                                      k
                                            k=0
Adding the equations together, we note that only those terms when k is a multiple of 3 survive. Thus,
                                  n
                                  3
                                       n              1
                                              =       3   2n + (1 + ω)n + (1 + ω 2 )n                                        (5)
                                       3k
                                 k=0
                                                   1
                                              =    3      2n + (−1)n ω n + (−1)n ω 2n                                        (6)
                                                              1                    nπ
                                                          =   3   2n + 2 cos        3                                        (7)
The question can be answered easily enough without applealing to complex numbers (for ex., by consid-
ering separate cases for each value of n mod 3) but this is very elegant.
   There is more information to be gleaned from this method. Lets say 3 is replaced by an arbitrary integer
d and we are interested in asymptotics. From analysis similar to the one above, we can conclude that this
                        2n
asymptotic is roughly    d   but to do a second order analysis, the other complex terms matter. This is an
example of a case where complex numbers emerge organically from a problem that has nothing to do with
them initially.




                                                      2

More Related Content

What's hot

On Application of the Fixed-Point Theorem to the Solution of Ordinary Differe...
On Application of the Fixed-Point Theorem to the Solution of Ordinary Differe...On Application of the Fixed-Point Theorem to the Solution of Ordinary Differe...
On Application of the Fixed-Point Theorem to the Solution of Ordinary Differe...
BRNSS Publication Hub
 
1112 ch 11 day 12
1112 ch 11 day 121112 ch 11 day 12
1112 ch 11 day 12
festivalelmo
 
Proof
ProofProof
Proof
H K
 
Ejercicio1
Ejercicio1Ejercicio1
Ejercicio1
Miguel Silva
 
4.2 Exponential Functions
4.2 Exponential Functions4.2 Exponential Functions
4.2 Exponential Functions
smiller5
 
Logarithms in mathematics
Logarithms in mathematics Logarithms in mathematics
Logarithms in mathematics
Hiethem Aliraqi
 
Proof of Beal's conjecture
Proof of Beal's conjecture Proof of Beal's conjecture
Proof of Beal's conjecture
nikos mantzakouras
 
4.5 Exponential and Logarithmic Equations
4.5 Exponential and Logarithmic Equations4.5 Exponential and Logarithmic Equations
4.5 Exponential and Logarithmic Equations
smiller5
 
B. Sazdovic - Noncommutativity and T-duality
B. Sazdovic - Noncommutativity and T-dualityB. Sazdovic - Noncommutativity and T-duality
B. Sazdovic - Noncommutativity and T-duality
SEENET-MTP
 
Chapter-3: DIRECT PROOF AND PROOF BY CONTRAPOSITIVE
Chapter-3: DIRECT PROOF AND PROOF BY CONTRAPOSITIVEChapter-3: DIRECT PROOF AND PROOF BY CONTRAPOSITIVE
Chapter-3: DIRECT PROOF AND PROOF BY CONTRAPOSITIVE
nszakir
 
4.3 Logarithmic Functions
4.3 Logarithmic Functions4.3 Logarithmic Functions
4.3 Logarithmic Functions
smiller5
 
[Vvedensky d.] group_theory,_problems_and_solution(book_fi.org)
[Vvedensky d.] group_theory,_problems_and_solution(book_fi.org)[Vvedensky d.] group_theory,_problems_and_solution(book_fi.org)
[Vvedensky d.] group_theory,_problems_and_solution(book_fi.org)
Dabe Milli
 
Analysis Of Algorithms Ii
Analysis Of Algorithms IiAnalysis Of Algorithms Ii
Analysis Of Algorithms Ii
Sri Prasanna
 
Solve Equations
Solve EquationsSolve Equations
Solve Equations
nikos mantzakouras
 
Asymptotic Growth of Functions
Asymptotic Growth of FunctionsAsymptotic Growth of Functions
Asymptotic Growth of Functions
DEVTYPE
 
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
nikos mantzakouras
 
tensor-decomposition
tensor-decompositiontensor-decomposition
tensor-decomposition
Kenta Oono
 
Linear Algebra
Linear AlgebraLinear Algebra
Linear Algebra
Maths Tutoring
 
A Proof of the Riemann Hypothesis
A Proof of the Riemann  HypothesisA Proof of the Riemann  Hypothesis
A Proof of the Riemann Hypothesis
nikos mantzakouras
 
Number theory lecture (part 2)
Number theory lecture (part 2)Number theory lecture (part 2)
Number theory lecture (part 2)
Aleksandr Yampolskiy
 

What's hot (20)

On Application of the Fixed-Point Theorem to the Solution of Ordinary Differe...
On Application of the Fixed-Point Theorem to the Solution of Ordinary Differe...On Application of the Fixed-Point Theorem to the Solution of Ordinary Differe...
On Application of the Fixed-Point Theorem to the Solution of Ordinary Differe...
 
1112 ch 11 day 12
1112 ch 11 day 121112 ch 11 day 12
1112 ch 11 day 12
 
Proof
ProofProof
Proof
 
Ejercicio1
Ejercicio1Ejercicio1
Ejercicio1
 
4.2 Exponential Functions
4.2 Exponential Functions4.2 Exponential Functions
4.2 Exponential Functions
 
Logarithms in mathematics
Logarithms in mathematics Logarithms in mathematics
Logarithms in mathematics
 
Proof of Beal's conjecture
Proof of Beal's conjecture Proof of Beal's conjecture
Proof of Beal's conjecture
 
4.5 Exponential and Logarithmic Equations
4.5 Exponential and Logarithmic Equations4.5 Exponential and Logarithmic Equations
4.5 Exponential and Logarithmic Equations
 
B. Sazdovic - Noncommutativity and T-duality
B. Sazdovic - Noncommutativity and T-dualityB. Sazdovic - Noncommutativity and T-duality
B. Sazdovic - Noncommutativity and T-duality
 
Chapter-3: DIRECT PROOF AND PROOF BY CONTRAPOSITIVE
Chapter-3: DIRECT PROOF AND PROOF BY CONTRAPOSITIVEChapter-3: DIRECT PROOF AND PROOF BY CONTRAPOSITIVE
Chapter-3: DIRECT PROOF AND PROOF BY CONTRAPOSITIVE
 
4.3 Logarithmic Functions
4.3 Logarithmic Functions4.3 Logarithmic Functions
4.3 Logarithmic Functions
 
[Vvedensky d.] group_theory,_problems_and_solution(book_fi.org)
[Vvedensky d.] group_theory,_problems_and_solution(book_fi.org)[Vvedensky d.] group_theory,_problems_and_solution(book_fi.org)
[Vvedensky d.] group_theory,_problems_and_solution(book_fi.org)
 
Analysis Of Algorithms Ii
Analysis Of Algorithms IiAnalysis Of Algorithms Ii
Analysis Of Algorithms Ii
 
Solve Equations
Solve EquationsSolve Equations
Solve Equations
 
Asymptotic Growth of Functions
Asymptotic Growth of FunctionsAsymptotic Growth of Functions
Asymptotic Growth of Functions
 
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
 
tensor-decomposition
tensor-decompositiontensor-decomposition
tensor-decomposition
 
Linear Algebra
Linear AlgebraLinear Algebra
Linear Algebra
 
A Proof of the Riemann Hypothesis
A Proof of the Riemann  HypothesisA Proof of the Riemann  Hypothesis
A Proof of the Riemann Hypothesis
 
Number theory lecture (part 2)
Number theory lecture (part 2)Number theory lecture (part 2)
Number theory lecture (part 2)
 

Similar to Roots of unity_cool_app

The Probability that a Matrix of Integers Is Diagonalizable
The Probability that a Matrix of Integers Is DiagonalizableThe Probability that a Matrix of Integers Is Diagonalizable
The Probability that a Matrix of Integers Is Diagonalizable
Jay Liew
 
Proof of Kraft-McMillan theorem
Proof of Kraft-McMillan theoremProof of Kraft-McMillan theorem
Proof of Kraft-McMillan theorem
Vu Hung Nguyen
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
ijceronline
 
SOME THOUGHTS ON DIVERGENT SERIES
SOME THOUGHTS ON DIVERGENT SERIESSOME THOUGHTS ON DIVERGENT SERIES
SOME THOUGHTS ON DIVERGENT SERIES
genius98
 
some thoughts on divergent series
some thoughts on divergent seriessome thoughts on divergent series
some thoughts on divergent series
genius98
 
Taylor problem
Taylor problemTaylor problem
Taylor problem
dinhmyhuyenvi
 
Mth3101 Advanced Calculus Chapter 2
Mth3101 Advanced Calculus Chapter 2Mth3101 Advanced Calculus Chapter 2
Mth3101 Advanced Calculus Chapter 2
saya efan
 
Analisis Korespondensi
Analisis KorespondensiAnalisis Korespondensi
Analisis Korespondensi
dessybudiyanti
 
Least squares support Vector Machine Classifier
Least squares support Vector Machine ClassifierLeast squares support Vector Machine Classifier
Least squares support Vector Machine Classifier
Raj Sikarwar
 
Number theory
Number theoryNumber theory
Number theory
cherrymer molina
 
Newton
NewtonNewton
09 trial melaka_s2
09 trial melaka_s209 trial melaka_s2
09 trial melaka_s2
zabidah awang
 
Chapter 3 (maths 3)
Chapter 3 (maths 3)Chapter 3 (maths 3)
Chapter 3 (maths 3)
Prathab Harinathan
 
Conference Poster: Discrete Symmetries of Symmetric Hypergraph States
Conference Poster: Discrete Symmetries of Symmetric Hypergraph StatesConference Poster: Discrete Symmetries of Symmetric Hypergraph States
Conference Poster: Discrete Symmetries of Symmetric Hypergraph States
Chase Yetter
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)
IJERD Editor
 
Quantum mechanics
Quantum mechanicsQuantum mechanics
Quantum mechanics
Christy Betos
 
Imc2017 day1-solutions
Imc2017 day1-solutionsImc2017 day1-solutions
Imc2017 day1-solutions
Christos Loizos
 
Fourier series
Fourier seriesFourier series
Fourier series
Naveen Sihag
 
Fourier series
Fourier seriesFourier series
Fourier series
Naveen Sihag
 
Fourier series
Fourier seriesFourier series
Fourier series
Tarun Gehlot
 

Similar to Roots of unity_cool_app (20)

The Probability that a Matrix of Integers Is Diagonalizable
The Probability that a Matrix of Integers Is DiagonalizableThe Probability that a Matrix of Integers Is Diagonalizable
The Probability that a Matrix of Integers Is Diagonalizable
 
Proof of Kraft-McMillan theorem
Proof of Kraft-McMillan theoremProof of Kraft-McMillan theorem
Proof of Kraft-McMillan theorem
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
 
SOME THOUGHTS ON DIVERGENT SERIES
SOME THOUGHTS ON DIVERGENT SERIESSOME THOUGHTS ON DIVERGENT SERIES
SOME THOUGHTS ON DIVERGENT SERIES
 
some thoughts on divergent series
some thoughts on divergent seriessome thoughts on divergent series
some thoughts on divergent series
 
Taylor problem
Taylor problemTaylor problem
Taylor problem
 
Mth3101 Advanced Calculus Chapter 2
Mth3101 Advanced Calculus Chapter 2Mth3101 Advanced Calculus Chapter 2
Mth3101 Advanced Calculus Chapter 2
 
Analisis Korespondensi
Analisis KorespondensiAnalisis Korespondensi
Analisis Korespondensi
 
Least squares support Vector Machine Classifier
Least squares support Vector Machine ClassifierLeast squares support Vector Machine Classifier
Least squares support Vector Machine Classifier
 
Number theory
Number theoryNumber theory
Number theory
 
Newton
NewtonNewton
Newton
 
09 trial melaka_s2
09 trial melaka_s209 trial melaka_s2
09 trial melaka_s2
 
Chapter 3 (maths 3)
Chapter 3 (maths 3)Chapter 3 (maths 3)
Chapter 3 (maths 3)
 
Conference Poster: Discrete Symmetries of Symmetric Hypergraph States
Conference Poster: Discrete Symmetries of Symmetric Hypergraph StatesConference Poster: Discrete Symmetries of Symmetric Hypergraph States
Conference Poster: Discrete Symmetries of Symmetric Hypergraph States
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)
 
Quantum mechanics
Quantum mechanicsQuantum mechanics
Quantum mechanics
 
Imc2017 day1-solutions
Imc2017 day1-solutionsImc2017 day1-solutions
Imc2017 day1-solutions
 
Fourier series
Fourier seriesFourier series
Fourier series
 
Fourier series
Fourier seriesFourier series
Fourier series
 
Fourier series
Fourier seriesFourier series
Fourier series
 

Roots of unity_cool_app

  • 1. This note is about a delightful application of complex numbers to combinatorics and to integer divisi- bility problems in general. I learnt this from an excellent Math Stackexchange answer by Qiaochu Yuan. (http://math.stackexchange.com/questions/4961/interesting-results-easily-achieved-using-complex-numbers) Let 1, ω, ω 2 , . . . , ω p−1 be the p roots of unity for some prime p. Consider the sum p−1 Sk = (ω i )k i=0 of the kth powers of the roots of unity. It is easy to show that p if p | k Sk = (1) 0 else This can be shown for instance by considering the equation xp − 1 = 0 that ω i satisfies and using the fact p−1 that the sum of the roots of this polynomial must equal 0, i.e., i=0 ω i = 0. Since p is a prime, the claim in equation (1) follows. This is a very useful property to have - we are able to ascertain divisibility of an arbitrary integer k by a prime p simply by looking at the value that an algebraic expression Sk takes. The fact itself isn’t very deep - there is nothing more fundamental going on here than the fact that cos(2πx) and sin(2πx) have zeroes at half-integral and integral locations respectively. However, complex numbers provide us a very succint way of expressing this fact and also give us lots of notational flexibility for algebraic manipulation. Lets look at a simple application of this fact. Consider the following question Question: How many subsets of an n-element set have cardinalities divisible by 3? In other words, evaluate n 3 n 3k k=0 . We start with the familiar binomial identity n n k x = (1 + x)n k k=0 . Substituting the roots of unity one by one into this yields n n k 1 = 2n (2) k k=0 n n k ω = (1 + ω)n (3) k k=0 n n 2k ω = (1 + ω 2 )n (4) k k=0 Adding the equations together, we note that only those terms when k is a multiple of 3 survive. Thus, n 3 n 1 = 3 2n + (1 + ω)n + (1 + ω 2 )n (5) 3k k=0 1 = 3 2n + (−1)n ω n + (−1)n ω 2n (6) 1 nπ = 3 2n + 2 cos 3 (7)
  • 2. The question can be answered easily enough without applealing to complex numbers (for ex., by consid- ering separate cases for each value of n mod 3) but this is very elegant. There is more information to be gleaned from this method. Lets say 3 is replaced by an arbitrary integer d and we are interested in asymptotics. From analysis similar to the one above, we can conclude that this 2n asymptotic is roughly d but to do a second order analysis, the other complex terms matter. This is an example of a case where complex numbers emerge organically from a problem that has nothing to do with them initially. 2