Chomp The Graph!

Transcription

Chomp The Graph!
By: Aylin Perez
January 12, 2014
Table of Contents
I.
Research Question
1
II.
Introduction
1
III.
History
2
IV.
Mathematical Background
3
V.
Investigation
7
VI.
Conclusion
15
VII.
Applications and Extensions
18
VIII. References
19
-2-
I.
Research Question:
Given a finite undirected graph G, two players alternate turns and remove either a single edge E
or a vertex V with all incident edges. Whoever removes the last vertex, leaving their opponent
with the empty graph, wins. Which player has the winning strategy for games on trees, cycles,
and complete graphs?
II.
Introduction:
The game Chomp the Graph is an excellent, fun way to introduce graph theory to
beginners. Why? It may seem simple enough, but it turns out to be a game where one has to
think critically and strategically to win. Every move counts. The underlying mystery and my
recent study of graph theory is what drove me to do more research on the game. Which player
will always, sometimes, or never win? Why?
I hypothesized what the answer to the question would be prior to the investigation in
order to compare my hypothesis with my findings at the end. This provided me with a picture as
to what I was expecting and lead to more excitement, an enthusiastic approach, and surprise
when I finally arrived at my answer. Before I started investigating, I believed that the first player
would always win and have the winning strategy. Since the first player would lead the game, he
or she can use that to his or her advantage. My investigation, however, would prove me wrong!
-1-
III.
History:
Leonhard Paul Euler was a Swiss
mathematician and one of the most prolific
mathematicians of all time, despite suffering
from blindness later on in his life. He is credited
for being the first mathematician to use graph
theory around 1736 to solve the infamous
Königsberg Bridge problem. The problem took
place in the city of Königsberg, which had seven
bridges connecting two islands with the main land. The problem questioned whether someone
could walk across all seven bridges once and only once. Euler was the first mathematician to
arrive at a solution in terms of graph theory and proved that no matter where a person started, it
was impossible to walk across the bridges once and only once. In order to do this, he exchanged
landmasses for vertices and represented the bridges as edges connecting the vertices. Euler not
only simplified the problem, but also explained why it wasn’t possible. If one were to take a
pencil and attempt to trace over all the edges, it would be impossible to do so without repeating
any or picking up one’s pencil. To show why, Euler
came up with the concept of degrees, in which he
assigned each vertex a number based on the edges
extending from that vertex. Euler proposed that the only
way each edge could be traversed once and only once for
any graph would be if at most 2 vertices had odd
degrees. Any other combination would not yield what we now call Eulerian Graphs.
-2-
Chomp the Graph is a finite game. In other words, the game cannot go on forever: one
player will either win or lose. The game is very similar to the popular game Nim, which is an
impartial game where two players take turns taking stones from different heaps and can take as
many they want as long as the stones are from the same heap. The object of the game is to leave
the opponent with nothing to take. Similarly, Chomp the Graph is a game where one wins when
the opposing player has nothing else to take. However, instead of only stones and heaps, vertices
and edges are taken into account.
IV.
Mathematical Background
Before starting the investigation, it is important to know all the mathematical concepts
that are involved in the game. This serves as a way to get a deeper understanding behind the
strategy and why either player possesses it.
Graph Theory- Basics
A graph G consists of vertices V and
edges E. The number of vertices is referred
to as order, while the number of edges is
referred to as size. Each vertex has a number
of degrees, which is the number of edges that
extend from that vertex. The example to the
right is a graph with order 5, as well as size 5
since there are 5 edges in total.
-3-
Isomorphism
Two graphs can be isomorphic, which means that they are essentially the same graph but
may look different. In order to determine isomorphism, order for both graphs must be the same
as well as size, and most importantly, there must be a one-to-one correspondence between
vertices. For instance, the two graphs below are isomorphic because not only do they have the
same order and size, but there is a one-to-one correspondence between the vertices.
Isomorphism is important because when listing all the possible combinations of how the
game Chomp the Graph could turn out, there will be graphs that will be isomorphic and only one
should be counted.
Directed Graphs
Directed graphs are graphs where the edges have direction. These
graphs are not part of the investigation nor the game, but it is important to know them.
Cycles & Complete Graphs
A cycle graph is a circuit without repeated vertices except at the ends. Furthermore, it is a
graph containing a single cycle through all vertices. These graphs are commonly labeled as Cn
where n is the number of vertices. They are also two-regular, meaning each vertex has a degree
of 2. When examining cycle graphs in the investigation, they will be undirected, such as C3 and
greater.
-4-
Graphs are complete when each pair of vertices is connected by one edge. Furthermore,
every vertex is connected to all other vertices but itself. If that’s the case, then the number of
edges of each vertex will be one less than the number of vertices. Therefore, to figure out the
total number of edges, one would multiply the order, n, with one less than the number of
vertices, and divided it by two to avoid counting twice. This process yields the formula:
This formula is very important when determining the number of edges for complete
graphs and will be useful during the investigation. Complete graphs are commonly referred to as
Kn, where n is the number of vertices.
Trees and Bipartite Graphs
Trees are graphs with no cycles where any two vertices are connected by exactly one
path. Trees have many applications, and are very useful in chemistry, when drawing
hydrocarbons. A tree with n vertices always has n-1 edges, a fact that will help in the
investigation. This statement can be proven by using induction:
i. Base Case:
a. A tree of order 1 has no edges, which is one less than the number of vertices.
ii. Inductive Step:
a. Assume a tree graph with n vertices has n-1 edges for all n=k
b. Prove that a tree with k+1 vertices has k edges.
Let Tk+1 be any tree with k+1 vertices. Consider Tk, the subgraph created by removing a
vertex v of degree one and the edge connecting it to the graph. By using “connected subgraph of
-5-
a tree is a tree”, Tk must also be a tree. Since it was assumed that a tree graph with n vertices has
n-1 edges for all n=k, then Tk must have k-1 edges. That results in Tk+1 having k edges.
Therefore, a tree with n vertices has n-1 edges for all n.
Bipartite graphs are graphs whose vertices can be divided into two disjoint sets such that
no two graph vertices are adjacent. An easy way to determine if a graph is bipartite is by
choosing two colors and coloring vertices in a way such that only vertices of opposing colors are
connected. Since all trees are bipartite, the winning strategy for trees will apply to certain
bipartite graphs. In order to determine if the bipartite graph is a tree or not, there has to be at least
one cycle in the graph for it not to be a tree.
The Winning Strategy
The winning strategy for Chomp the Graph is effective throughout the game, as long as
all of the rules are met. The key is to count the number of edges and vertices. The player wants to
take one of whichever category has an odd number; in other words, if there are 4 vertices and 3
edges in total, he or she should remove an edge. Furthermore, when removing a vertex, one
should remove the vertex with the highest degree. Last but not least, if both order and size are
odd, one should go with the highest odd number. For instance, if the game is at 3 vertices and 1
edge, the vertex with the highest degree should be removed.
After all of this information, it’s time to investigate!
-6-
V.
Investigation:
Tree Graphs:
Order 2
Player 1- 1 win
Player 2- 1 win
Order 3
Player 1- 4 wins
Player 2- 3 wins
-7-
Order 4
Player 1- 20 wins
Player 2- 19 wins
Order 5
Player 1- 53 wins
Player 2- 52 wins
-8-
# of Vertices
(Order)
Total Combinations
Player 1 wins
Player 2 wins
2
2
1 – 50%
1 – 50%
3
7
4 – 57.1%
3 – 42.9%
4
39
20 – 51.3%
19 – 48.7%
5
105
53 – 50.5%
52 – 49.5%
Based on the results, player 1 has the winning strategy. As shown in the diagram above,
player 1 always has a slightly higher percentage in winning out of all the possible ways the
game could turn out. Player 2 can’t win unless player 1 messes up.
The definition of trees serves as the reason of why player 1 has the winning strategy. As
proven before, a tree with n vertices has n-1 edges. Thus, player 1 has the advantage of starting
with an even-odd pair every time, despite what value n is. Thus, if player 1 follows the strategy,
he or she will always win.
Cycle Graphs (Note that C2 is directed and thus not included.)
Order 3
Player 1- 4 wins
Player 2- 5 wins
-9-
Order 4
Player 1- 22 wins
Player 2- 24 wins
Note that this graph can also serve as an
example of a bipartite graph that is also a
tree. Player 2 is the dominant player.
Order 5
Player 1- 156
Player 2- 161
- 10 -
# of Vertices
(Order)
Total Combinations
Player 1 wins
Player 2 wins
3
9
4 – 44.4 %
5 – 55.6%
4
46
22 – 47.8%
24 – 52.7%
5
317
156 – 49.2 %
161 – 50.8%
Cycles prove to be the opposite of trees; player 2 has the winning strategy! As shown in
the diagram above, player 2 is the dominant player, as he or she wins the most games out of all
the possible combinations in the different cases. The design of cycle graphs is the reason why
player 2 wins all the time, despite the number of vertices. As seen in the diagrams above, the
game always starts with an equal order and size, leaving player 1 no choice; he or she can’t use
the strategy. This leaves player 2 with an odd-even pair, and the capability of using the winning
strategy.
Complete Graphs
Note that K2 and K3 are T2 and C3 respectively.
Order 4
Player 1- 90
Player 2- 96
- 11 -
# of Vertices
(Order)
Total Combinations
Player 1 wins
Player 2 wins
2
2
1 – 50%
1 – 50%
3
9
4 – 44.4 %
5 – 55.6%
4
186
90 – 48.4%
96 – 51.6%
K3 is a graph where player 2 has the winning strategy, as proved above with cycles.
Since mapping out all of the possible ways Chomp the Graph could turn out on a
complete graph with order 5 and 6 yield an incredible amount of combinations, let’s think about
the game from a strategic point of view:
Order 5
- 12 -
Even though the first player has the odd-even pair at the beginning of the game on a K5
graph, we see that player 2 could also potentially win! Complete graphs are the only graphs
where the player who doesn’t have the strategy can counterattack! Since K3 is a graph where
player 2 has the winning strategy, he or she wants to put player 1 in the position of making a
move on a K3 graph. As shown in the diagram above, whenever that occurs, player 2 wins.
K4 is another graph where the data shows the possibility of player 2 winning is high, but
player 1 can counterattack! Player 1 starts with an even-even pair of vertices and edges, 4 and 6
respectively. Even though it might seem like player 1 is stuck, he or she can always remove one
vertex to form a K3 graph and thus, the second player can’t use the strategy; whichever move he
or she makes will always result in player 1 winning.
Therefore, to add to the winning strategy for complete graphs, I’ve discovered that the
goal of one player is to put the opposing player in a position where he or she is stuck with a K 3
graph. That will guarantee that the original player wins every time. To demonstrate this, let’s
look at a K6 graph.
As seen in the following page, player 1 wins more times that player 2, and it’s all about
forcing K3 on the opposite player and following the other rules that have been established. Based
on the counterattack, which cannot be used in any other graph but a complete graph, I conclude
that complete graphs are the fairest graphs to play on when the number of vertices is greater than
or equal to 5. Not only is the winning strategy useful, but the counterattack proves to be even
better. As seen in the following graph, just the winning strategy isn’t always helpful; the
counterattack, however, guarantees a win.
- 13 -
- 14 -
VI.
Conclusion
To conclude, Chomp the Graph is a game that is won by using the following strategy:

