Planarity: Can a given graph be drawn in a plane so that no edges intersect? Certainly, it is natural to avoid intersections, but up to now we haven’t gone out of our way to do so.
Colorings: Suppose that each vertex in an undirected graph is to be colored so that no two vertices that are connected by an edge have the same color. How many colors are needed? This question is motivated by the problem of drawing a map so that no two bordering countries are colored the same. A similar question can be asked for coloring edges.
A graph is planar if it can be drawn in a plane so that no edges cross. A drawing of a graph on the plane such that there are no edge crossings is called a planar embedding of the graph, or a plane graph for short.
Example9.6.2.A Planar Graph.
The graph in Figure 9.6.3(a) is planar but the drawing of it is not a plane graph. The drawing of the same graph in Figure 9.6.3(b) is a planar graph.
Figure9.6.3.A planar graph and a planar embedding that graph.
In discussing planarity, we need only consider simple undirected graphs with no self-loops. All other graphs can be treated as such since all of the edges that relate any two vertices can be considered as one “bundle” that clearly can be drawn in a plane.
Can you think of a graph that is not planar? How would you prove that it isn’t planar? Proving the nonexistence of something is usually more difficult than proving its existence. This case is no exception. Intuitively, we would expect that sparse graphs would be planar and dense graphs would be nonplanar. Theorem 9.6.10 will verify that dense graphs are indeed nonplanar.
The topic of planarity is a result of trying to restrict a graph to two dimensions. Is there an analogous topic for three dimensions? What graphs can be drawn in one dimension?
If a graph has only a finite number of vertices, it can always be drawn in three dimensions with no edge crossings. Is this also true for all graphs with an infinite number of vertices? The only “one-dimensional” graphs are graphs consisting of a single vertex, and path graphs, as shown in Figure 9.6.6.
A discussion of planarity is not complete without mentioning the famous Three Utilities Puzzle. The object of the puzzle is to supply three houses, A, B, and C, with the three utilities, gas, electric, and water. The constraint that makes this puzzle impossible to solve is that no utility lines may intersect. There is no planar embedding of the graph in Figure 9.6.7, which is commonly denoted . This graph is one of two fundamental nonplanar graphs. The Kuratowski Reduction Theorem states that if a graph is nonplanar then it “contains” either a or a . Containment is in the sense that if you start with a nonplanar graph you can always perform a sequence of edge deletions and contractions (shrinking an edge so that the two vertices connecting it coincide) to produce one of the two graphs.
A planar graph divides the plane into one or more regions. Two points on the plane lie in the same region if you can draw a curve connecting the two points that does not pass through an edge. One of these regions will be of infinite area. Each point on the plane is either a vertex, a point on an edge, or a point in a region. A remarkable fact about the geography of planar graphs is the following theorem that is attributed to Euler.
Experiment: Jot down a graph right now and count the number of vertices, regions, and edges that you have. If is not 2, then your graph is either nonplanar or not connected.
If is a connected planar graph with regions, vertices, and edges, then
(9.6.1)
Proof.
We prove Euler’s Formula by Induction on , for .
Basis: If , then must be a graph with one vertex, ; and there is one infinite region,. Therefore, , and the basis is true.
Induction: Suppose that has edges, , and that all connected planar graphs with less than edges satisfy (9.6.1). Select any edge that is part of the boundary of the infinite region and call it . Let be the graph obtained from by deleting .Figure 9.6.9 illustrates the two different possibilities we need to consider: either is connected or it has two connected components, and .
Figure9.6.9.Two cases in the proof of Euler’s Formula
If is connected, the induction hypothesis can be applied to it. If has vertices, regions and edges, then and in terms of the corresponding numbers for ,
No vertices were removed to form One region of was merged with the infinite region when was removed We assumed that had edges.
For the case where is connected,
If is not connected, it must consist of two connected components, and , since we started with a connected graph, . We can apply the induction hypothesis to each of the two components to complete the proof. We leave it to the students to do this, with the reminder that in counting regions, and will share the same infinite region.
If is a connected planar graph with vertices, , and edges, then
(9.6.2)
Proof.
(Outline of a Proof)
Let be the number of regions in . For each region, count the number of edges that comprise its border. The sum of these counts must be at least . Recall that we are working with simple graphs here, so a region made by two edges connecting the same two vertices is not possible.
Based on (a), infer that the number of edges in must be at least .
Substitute for in Euler’s Formula to obtain an inequality that is equivalent to (9.6.2)
One implication of (9.6.2) is that the number of edges in a connected planar graph will never be larger than three times its number of vertices (as long as it has at least three vertices). Since the maximum number of edges in a graph with vertices is a quadratic function of , as increases, planar graphs are more and more sparse.
If is a connected planar graph, then it has a vertex with degree 5 or less.
Proof.
(by contradiction): We can assume that has at least seven vertices, for otherwise the degree of any vertex is at most 5. Suppose that is a connected planar graph and each vertex has a degree of 6 or more. Then, since each edge contributes to the degree of two vertices, . However, Theorem 9.6.10 states that the , which is a contradiction.
The map of Euler Island in Figure 9.6.13 shows that there are seven towns on the island. Suppose that a cartographer must produce a colored map in which no two towns that share a boundary have the same color. To keep costs down, she wants to minimize the number of different colors that appear on the map. How many colors are sufficient? For Euler Island, the answer is three. Although it might not be obvious, this is a graph problem. We can represent the map with a graph, where the vertices are countries and an edge between two vertices indicates that the two corresponding countries share a boundary of positive length. The graph corresponding to the map of Euler Island is Figure 9.6.14.
Given an undirected graph , find a “coloring function” from into a set of colors such that and has the smallest possible cardinality. The cardinality of is called the chromatic number of ,.
A coloring function onto an -element set is called an -coloring.
In terms of this general problem, the chromatic number of the graph of Euler Island is three. To see that no more than three colors are needed, we need only display a 3-coloring: blue,red, and white. This coloring is not unique. The next smallest set of colors would be of two colors, and you should be able to convince yourself that no 2-coloring exists for this graph.
In the mid-nineteenth century, it became clear that the typical planar graph had a chromatic number of no more than 4. At that point, mathematicians attacked the Four-Color Conjecture, which is that if is any planar graph, then its chromatic number is no more than 4. Although the conjecture is quite easy to state, it took over 100 years, until 1976, to prove the conjecture in the affirmative.
The number 5 is not a sharp upper bound for because of the Four-Color Theorem.
This is a proof by Induction on the Number of Vertices in the Graph.
Basis: Clearly, a graph with one vertex has a chromatic number of 1.
Induction: Assume that all planar graphs with vertices have a chromatic number of 5 or less. Let be a planar graph. By Theorem 9.6.12, there exists a vertex with . Let be the planar graph obtained by deleting and all edges that connect to other vertices in . By the induction hypothesis, has a 5-coloring. Assume that the colors used are red, white, blue, green, and yellow.
If , then we can produce a 5-coloring of by selecting a color that is not used in coloring the vertices that are connected to with an edge in .
If , then we can use the same approach if the five vertices that are adjacent to are not all colored differently. We are now left with the possibility that ,,,, and are all connected to by an edge and they are all colored differently. Assume that they are colored red, white blue, yellow, and green, respectively, as in Figure 9.6.18.
Figure9.6.18.
Starting at in , suppose we try to construct a path that passes through only red and blue vertices. This can either be accomplished or it can’t be accomplished. If it can’t be done, consider all paths that start at , and go through only red and blue vertices. If we exchange the colors of the vertices in these paths, including we still have a 5-coloring of . Since is now blue, we can color the central vertex, , red.
Finally, suppose that is connected to using only red and blue vertices. Then a path from to by using red and blue vertices followed by the edges and completes a circuit that either encloses or encloses and . Therefore, no path from to exists using only white and yellow vertices. We can then repeat the same process as in the previous paragraph with and , which will allow us to color white.
A bipartite graph is a graph that has a 2-coloring. Equivalently, a graph is bipartite if its vertices can be partitioned into two nonempty subsets so that no edge connects vertices from the same subset.
Example9.6.20.A Few Examples.
The graph of the Three Utilities Puzzle is bipartite. The vertices are partitioned into the utilities and the homes. A 2-coloring of the graph is to color the utilities red and the homes blue.
For , the -cube is bipartite. A coloring would be to color all strings with an even number of 1’s red and the strings with an odd number of 1’s blue. By the definition of the -cube, two strings that have the same color couldn’t be connected since they would need to differ in at least two positions.
Let be a set of 64 vertices, one for each square on a chess board. We can index the elements of by = the square on the row , column . Connect vertices in according to whether or not you can move a knight from one square to another. Using our indexing of , if and only if and is a bipartite graph. The usual coloring of a chessboard is valid 2-coloring.
An undirected graph is bipartite if and only if it has no circuit of odd length.
Proof.
() Let be a bipartite graph that is partitioned into two sets, R(ed) and B(lue) that define a 2-coloring. Consider any circuit in . If we specify a direction in the circuit and define on the vertices of the circuit by
the next vertex in the circuit after
Note that is a bijection. Hence the number of red vertices in the circuit equals the number of blue vertices, and so the length of the circuit must be even.
() Assume that has no circuit of odd length. For each component of , select any vertex and color it red. Then for every other vertex in the component, find the path of shortest distance from to . If the length of the path is odd, color blue, and if it is even, color red. We claim that this method defines a 2-coloring of . Suppose that it does not define a 2-coloring. Then let and be two vertices with identical colors that are connected with an edge. By the way that we colored , neither nor could equal . We can now construct a circuit with an odd length in . First, we start at and follow the shortest path to . Then follow the edge , and finally, follow the reverse of a shortest path from to . Since and have the same color, the first and third segments of this circuit have lengths that are both odd or even, and the sum of their lengths must be even. The addition of the single edge shows us that this circuit has an odd length. This contradicts our premise.
Use Euler’s formula to prove by contradiction that a is nonplanar. This shows that a is the largest complete graph that is planar.
Answer.
A has 10 edges. If a is planar, the number of regions into which the plane is divided must be 7, by Euler’s formala (). If we re-count the edges of the graph by counting the number edges bordering the regions we get a count of at least . But we’ve counted each edge twice this way and the count must be even. This implies that the number of edges is at least 11, which a contradiction.
Suppose that all of the vertices of connected planar graph have degree 3 and that there are 20 vertices. How many edges and regions does this graph have?
Suppose that is not connected. Then is made up of 2 components that are planar graphs with less than edges, and . For let and be the number of vertices, regions and edges in . By the induction hypothesis, for .
One of the regions, the infinite one, is common to both graphs. Therefore, when we add edge back to the graph, we have ,, and .
A graph is said to be a perfect graph if its chromatic number is and it contains a as a subgraph. For example, a cycle graph of length 5 is not perfect because its chromatic number is three but it has no as a subgraph. Find a graph with chromatic number four that is not perfect.
Let with , and let be the set of all undirected edges between distinct vertices in . Prove that either or is nonplanar.
Answer.
Since , either or has at least elements. Assume that it is that is larger. Since is greater than for, would be nonplanar. Of course, if is larger, then would be nonplanar by the same reasoning. Can you find a graph with ten vertices such that it is planar and its complement is also planar?
Prove that a bipartite graph with an odd number of vertices greater than or equal to 3 has no Hamiltonian circuit.
Answer.
Suppose that is bipartite (with colors red and blue), is odd, and is a Hamiltonian circuit. If is red, then would also be red. But then would not be in , a contradiction.
Suppose you had to color the edges of an undirected graph so that for each vertex, the edges that it is connected to have different colors. How can this problem be transformed into a vertex coloring problem?
Answer.
Draw a graph with one vertex for each edge, If two edges in the original graph meet at the same vertex, then draw an edge connecting the corresponding vertices in the new graph.
Suppose the edges of a are colored either red or blue. Prove that there will be either a “red ” (a subset of the vertex set with three vertices connected by red edges) or a “blue ” or both.
Suppose six people are selected at random. Prove that either there exists a subset of three of them with the property that any two people in the subset can communicate in a common language, or there exist three people, no two of whom can communicate in a common language.
Let be a positive integer, and let be positive integers greater than or equal to two. The mesh graph has vertices of the form where . Two vertices and are adjacent if and only if . In other words, two adjacent vertices must differ in only one coordinate and by a difference of 1.
The chromatic number will always be two. One coloring of any of these graphs would be to color all vertices whose coordinate add up to an even integer one color and the other vertices whose coordinates have an odd sum some other color. This works because for any vertex, if the sum of coordinate is even, the adjacent vertices differ in exactly one coordinate by and so they have a coordinate sum that is odd.
If both and are odd, then does not have a Hamiltonian circuit. To see why, we can color vertices with an even coordinate sum white and the ones with a odd sum black. If and , then there are vertices. There will be white vertices and one fewer black one. Any circuit that starts and ends at any vertex must have an even number of vertices if we count the beginning/ending vertex once. This implies that a Hamiltonian circuit that includes all vertices cannot exist.
If either of the are even, does have a Hamiltonian circuit. There are many different possible circuits, but one of them, assuming is even, would be to start at , traverse the left border, the top border and the right border, leaving you at . then you can zig-zag back to visiting all of the vertices in the interior of the graph and the bottom border. This is is illustrated in the following graph of
A Hamiltonian circuit of as described in the text.
As in the two diminsional case there will be a Hamiltonian circuit if at least one of the are even.