1 Basic Results of Graph Theory Section 3.4 Basic Results of Graph Theory Purpose of Section: To formally introduce the symmetric relation of a (undirected) graph. We introduce such topics as Euler Tours, the Handshaking Theorem, and a simple illustration of Ramsey Theory. Introduction An Intel engineer designs a new revolutionary VSLI circuit. A computer scientist creates a computer network. A sociologist ponders a diagram illustrating the power structure of a large corporation. A biochemist discovers the physical structure of a complex molecule. What do all these patterns have in common? They are all examples of what is called a graph. You have already heard of the word graph in calculus in connection with the graphing of functions, but the graph we study here is a different kind of graph. Here, a graph refers to finite set of points, called vertices, along with lines or curves, called edges, connecting some or all of the nodes. Some graphs have only a few nodes and edges, others have hundreds and even thousands. Quite simply, the definition of a graph is as follows. Origins of Graph Theory The beginning of graph theory (as every mathematician knows) had its origins in the old city of Konigsberg in East Prussia (now Kaliningrad, Russia) which flourished in the 17 th and 18 th centuries, people would spend their evenings strolling throughout the city, crossing the seven bridges that spanned the Pregel river. The question asked was whether it was possible to start at one of the four land areas, cross each bridge exactly once, and return to the starting point. The Swiss mathematician Leonard Euler (1707-1783) learned of the problem and showed in a published paper 1 that for a stroller to cross each bridge exactly once and return to the starting point, each vertex (land mass) must be the meeting point of an even number (2,4,6, ) of edges (bridges). Since this was not the case for the Konigsberg bridges, such a stroll was impossible. Figure 1 gives a diagram of the Pregel river and adjoining four land masses, where we have also drawn a graph which Euler drew to solve the puzzle. The vertices 1,2,3,4 of Euler s graph represent the land masses, and the lines connecting the vertices represent the bridges. Note that some of the vertices are connected by more than one line. 1 Euler published his findings in a paper titled Solutio problematis ad geometriam situs pertinentis (The solution of a problem relating to the geometry of position) in the Proceedings of St. Petersburg Academy in 1741. That paper marked the beginnings of the subject of topology and graph theory.
2 Seven Bridges of Konigsberg and its Euler Graph Figure 1 The above historical account motivates the definition of a symmetric relation called a graph. Definition A graph ( V, E) finite set of edges joining pairs of vertices. graph with five vertices and eight edges 2 : V = = is a finite set V of vertices (or nodes) and a { a, b, c, d, e} (, ),(, ),(, ),(, ),(, ),(, ),(, ),(, ) { } E = a b a c a d b c b d b e c d c e The diagram below depicts a The order of a graph is the number of vertices in the graph and denoted by. The graph below is of order five, or = 5. Two vertices are called adjacent if there is an edge connecting the vertices. In the graph below, the vertices a and b are adjacent, but a and e are not. The degree of a vertex is the number of edges adjacent to the vertex. In the graph below, the vertex c has degree 3, b has degree 4, and e has degree 2. 2 We denote an edge connecting vertices a and b as ( a, b ). One could argue that this is poor notation since ( a, b ) is normally the notation for an ordered pair, meaning ( a, b) ( b, a). A better notation might be set notation { a, b }. However ( a, b ) is the accepted notation in graph theory so we adopt it.
3 The set of edges E is a symmetric relation on the vertices V (i.e E V V ), where two vertices a, b are related if and only if they are adjacent. That is( a, b) E. A few other glossary terms are: i a path in a graph is a sequence of vertices, such that from each vertex there is an edge to the next vertex i a graph is complete if every vertex is connected to every other vertex. i a graph is regular if every vertex has the same degree i a graph is planar if the graph can be drawn in the plane without intersecting edges i a cycle in a graph is a closed path i the girth of a graph is the shortest cycle in a graph i the diameter of a graph is the longest shortest path between vertices i the chromatic number of a graph is the smallest number required to color the vertices where adjacent vertices different colors. Example 1 Properties of a Graph For the graph in Figure 2 determine if the graph is complete, regular, and planar. Then find the girth, diameter, and chromatic number of the graph.
4 Solution Typical Graph Figure 2 complete: the graph is not complete (several vertices are not adjacent). regular: the graph is not regular ( a has degree 2, b has degree 4) planar: the graph is planar (edges do not intersect) girth: the shortest cycle has length 3; the path abc is a 3-cycle diameter: the shortest paths between vertices have lengths 1,2,3,4 and so the longest shortest path is 4 (the path abdg has length 4) chromatic number: it requires 3 colors, to color the vertices so adjacent vertices have different colors. Try it. Note: The study of graphs, or what is generally called graph theory, is a study in pure mathematics, completely divorced from the real world. However, that said, we are free to interpret graphs in any manner we choose, thus allowing real-world interpretations to abstract constructions. It is these many interpretations that make graph theory so important from a practical point of view. Euler Tours One of the oldest problems in graph theory is the finding of an an Euler Tour (or Euler Path)? By a path in a graph, we mean a sequence of vertices, where succeeding vertices in the sequence are joined by an edge. Typical paths are shown for the graphs in Figure 3. Typical paths in two graphs Figure 3
5 So what do we mean by an Euler Tour? Definition: An Euler Path (or Euler Tour) in a graph is a path in the graph which passes through each edge exactly once, and then returns to the starting vertex. A graph that contains an Euler Tour 3 is called an Eulerian graph. (Note that the path may pass through a vertex more than once.) Before stating Euler s Theorem, we define a connected graph as a graph where any two vertices in the graph are connected by a path, otherwise the graph is disconnected. The graphs in Figures 2 and 3 are connected. Theorem 1: Euler s Theorem on Euler Tours If every vertex of a connected graph is even (i.e. degree 2,4,6, ), then the graph has an Euler Tour. What s more, the tour can start at any vertex. Proof: The verification of Euler s theorem is based on the simple observation that if every vertex is even, then a path can always leave every vertex that it approaches. Construction of an Euler Tour For a graph whose vertices are all even, the following steps indicate how an Euler tour can be found. 3 We prefer the label Euler Tour over Euler Path and Hamiltonian Tour over Hamiltonian Path..
6 Finding an Euler Tour When AllA Nodes are Even To find an Euler tour in the case all vertices are even, carry out the following steps: Step 1. Select any vertex at random as the starting point of the tour. This vertex will also be the end point of the tour. As an example, we find an Euler Tour for the graph in Figure (4a). Step 2. Starting at vertex 1, we travel (at random) along the unused edges until we reach a vertex, all of whose edges have been traversed. Since each vertex has an even degree, we must be back at the starting vertex. If the traversed path contains all the edges of the graph, we are done. (We have found an Euler tour 4.) However, if we arrive back at the starting vertex but have not traversed all the edges of the graph, such as in the case illustrated in Figure (4b), we then consider a new graph consisting of the vertices and edges that have not been traversed as shown in Figure (4c). We then begin anew and find an Euler tour in this new subgraph and insert it in the appropriate place in the original graph as shown in Figure (4d). Of course, it may be necessary to construct more than one subtour as we did in this example, but this can be done. Finding an Euler Tour Figure 4 4 If an Euler Tour exists it is not necessarily unique.
7 Note: Discrete D mathematics athematics, also called finite mathematics, is the study of mathematical structures which are finite or discrete in nature. Today s interest in discrete mathematics comes in great part from computers, which are inherently discrete, being ultimately based on on and off switches which give rise to 0 s and 1 s. A few active areas in discrete mathematics today are graph theory, abstract algebra, networks, combinatorics, coding theory, block designs, formal languages, and discrete probability theory. Handshaking Problem We learned from the Konigsburg bridge problem that the degree of the vertices of a graph plays an important role for many properties of a graph. The following theorem is another illustration of this idea. In this theorem, we call a vertex whose degree is an odd number (1,3,5, ) an odd vertex, and a vertex whose degree is an even number (0,2,4, ) an even vertex. Theorem em 2: Handshaking Theorem The number of odd vertices in any graph is an even number. Proof: We begin by drawing a graph with a given number of vertices and no edges. Note that every vertex has degree 0 and so the number of odd vertices is 0 (an even number). We will see that if we start adding edges to the graph, the number of odd vertices will either go up by 2 or down by 2, thus keeping the number of odd vertices an even number. In Figure 5a), we start with all vertices having degree 0, and so there are no vertices having odd degree. Hence the number of odd vertices is 0, an even number. Note by adding random edges to the graph, the number of odd nodes either goes up by 2 or down by 2, depending on whether the new handshakes are performed, respectively, by people have not yet shaken hands, or by people who have. This proof illustrates a common proof technique in graph theory, the idea of invariance. Starting with 0 odd nodes (an even number), for each edge added, although the number of odd nodes might change, the parity was invariant at an even number. In many cases, a graph may change but certain properties of the graph remain constant.
8 Handshaking Problem Figure 5 The theorem is called the Handshaking Theorem since it has an interpretation that in a social gathering, the number of people who shake hands an odd number of times (1,3,5, ) is an even number (0,2,4, ), regardless of the number of people at the gathering and regardless the number of handshakes. Ramsey Theory In 1928, English mathematician Frank Ramsey asked whether there is always some degree of order in any system, however disorderly. Ramsey sought out patterns in sets of randomly selected objects, whether they are groups of people, sequences of random numbers, or even stars in a night sky. He felt even the most disorderly systems should display some degree of order, and in the process he invented a new area of mathematics called Ramsey Theory. He read the results of his seminal paper on the subject before the London Mathematical Society at the age of 26, but died before it was published in their Proceedings. Some say Ramsey Theory has the uncanny ability to ask very simplelooking questions which turn out to defy all attempts to solve them. A simple Ramsey Theory problem related to graphs is the following. In any group of six people, there are either three (or more) who mutually know each other, or three (or more) who are strangers to one another. From a graph theory viewpoint, this statement translates into the fact that in a complete graph
9 (every vertex is connected to every other vertex) of order 6, where every edge is colored one of two colors, say red or black, the graph must contain either a red triangle or black triangle, where a single-color triangle means the three edges forming a triangle in the graph have the same color. Theorem 3: Six Person Problem A complete graph of order 3, 4, and 5 does not necessarily contain monochrome triangles, and that a graph of order 6 (or larger) must have at least one monochrome triangle. Proof: Figure 6 shows that for complete graphs of order N = 3,4, or 5 it is possible to color the edges so the graph does not contain monochrome triangles. No Monochrome Triangles for N = 3, 4,5 Figure 6 Now consider the complete graph of order 6 as shown in Figure 7. Starting at vertex 6, we know that at least 3 edges adjacent to vertex 6 must be colored either red or black. Without loss of generality we color the edges 1, 2 and 2,3 black or ( 6,1 ),( 6, 2 ),( 6,3 ) as red. Now we must color edges ( ) ( ) else we get monochrome triangles. But then we are forced to color edge 1,3 either red or black, which in either case leads to a monochrome triangle. ( )
10 Complete Graphs of order 6 must contain a monochrome triangle Figure 7
11 Problems For Problems 1-9, determine whether the given graph has an Euler tour and if so find one. 1. 2,
12 3. 4. 5.
13 6. 7. 8.
14 9. Hamiltonian Tour Another type of path or tour through a graph is the Hamiltonian Tour, which is a path that starts at a given note, traverses each node (not edge) exactly once, and then returns to the starting node. A graph that contains a Hamiltonian Tour is called a Hamiltonian Graph. Unfortunately, unlike Euler Tours, there is no known simple test for determining if a graph has a Hamiltonian Tour For Problems 10-19, find, if there is one, a Hamiltonian Tour in the given graph. 10. 11.
15 12. 13. 14.
16 15. 16. 17.
17 18. 19. 20. Graph Properties Determine whether the graphs in Problem 1-5 are complete, planar and regular. Then find the diameter, girth, and chromatic number of the graph. 21. Draw all possible graphs with three nodes. Hint: There are four of them. 22. Draw all possible graphs with four nodes. Hint: There are 11 of them, 1 with no edges, 1 with one edge, 2 with two edges, 3 with 3 edges, 2 with 4 edges, 1 with 5 edges, and 1 with 6 edges. 23. Hamilton s Famous Puzzle In 1859, Irish mathematician William Rowan Hamilton (1805-1865) marketed a puzzle shaped as a regular dodecahedron, a solid with 12 sides, each side having the shape of a regular pentagon, as illustrated in Figure 8a). A name of a city was assigned to each corner of the dodecahedron. The object of the puzzle was to start at any city, find a route along the edges of the dodecahedron that visits each city, and end back at the starting city. Such a path is a Hamiltonian tour. The planar representation of
18 a dodecahedron is shown in Figure 8b). Can you find a Hamiltonian tour of this puzzle? Planar representation of a dodecahedron Figure 8 Historical Note: William Rowan Hamiltonian (1805-1865) is Ireland s greatest mathematician. In 1859 Hamilton marketed a puzzle that had the shape of a regular dodecahedron (a solid figure with 12 sides, each side having the shape of a regular pentagon). The object of the puzzle was to find a route along the edges of the dodecahedron (which were labeled as cities of Europe) and end at the same point (city). 24. Delivery Problem The map shown in Figure 9 shows a grid of streets for which the mail must be delivered on both sides of each stree. Find a delivery route in which each side of a street is traversed exactly once: Draw a graph that represents the grid of streets and find an Euler tour of the graph.
19 City streets in a mail delivery route Figure 9 25. Open Problems in Graph Theory If you Google the following phrase, you will find websites 5 that list unsolved problems in graph theory. Look at one that interests you and rewrite the problem in your own language. If you have any bright ideas on how such a problem might be approached, write them down too. Some terms may be unfamiliar to you, but you can google them as well and learn of their meaning. 26. Tours of Platonic Solids The graphs in Figure 10 are planar representations of the five platonic solids; the tetrahedron, cube, octahedron, dodecahedron, and icosahedron. Tell if each has Euler and Hamiltonian tours. If so, find one. Five Platonic Solids Figure 10 5 Rutgers University has a nice site.