Count the number of vertices and edges; remove one of the categories that have an odd
number.

If both categories are odd-numbered, the player should remove the one with the largest
odd number.

If both categories are even-numbered, the player whose turn it is will lose; in other
words, the player with either the odd-odd (different) or odd-even pair will win.

If both categories are odd-numbered and the numbers are the same, the player whose turn
it is will lose; in other words, the next player, who will always be left with the odd-even
pair, will win.
In order to determine which player has the winning strategy, all the combinations of how the
game could turn out for different types of graphs were mapped, without loss of generality. The
percentages signaled which player had the winning strategy, where the player with the highest
percentage, even by a slight amount, was able to use the strategy. Meanwhile, the other player
had no way of counterattacking unless the original player messed up. This applied to trees and
cycles, while complete graphs yielded a different result.
- 15 -
Trees: Player 1 will always win using the strategy. As shown below, Player 1 always has a slight
advantage.
# of Vertices
(Order)
Total Combinations
Player 1
2
2
1 – 50%
3
7
4 – 57.1%
3 – 42.9%
4
39
20 – 51.3%
19 – 48.7%
5
105
53 – 50.5%
52 – 49.5%
Player 2
1 – 50%
Cycle graphs: Player 2 has the winning strategy as shown by the percentages below.
# of Vertices
(Order)
Total Combinations
Player 1
Player 2
3
8
3 – 37.5%
5 – 62.5%
4
46
22 – 47.8%
24 – 52.2%
5
317
156 – 49.2 %
161 – 50.8%
Complete Graphs: Complete graphs proved to be an exception. In addition to the strategy
mentioned above, there was a form of counterattack on complete graphs. The player wants to
force a K3 situation on the opposing player to guarantee a win. Based on this, it was concluded
that Chomp the Graph is the fairest to play on a complete graph with order ≥ 5 since the strategy
mentioned above is not enough.
- 16 -
# of Vertices
(Order)
Total Combinations
Player 1
Player 2
2
2
1 – 50%
1 – 50%
3
8
3 – 37.5%
5 – 62.5%
4
186
90 – 48.4%
96 – 51.6%
The following chart sums up the results:
Guaranteed Win
Graphs
Trees
Player 1
Player 2
 (any order)
