Professional Documents
Culture Documents
Polya
Polya
Generating Functions
Generating Functions
Example 2
Now consider an n n chessboard where n 2. Here we
color the squares Red and Blue and two colorings are different
only if one cannot be obtained from another by a rotation or a
reflection. For n = 2 there are 6 colorings.
Generating Functions
Generating Functions
Generating Functions
Generating Functions
rrrr
brrr
rbrr
rrbr
rrrb
bbrr
rbbr
rrbb
brrb
rbrb
brbr
bbbr
bbrb
brbb
rbbb
bbbb
e
rrrr
brrr
rbrr
rrbr
rrrb
bbrr
rbbr
rrbb
brrb
rbrb
brbr
bbbr
bbrb
brbb
rbbb
bbbb
a
rrrr
rbrr
rrbr
rrrb
brrr
rbbr
rrbb
brrb
bbrr
brbr
rbrb
rbbb
bbbr
bbrb
brbb
bbbb
b
rrrr
rrbr
rrrb
brrr
rbrr
rrbb
brrb
bbrr
rbbr
rbrb
brbr
brbb
rbbb
bbbr
bbrb
bbbb
c
rrrr
rrrb
brrr
rbrr
rrbr
brrb
bbrr
rbbr
rrbb
brbr
rbrb
bbrb
brbb
rbbb
bbbr
bbbb
p
rrrr
rbrr
brrr
rrrb
rrbr
bbrr
brrb
rrbb
rbbr
brbr
rbrb
bbrb
bbbr
brbb
brbb
bbbb
Generating Functions
q
rrrr
rrrb
rrbr
rbrr
brrr
rrbb
rbbr
bbrr
brrb
brbr
rbrb
rbbb
brbb
bbrb
bbbr
bbbb
r
rrrr
brrr
rrrb
rrbr
rbrr
brrb
rrbb
rbbr
bbrr
rbrb
brbr
brbb
bbrb
bbbr
rbbb
bbbb
s
rrrr
rrbr
rbrr
brrr
rrrb
rbbr
bbrr
brrb
rrbb
rbrb
brbr
bbbr
rbbb
brbb
bbrb
bbbb
Generating Functions
Generating Functions
Lemma 2
If x X then |Ox | |Sx | = |G|.
Proof
Fix x X and define an equivalence relation on G
by
g1 g2 if g1 x = g2 x.
Let the equivalence classes be A1 , A2 , . . . , Am . We first argue
that
|Ai | = |Sx |
i = 1, 2, . . . , m.
(1)
Fix i and g Ai . Then
h Ai g x = h x (g 1 h) x = x
(g 1 h) Sx h g Sx
where g Sx = {g : Sx }.
Generating Functions
Generating Functions
x
rrrr
brrr
rbrr
rrbr
rrrb
bbrr
rbbr
rrbb
brrb
rbrb
brbr
bbbr
bbrb
brbb
rbbb
bbbb
Ox
{rrrr }
{brrr,rbrr,rrbr,rrrb}
{brrr,rbrr,rrbr,rrrb}
{brrr,rbrr,rrbr,rrrb}
{brrr,rbrr,rrbr,rrrb}
{bbrr,rbbr,rrbb,brrb}
{bbrr,rbbr,rrbb,brrb}
{bbrr,rbbr,rrbb,brrb}
{bbrr,rbbr,rrbb,brrb}
{rbrb,brbr}
{rbrb,brbr}
{bbbr,rbbb,brbb,bbrb}
{bbbr,rbbb,brbb,bbrb}
{bbbr,rbbb,brbb,bbrb}
{bbbr,rbbb,brbb,bbrb}
{bbbb}
Sx
G
{e0 }
{e0 }
{e0 }
{e0 }
{e0 }
{e0 }
{e0 }
{e0 }
{e0 , e2 }
{e0 , e2 }
{e0 }
{e0 }
{e0 }
{e0 }
G
Generating Functions
E
x
a
m
p
l
e
1
n=4
x
rrrr
brrr
rbrr
rrbr
rrrb
bbrr
rbbr
rrbb
brrb
rbrb
brbr
bbbr
bbrb
brbb
rbbb
bbbb
Ox
{e}
{brrr,rbrr,rrbr,rrrb}
{brrr,rbrr,rrbr,rrrb}
{brrr,rbrr,rrbr,rrrb}
{brrr,rbrr,rrbr,rrrb}
{bbrr,rbbr,rrbb,brrb}
{bbrr,rbbr,rrbb,brrb}
{bbrr,rbbr,rrbb,brrb}
{bbrr,rbbr,rrbb,brrb}
{rbrb,brbr}
{rbrb,brbr}
{bbbr,rbbb,brbb,bbrb}
{bbbr,rbbb,brbb,bbrb}
{bbbr,rbbb,brbb,bbrb}
{bbbr,rbbb,brbb,bbrb}
{e}
Sx
G
{e,r}
{e,s}
{e,r}
{e,s}
{e,p}
{e,q}
{e,p}
{e,q}
{e,b,r,s}
{e,b,r,s}
{e,s}
{e,r}
{e,s}
{e,r}
G
Generating Functions
E
x
a
m
p
l
e
2
Proof
X ,G =
X 1
|Ox |
xX
X |Sx |
,
|G|
xX
from Lemma 1.
Generating Functions
1
(4+1+1+1+1+1+1+1+1+2+2+1+1+1+1+4) = 6.
4
In example 2 we have
X ,G =
1
(8+2+2+2+2+2+2+2+2+4+4+2+2+2+2+8) = 6.
8
Generating Functions
Theorem 2
(Frobenius, Burnside)
X ,G =
1 X
|Fix(g)|.
|G|
gG
Proof
1 XX
A(x, g)
|G|
xX gG
1 XX
A(x, g)
|G|
gG xX
1 X
|Fix(g)|.
|G|
gG
Generating Functions
e0
64
e1
2
e2
4
e3
8
e4
4
e5
2
1
(64 + 2 + 4 + 8 + 4 + 2) = 14.
6
Generating Functions
Cycles of a permutation
Let : D D be a permutation of the finite set D. Consider the
digraph = (D, A) where A = {(i, (i)) : i D}. is a
collection of vertex disjoint cycles. Each x D being on a
unique cycle. Here a cycle can consist of a loop i.e. when
(x) = x.
Example: D = [10].
i
(i)
1
6
2
2
3
7
4
10
5
3
6
8
7
9
8
1
The cycles are (1, 6, 8), (2), (3, 7, 9, 5), (4, 10).
Generating Functions
9
5
10
4
Generating Functions
Example 1
First consider e0 , e1 , . . . , en1 as permutations of D.
The cycles of e0 are (1), (2), . . . , (n).
Now suppose that 0 < m < n. Let am = gcd(m, n) and
km = n/am . The cycle Ci of em containing the element i is is
(i, i + m, i + 2m, . . . , i + (km 1)m) since n is a divisor km m and
not a divisor of k m for k < km . In total, the cycles of em are
C0 , C1 , . . . , Cam 1 .
This is because they are disjoint and together contain n
elements. (If i + rm = i + r m mod n then
(r r )m + (i i ) = n. But |i i | < am and so dividing by am
we see that we must have i = i .)
Generating Functions
n1
1 X gcd(m,n)
2
.
n
m=0
Generating Functions
Example 2
It is straightforward to check that when n is even, we have
g
|Fix(g)|
n2
n2 /4
n2 /2
n2 /4
n2 /2
n2 /2
n(n+1)/2
n(n+1)/2
Generating Functions
Polyas Theorem
Generating Functions
for all d D.
Generating Functions
wgx(d)
dD
wx(g 1 (d))
(2)
wx(d))
(3)
dD
dD
= W (x)
Note, that we can go from (2) to (3) because as d runs over D,
g 1 (d) also runs over d.
Generating Functions
1 X
ct(g).
|G|
gG
e
x14
a
x4
b
x22
c
x4
p
x22
q
x22
x12 x2
x12 x2
and so
CG (x1 , x2 , x3 , x4 ) =
1 4
(x + 3x22 + 2x12 x2 + 2x4 ).
8 1
Generating Functions
e
x19
a
x1 x42
b
x1 x24
c
x1 x42
x13 x23
x13 x23
x13 x23
x13 x23
and so
CG (x1 , x2 , x3 , x4 ) =
1 9
(x + x1 x24 + 4x13 x23 + 2x1 x42 ).
8 1
Generating Functions
Theorem (Polya)
PI = CG
cC
wc ,
wc2 , . . . ,
cC
wc
cC
Proof
In Example 2, we replace x1 by R + B, x2 by R 2 + B 2
and so on. When n = 2 this gives
PI =
1
((R + B)4 + 3(R 2 + B 2 )2 +
8
2(R + B)2 (R 2 + B 2 ) + 2(R 4 + B 4 ))
= R 4 + R 3 B + 2R 2 B 2 + RB 3 + B 4 .
Putting R = B = 1 gives the number of distinct colorings. Note
also the formula for PI tells us that there are 2 distinct colorings
using 2 reds and 2 Blues.
Generating Functions
Generating Functions
m
X
mi Wi
i=1
m
X
i=1
=
=
1
|G|
X
1
Wi
|Fix(g (i) )|
|G|
m
XX
by Theorem 2
gG
gG i=1
1 X
W (Fix(g))
|G|
(4)
gG
S
(i)
Note that (4) follows from Fix(g) = m
i=1 Fix(g ) since
(i)
x Fix(g ) iff x Xi and g x = x.
Generating Functions
k
Suppose now that ct(g) = x1k1 x2k2 x
as above. Then we
claim that
! k1
! k2
! k
X
X
X
2
W (Fix(g)) =
wc
wc
wc
. (5)
cC
cC
cC
Generating Functions