cake cutting problem, linear algebra
cake cutting problem, linear algebra
Jeremy L. Martin
Department of Mathematics
University of Kansas
KU Mini College
June 6, 2012
Summary
Suppose that you have a cake and are allowed to make ten
straight-line slices. What is the greatest number of pieces you can
produce? What if the slices have to be symmetric — or if the cake
is four-dimensional? How can we possibly see what it looks like to
slice space into pieces using lines, planes, or hyperplanes? Many of
these questions have beautiful answers that can be revealed using
unexpected, yet essentially simple mathematical techniques. Better
yet, the seemingly abstract study of hyperplane arrangements has
many surprising practical applications, ranging from optimization
problems, to the theory of networks, to how a group of cars can
find parking spots.
Themes
I The cuts must be straight lines and must go all the way
through the cake.
I The sizes and shapes of the pieces don’t matter.
I For the moment, we’ll focus on 2-dimensional cakes (think of
them as pancakes).
Planes, Hyperplanes, and Beyond
Dimension 2
Maximizing the Number of Pieces
Dimension 3
More Data
The Pattern
N P2 (N)
0 1
1 2 = 1+1
2 4 = 2+2 = 1+1+2
3 7 = 4+3 = 1+1+2+3
4 11 = 7+4 = 1+1+2+3+4
5 16 = 11 + 5 = 1+1+2+3+4+5
... ... ... ...
20 211 = 1 + 1 + 2 + 3 + · · · + 19 + 20
N+1
N N
2 x (1 + 2 + .... + N) N x (N+1)
1 + 2 + .... + N = N(N+1) / 2
N−1 cuts
Nth cut
N−1 cuts x5
x4
Nth cut
Since the original pancake had one piece, we have proved that
N(N + 1)
P2 (N) = 1 + (1 + 2 + · · · + N) = 1 + .
2
From 2D to 3D
From 2D to 3D
From 2D to 3D
N 0 1 2 3 4 5 6 7 8
P2 (N) 1 2 4 7 11 16 22 29 37
P3 (N) 1 2 4 8 15 26 42 64 93
The pattern is
P3 (N) = P3 (N − 1) + P2 (N − 1).
N
0 1 2 3 4 5 6 7 8
P1 (N) 1 2 3 4 5 6 7 8 9
P2 (N) 1 2 4 7 11 16 22 29 37
P3 (N) 1 2 4 8 15 26 42 64 93
N
0 1 2 3 4 5 6 7 8
P1 (N) 1 2 3 4 5 6 7 8 9
P2 (N) 1 2 4 7 11 16 22 29 37
P3 (N) 1 2 4 8 15 26 42 64 93
P4 (N) 1 2 4 8 16 31 57 99 163
P5 (N) 1 2 4 8 16 32 63 120 219
... ...
Symmetric Cake-Cutting
What are the possible ways to cut a perfectly round cake so that
all pieces are congruent (i.e., geometrically the same)?
Symmetric Cake-Cutting
x = 0, y = 0, z = 0 x = y , x = z, y = z
x = 0, y = 0, z = 0 or x = y , x = z, y = z
w = 0, x = 0, w = x, w = y, w = z,
or ?
y = 0, z =0 x = y, x = z, y =z
x=z
x=y
y=z
Projecting from 3D to 2D makes the diagrams simpler, and retains
both the number and symmetry of the regions.
Planes, Hyperplanes, and Beyond
Maximizing the Number of Pieces
Symmetric Cake-Cutting
Regions of Braid3
111111111
0000000000000000000
1111111111
x=z
000000000
111111111
000000000
1111111110000000000
1111111111
000000000
1111111110000000000
1111111111
0000000000
1111111111
000000000
111111111
0000000001111111111
1111111110000000000
0000000001111111111
1111111110000000000
0000000001111111111
z<x<y
111111111
000000000
111111111
0000000000
0000000000
1111111111 x<z<y
0000000001111111111
1111111110000000000
0000000000
1111111111
000000000
111111111
0000000000
11111111110000000000
1111111111
000000000
111111111
0000000000
1111111111
000000000
111111111
0000000000
1111111111
000000000
111111111
0000000000
1111111111
00000000000
11111111111
0000000000
1111111111
00000000000
11111111111
0000000000
1111111111
00000000000
11111111111
0000000000
1111111111
00000000000
11111111111
y=z
000000000
111111111
0000000000
1111111111
000000000
1111111110000000000
1111111111
00000000000
11111111111
0000000000
1111111111
000000000
1111111110000000000
1111111111
00000000000
11111111111
0000000000
1111111111
0000000000
1111111111
000000000
111111111
0000000000
1111111111 00000000000
11111111111
0000000000
1111111111
000000000
111111111
0000000000
1111111111 00000000000
11111111111
0000000000
1111111111
00000000000
11111111111
000000000
111111111
0000000000
1111111111
000000000
1111111110000000000
1111111111
00000000000
11111111111
z<y<x 0000000000
1111111111
0000000000
1111111111
0000000000
11111111110000000000
1111111111
00000000000
11111111111
0000000000
1111111111 x<y<z
0000000000
1111111111
0000000000
1111111111 00000000000
11111111111
0000000000
1111111111
0000000000
1111111111
0000000000
1111111111 00000000000
11111111111
0000000000
1111111111
0000000000
1111111111
0000000000
1111111111 00000000000
11111111111
0000000000
1111111111
0000000000
1111111111 00000000000
11111111111
0000000000
1111111111
0000000000
1111111111
0000000000
1111111111 00000000000
11111111111
0000000000
1111111111
0000000000
1111111111
0000000000
1111111111
0000000000
1111111111 00000000000
11111111111
0000000000
1111111111
0000000000
1111111111
0000000000
1111111111 00000000000
11111111111
0000000000
1111111111
0000000000
1111111111
0000000000
1111111111 00000000000
11111111111
0000000000
1111111111
0000000000
1111111111
0000000000
1111111111 00000000000
11111111111
0000000000
1111111111
0000000000
1111111111
0000000000
1111111111 00000000000
11111111111
0000000000
1111111111
0000000000
1111111111
0000000000
1111111111
0000000000
1111111111
0000000000
1111111111
0000000000
1111111111
0000000000
1111111111
0000000000
1111111111
x=y
0000000000
1111111111
0000000000
1111111111
0000000000
1111111111
0000000000
1111111111
y<z<x
0000000000
1111111111
0000000000
1111111111
y<x<z
0000000000
1111111111
0000000000
1111111111
0000000000
1111111111
0000000000
1111111111
0000000000
1111111111
0000000000
1111111111
Why “Braid”?
Crossing a border corresponds to reversing one inequality.
x=z x
y
z
1111111111
0000000000
0000000000
1111111111 y=z
0000000000
1111111111
0000000000
1111111111
0000000000
1111111111
0000000000
1111111111
x<y<z
000000000
111111111
0000000000
1111111111
000000000
111111111
0000000000
1111111111
000000000
111111111
0000000000
1111111111
000000000
111111111
0000000000
1111111111
000000000
111111111
0000000000
1111111111
000000000
111111111 x=y
Why “Braid”?
Crossing a border corresponds to reversing one inequality.
x=z x
y
z
y=z
1111111111
0000000000
000000000
111111111
0000000000
1111111111
000000000
111111111
0000000000
1111111111
000000000
111111111
0000000000
1111111111
000000000
111111111
0000000000
1111111111
000000000
111111111
0000000000
1111111111
000000000
111111111
0000000000
1111111111
0000000000
1111111111
x=y
0000000000
1111111111
y<x<z
0000000000
1111111111
0000000000
1111111111
Planes, Hyperplanes, and Beyond
Maximizing the Number of Pieces
Symmetric Cake-Cutting
Why “Braid”?
Crossing a border corresponds to reversing one inequality.
x=z x
y
z
y=z
111111111
000000000
0000000001
111111111 0
0000000001
111111111 0
0
1
000000000
111111111
000000000
111111111 0
1
0000000001
111111111 0
0
1
000000000
111111111 x=y
y<z<x 101010
000000000
111111111
000000000
111111111
000000000
111111111
0000000001
111111111 0
0
1
Planes, Hyperplanes, and Beyond
Maximizing the Number of Pieces
Symmetric Cake-Cutting
Why “Braid”?
Crossing a border corresponds to reversing one inequality.
x=z x
y
z
11111111111y=z
00000000000
00000000000
11111111111
00000000000
11111111111
00000000000
11111111111
00000000000
11111111111
00000000000
11111111111
x<y<z
00000000000
11111111111
00000000000
11111111111
00000000000
11111111111
00000000000
11111111111
00000000000
11111111111
x=y
1111111111111111111
0000000000000000000
0000000000000000000 x=y
1111111111111111111
0000000000000000000
1111111111111111111
0000000000000000000
1111111111111111111
0000000000000000000
1111111111111111111
0000000000000000000
1111111111111111111
0000000000000000000
1111111111111111111
0000000000000000000
1111111111111111111
x<y
0000000000000000000
1111111111111111111
0000000000000000000
1111111111111111111
x<y y<x
0000000000000000000
1111111111111111111 1111111111111111
0000000000000000
0000000000000000000
1111111111111111111
0000000000000000000
1111111111111111111
x=y
y<x
0000000000000000000
1111111111111111111
0000000000000000000
1111111111111111111
0000000000000000000
1111111111111111111
0000000000000000000
1111111111111111111
0000000000000000000
1111111111111111111
0000000000000000000
1111111111111111111
Braid2 Projection into 1D
w = x, w = y, w = z, x = y, x = z, y =z
in four-dimensional space.
Regions of Braid4
Regions of Braid4
x z wy ←→ x w zy
x1 = x2 ,
x1 = x3 , x2 = x3 ,
...
x1 = xn , x2 = xn , . . . , xn−1 = xn
Parking Cars
Parking Functions
1 2 3 4 5 6
1 4 5 1 4 1
1 2 3 4 5 6
1 4 5 1 4
Parking Functions
1 2 3 4 5 6
1 4 5 1
1 2 3 4 5 6
1 4 5
Parking Functions
1 2 3 4 5 6
1 4
1 2 3 4 5 6
Success!
1
Parking Functions
different 1 2 3 4 5 6
1 4 5 4 4 1
Parking Functions
1 2 3 4 5 6
1 4 5 4 4
1 2 3 4 5 6
1 4 5 4
Parking Functions
1 2 3 4 5 6
1 4 5
1 2 3 4 5 6
1 4
Parking n Cars
Observation #1: Whether or not all the cars can park depends
on what their preferred spaces are, but not on the order in which
they enter the parking lot.
For example, if there are 6 cars and the preference list includes two
5’s and one 6, not all cars will be able to park.
Parking n Cars
Connecting Points
Problem: Connect n points with as few links as possible.
7 7
1 1
4 4
2 6 2 6
5 3 5 3
8 8
I It doesn’t matter where the points are or how you draw the
links — just which pairs of points are linked.
I These structures are called trees.
Planes, Hyperplanes, and Beyond
Maximizing the Number of Pieces Parking Cars
Parking. . . Building Trees
1 point: 1 1 tree
2 points: 1 2 1 tree
3 points: 1 2 3 2 1 3 1 3 2 3 trees
1 2 3 4
2 3 4 1 3 4 1 2 4 1 2 3
1 2 3 4 1 4 2 3 2 3 1 4
4 points: 1 2 4 3 1 4 3 2 2 3 4 1 16 trees
1 3 2 4 2 1 3 4 3 2 1 4
1 3 4 2 2 1 4 3 3 2 4 1
x1 = x2 , x1 = x2 + 1,
x1 = x3 , x1 = x3 + 1,
...
xn−1 = xn , xn−1 = xn .
(“Take the braid arrangement, make a copy of it, and push the
copy a little bit.”)
x=y x = y+1
y = z+1
1 2 3
y=z
4 5 6
7 8 9 10
11 12 13
x = z+1
14 15 16
x=z
x=y x = y+1
y = z+1
120 110 210
y=z
020 100 200
x = z+1