Cycles
(any order)
(only when order=2 and 4 with the
Complete
(only when order=3)
counterattack)
- 17 -
VII.

Applications and Extensions
Chomp the Graph is a great way to introduce Graph Theory to students who are
beginning to study the topic. It can serve as a great lesson, where students will learn to
think outside of the box and think in terms of vertices and edges.

Chomp the Graph doesn’t stop here!
o The original game can be changed by giving each player the choice of one or two
moves. For example, if one player decides to play only once in one round, the
next time they go, they have to play twice. However, this resets, so the next turn,
that player can go twice again, but then would have to play only once the next
time. This will make the problem more interesting because it will change the
approach of either player toward winning the game. Now, they would have to be
conscious of the move they make and the move they have left to make. Who has
the winning strategy and in what graphs?
o Another variation of the game would be varying the number of vertices/edges
each player can take per turn. For instance, if one player takes a vertex, when he
plays again, he has to take an edge. It can switch every turn or there could be a
limited number of vertices/edges. Which player will win and in what graphs?
o One final variation is using directed graphs! This will re-define the game, because
removing a vertex will not remove all the edges attached to it; there would be a
choice: the edges going facing away from the vertex or the edges facing the
vertex. What is the winning strategy, and which player has it on what graphs?
- 18 -
VIII. References

A. Bogomolny, Mathematicians Doze Off from Interactive Mathematics Miscellany
and Puzzles. http://www.cut-the-knot.org/do_you_know/DozingOff.shtml

Draisma, Jan, and Sander Van Rijnswou. How to Chomp Forests, and Some Other
Graphs (n.d.): n. pag. Mathematisches Institut. Web.

“Nim." Encyclopedia Britannica. Encyclopedia Britannica Inc., n.d. Web.
<http://www.britannica.com/EBchecked/topic/415458/nim>.

Rhishikesh. Graph Theory Origin and Seven Bridges of Königsberg (n.d.): n. pag.
Georgia State University. Web.

“The Origins of Graph Theory." (n.d.): n. pag. University of Kansas. Web.
<https://www.math.ku.edu/~jmartin/courses/math410-S09/graphs.pdf>.

Weisstein, Eric W. "Complete Graph." From MathWorld--A Wolfram Web
Resource. http://mathworld.wolfram.com/CompleteGraph.html

Weisstein, Eric W. "Cycle Graph." From MathWorld--A Wolfram Web
Resource. http://mathworld.wolfram.com/CycleGraph.html

Weisstein, Eric W. "Tree." From MathWorld--A Wolfram Web
Resource. http://mathworld.wolfram.com/Tree.html
- 19 -