1 Table of content 1. 2. Graph...................................................................................................................... 2 Definition 1.1 : of Graph........................................................................................ 2 Definition 1.2 : Loop .............................................................................................. 5 Definition 1.3 : Isomorphic graph ......................................................................... 6 Definition 1.4 : Degree of vertex........................................................................... 7 Theorem 1 : Handshaking Lemma for vertices ..................................................... 8 Definition1.5 : Path ............................................................................................... 9 Definition1.6 : Cycle .............................................................................................. 9 Definition 1.7 : Connected graph ........................................................................ 10 Planar graph ......................................................................................................... 11 Face ...................................................................................................................... 12 Definition 2.2 Degree of face .............................................................................. 13 Theorem 2.1: Handshaking Lemma for faces ..................................................... 13 Theorem 2.2: Euler’s formula of graph theory ................................................... 13 Corollary of Euler’s formula ................................................................................ 14 Theorem 2.3: Kuratowski’s Theorem. ................................................................. 16 3.Platonic Solid ............................................................................................................. 17 Theorem 3.1 : There are only 5 platonic solids ............................................... 18 1 2 1. Graph 1.1 Definition of Graph A Graph G is an order pair of G= (V, E), where V is a set of elements called vertices and E is a set of 2-element subset of V called edges. Undirected graph The elements in E are not ordered pairs in, i.e. {A,B} = {B,A} in E for any A, B ∈ ๐ Königsberg bridge problem: Is it possible to cross every bridge exactly once for a walk? 2 3 Does there exist a path that traverses every edge once and only once? V={A,B,C,D} , E={{A,B},{A,C},{A,D},{B,C},{B,D},{C,D}} Both graph above are the same even the edge intercept differently, since the connections between vertices are the same. 3 4 Directed graph / digraph The elements in E are not ordered pairs in, i.e. {A,B} ≠ {B,A} in E for any A, B ∈ ๐ 4 5 Problem: A thief wants to break into a room, but he does not have the password. The keypad has only 0 and 1 digits. If the length of the password is 3 and the room will open as long as a correct sequence is input e.g. if the password is 100, when you input 0100, the room will also open. What is the minimum number of digits that required trying all the combinations of the passwords? In the figure, each vertex is a two-digit number. The label on the edge is the digit you type. Every vertex has only two outward direction arrows which are also called outdegrees since you can type either 1 or 0. If the right-most digit of a vertex ๐1 is the same as the left-most digit of a vertex ๐2 . Then an ordered pair {๐1 , ๐2 } is an edge. If we start with 00, then go through every edge once, the result consists all the combinations of length 3 digits. E.g. Start at “00” Accumulated digit typed: 00 Go from “00” to “01” Accumulated digit typed: 00 1 Go from “01” to “11” Accumulated digit typed: 0011 Go from “11” to “11” Accumulated digit typed: 00111 Go from “11” to “10” Accumulated digit typed: 001110 Go from “10” to “01” Accumulated digit typed: 0011101 Go from “01” to “10” Accumulated digit typed: 00111010 Go from “10” to “00” Accumulated digit typed: 001110100 Go from “00” to “00” Accumulated digit typed: 0011101000 Other related questions: The wolf, cabbage, goat and farmer cross the river. There is only one boat and the boat capacity is two. If the wolf is left with the goat, goat will be eaten, if the cabbage is left with the goat, the cabbage will be eaten. How should the farmer cross the river so that all things are safe? (State graph: Vertices representation different states on one chosen side.) Definition 1.2 : Loop Let E be a set of edges for some Graphs. For any {A, B} ∈ ๐ธ, ๐๐ ๐ด = ๐ต then {A, B} is called a loop 5 6 The edge {A,A} is a loop A simple digraph Not a simple graph since more than one edges Vertex A has only one edge outward and one between vertices A and B. This is also called inward. multigraph. Definition 1.3 : Isomorphic graph Two graphics ๐บ1 = (๐1 , ๐ธ1 ), G2 (๐2 , ๐ธ2 ) having the same structure which is isomorphic if there exists a bijective function f: ๐1 → ๐2 , 6 7 {x, y} ∈ E1 โบ {f(x), f(y)} ∈ E2 Adjacent Two vertices ๐ฃ1 , ๐ฃ2 are adjacent if {๐ฃ1 , ๐ฃ2 } ∈ ๐ธ . For direction graph, if either {๐ฃ1 , ๐ฃ2 } ∈ ๐ธ ๐๐ {๐ฃ2 , ๐ฃ1 } ∈ ๐ธ then ๐ฃ1 , ๐ฃ2 are adjacent. Example: A and B are adjacent. B and C are adjacent. B and D are adjacent. But A and C are not adjacent though there is a “path” from A to C (A->B->C). Definition 1.4 : Degree of vertex The degree of a vertex ๐ฃ1 is the number of edge ends at ๐ฃ1 . For digraph, there are indegree and outdegree, which are number of edges that start and end at the vertex respectively. Remark: 1. A vertex that has degree 0 is said to be isolated. 2. In this note the degree of vertex v is denoted by deg(v) 3. For a loop, the edge on a vertex has to be counted twice. 7 8 Degree of A=3, outdegree of A=2, indegree of A=1 Example: In the graph, the vertices are names of some children. There are edges between two children if they are friends. Which children have the least number of friends? How about the most? Since Peter has the least edge, he has the least friends. And Ben, Tom and Chris have the highest degree, and they have the most friends. Theorem 1: Handshaking Lemma for vertices Let G=(V,E) be a graph with ๐ = (๐ฃ1 , ๐ฃ2 , … , ๐ฃ๐ ), then n 2|E| = ∑ deg(๐ฃ๐ ) i=1 Proof: For each edge, it is incident to two vertices, so the sum all the degree of vertices will double count the each edge twice. For loops, the degree will add two to the same vertex so the equation still holds. 8 9 Example: In a party, assume everyone only shake hands with the same person once. If the number of handshake for each person is an odd number, then let the number of handshake be (2ai + 1) for i = 1,2, … , n , where n is number of people in the party. Consider the people as a set of vertices and if two people have handshake, then they have edge connected. Then by the handshaking lemma, we have n 2|E| = ∑ deg(๐ฃ๐ ) = 2(๐1 + ๐2 + โฏ + ๐๐ ) + ๐ i=1 Therefore, the number of people must be even. Try it: What can you say about the number of vertices that have odd degree? 1.5 Definition of Path A Path P in a graph is a sequence of vertices (๐ฃ0 , ๐ฃ1 , ๐ฃ2 , … , ๐ฃ๐ ) such that {๐ฃ๐ , ๐ฃ๐+1 } ∈ ๐ธ for i = 0,1,2, … , n − 1 A path that pass through all edges and vertices Since {๐ด, ๐ถ} ∉ ๐ธ , this is not a path Path (A,B,E,D,C) Red lines are paths, black lines are edges Definition 1.6 Cycle For a path (๐ฃ0 , ๐ฃ1 , … , ๐ฃ๐ ), if ๐ฃ0 = ๐ฃ๐ , then the path is called a cycle. If there is no repeated edges and vertices in a path (except v1 and vn ), then it is called a simple cycle or circuit 9 10 The path (A,B,C,D,E,F,B,A) is a cycle The path (B,C,D,E,F,B) is a cycle 1.7 Definition of connected graph A graph ๐บ = (๐, ๐ธ) is connected if ∀๐ฃ1 , ๐ฃ2 ∈ ๐ ๐๐๐ ๐ฃ1 ≠ ๐ฃ2 , ๐กโ๐๐๐ ๐๐ฅ๐๐ ๐ก๐ ๐๐ ๐๐๐๐ ๐๐๐ก๐ค๐๐๐ ๐ฃ1 ๐๐๐ ๐ฃ2 A digraph is strongly connected if it is connected and there exits edges in both direction for ๐ฃ1 ๐๐๐ ๐ฃ2 A digraph is weakly connected if it is connected but not strongly connected. So for a connected graph, for any vertices ๐ฃ1 , ๐ฃ2 , there exists a path starts from ๐ฃ1 and ends at ๐ฃ2 . 10 11 A connected graph A disconnected graph: no path from vertices A to D Example: Let ๐บ = (๐, ๐ธ)be a simple graph. ๐ = {๐, ๐, ๐, ๐, ๐, ๐}, ๐ธ = {{๐, ๐}, {๐, ๐}, {๐, ๐}, {๐, ๐}} Is G connected? Since there is no edge in E on d, so there is no any path from vertices a to d. Therefore, the graph is disconnected. 2. Planar graph Definition 2.1 :Planar graph is a graph that can be drawn on a plane such that edges do not intercept with others. Examples of planar graph 11 12 Example: Is the following a planar graph? Yes. Since for this graph, we can redraw such that no edges intercepting, while the graph representing the same vertices V and edges E. Face The region that is separated by the edges of a planar graph is called face. The bounded face is called interior face. And the unbounded face is also counted and called exterior face. Only 1 face which is There are two faces, one Also two faces, the edge between vertices C exterior exterior (face2) and one & E does not form a new face interior (face1). 12 13 One exterior face only. Definition 2.2 Degree of face The degree of face is the number of edges across in a boundary walk. The degree of f1 = length of “AF-FH-HI-IO-ON-NO-OI-IB-BA” (red line), which is 9. The degree of f2 = length of “AF-FH-HI-IM-MI-IB-BA” (blue line), which is 7. Theorem 2.1: Handshaking Lemma for faces Let G=(V,E) be a graph, denote all the faces by ๐1 , ๐2 , … , ๐๐ , then 2|E| = ∑ni=1 deg(๐๐ ) Proof: For each edge, it is contact to exactly two faces. (For edge that contact to one face, it will contribute two to the degree of face.) Therefore, the sum of degree of faces will be the double of the number of edges. Theorem 2.2: Euler’s formula of graph theory For a connected planar graph G, we have v−e+f=2 where v is the number of vertex, e is number of edge and f is number of face. 13 14 Proof: This will be proved by induction on the number of edges. Since when adding a loop to the graph, it will increase the number of edges and face each by 1. Then the formula v – (e+1) + (f+1) = v − e + f = 2 still holds. Therefore we can assume there are no loops. When the number of face is 1, it is an exterior face. For a connected planar graph G= (V,E) , since it is connected, there is no simple cycle, and we have v vertices and v-1 edges for some v ∈ โ. Therefore v – e + f = 1 + 1 = 2. Assume the formula is true for some positive integer k. For any graph that has k+1 faces, since number of face= k+1 ≥ 2, there is a simple cycle. Then we can remove an edge that connects two faces to form a new graph G’. The number of edges (let it be e’) and faces (let it be f’) of G’ will both decrease by one. Since G’ has k face, by induction hypothesis, i.e. v – e’ + f’=2, G’ satisfied the formula. Since e’=e-1 and f’=f-1, we have v - ( e – 1 ) + ( f – 1 ) = 2. Hence, v – e + f =2. Corollary of Euler’s formula Corollary 1: Let G be a connected planar graph, with v vertices, e edges and f faces. If ๐ฃ ≥ 3 , then ๐ ≤ 3๐ฃ − 6. Proof: Since ๐ฃ ≥ 3, each face has at least degree 3. Then sum of degree of faces is at least 3f. So by the handshaking lemma, we have 2๐ ≥ 3๐. And from Euler’s formula, we have ๐ = ๐ − ๐ฃ + 2 , which implies 2๐ ≥ 3๐ − 3๐ฃ + 6 ⇒ ๐ ≤ 3๐ฃ − 6. Corollary 2: Let G be a planar graph, then there exists a vertex with degree less than 6. Proof: For a connected planar graph with v vertices, e edges and f faces. If v < 3, it is obviously true. So assume ๐ฃ ≥ 3. Then by Corollary 1, we have ๐ ≤ 3๐ฃ − 6, which implies 2๐ ≤ 6๐ฃ − 6. If all vertices have degree 6 or above, then by handshaking lemma, we have 2๐ ≥ 6๐ฃ together with Corollary 1 yields a contradiction. Therefore, it is impossible for all vertices having degree 6 or above. For disconnected graph, we can consider each subgraph that is connected. Therefore, we can also find a vertex with degree less than 6. 14 15 Corollary 3: Let G be a connected planar graph, with v vertices, e edges and f faces. If ๐ฃ ≥ 3 and all simple cycles with length ≥ 4, then ๐ ≤ 2๐ฃ − 4. Proof: Since each simple cycle has at least length 4, the degree of each face is also at least 4. Then by handshaking lemma for faces, we have 2๐ ≥ 4๐. By Euler’s formula, we have f = e – v +2. So 2๐ ≥ 4๐ − 4๐ฃ + 8, then ๐ ≤ 2๐ฃ − 4. Corollary 4: Let G be a connected planar graph, with v vertices, e edges and f faces. If ๐ฃ ≥ 3 and all simple cycles with length ≥ 4, then there exists a vertex with degree less than 4. Example 1: K 5 is not a planar graph. K n means that there are n vertices and there are edges between all distinct vertices. For K 5 , there are 5 vertices and 1+2+3+4=10 edges. And it is a connected graph with vertices more than 3. But 3๐ฃ − 6 = 9 < 10 = ๐, so Corollary 1 implies K 5 is not a planar graph. Example 2: There are three household and they need water supply, electricity supply and tower gas supply. Assume for each supply (water, electricity and tower gas), there are only one supply plant. If you would like to use a graph to represent the connection, is it possible that there is no edges intersect? This is equivalent to determine whether the graph is a planar graph. Denote the three households as A = {v1,v2,v3} and the three plants as B ={v4,v5,v6}. There is an edge between two vertices only if the vertices are in different sets of A, B. It is obvious that it is connected graph. Besides, for any simple cycle starting from ๐ฃ๐ (๐ฃ๐ , ๐ฃ๐1 , … , ๐ฃ๐๐ , ๐ฃ๐ ), assume ๐ฃ๐ ∈ ๐ด then ๐ฃ๐1 ∈ ๐ต, then ๐ฃ๐2 ∈ ๐ด, since no repeated edge for a simple cycle, , so ๐ฃ๐2 ≠ ๐ฃ๐ . Similarily, ๐ฃ๐ ≠ ๐ฃ๐3 ∈ ๐ต . And so, the simple cycle has at least length four. If the graph is planar, then by corollary 2, we have ๐ ≤ 2๐ฃ − 4. But in this graph there are 6 vertices and 3x3=9 edges, i.e. 2๐ฃ − 4 = 8 < 9 = ๐. Therefore, this graph is not planar and cannot be drawn without edges intersect. Remark: 1. In example 2, it is a graph called K 3,3 which vertex set V has two subsets (partition) of vertices ๐1 ๐๐๐ ๐2 , each having 3 elements such that there is an 15 16 edge between two vertices only if the vertices are in different sets of ๐1 ๐๐๐ ๐2 . Theorem 2.3: Kuratowski’s Theorem A graph is not planar if and only if it contains a subgraph that is a subdivision of ๐พ5 or ๐พ3,3. 16 17 3.Platonic Solid A platonic solid is a regular convex polyhedron. The faces are regular polygons and having the same number of edges meeting at every vertex. Remark: Convex: For any two points on the surfaces of the polyhedron, the line segment joining them is inside the polyhedron. Example: (from Wikipedia) (from Wikipedia) Not convex which is not a platonic solid/not all Tetrahedron vertices have the same number of edges intercepting Converting a platonic solid onto a planar graph Consider the solid is made of stretchy material. Then make a hole on one face and pull the face very large, such that the solid becomes flat. Then it becomes a planar graph with the exterior face being the original face having the hole. E.g. Other insight: Consider there is a sphere surround the solid, then you can project the 17 18 vertices and edges to the sphere which forms a planar graph. Theorem 3.1 : There are only 5 platonic solids Proof: 1. The degree of vertex is constant since every vertex has the same number (say d) of edges intercepting for a convex polyhedron, then by handshaking lemma 2e = dv where e is number of edges and v is number of vertices. 2. Since each face are the same polygon, the degree (say s) of faces is constant and so by handshaking lemma for face, we have 2e = sf where e is number of edges and f is number of faces. 3. Since it is a planar graph, by Euler’s formula, we have v−e+f= 2 Then 2e 2e −e+ =2 d s 1 1 1 1 + − = d s 2 e This implies if d and s are determined, e is also determined, and hence v and f. So (s,d) ⇒ as an order pair is sufficient to describe a platonic solid. And for faces, the degree of faces (s) should be at least three, since it is a regular polygon. Since the solid is 3D. We must have at least 3 edges (d) intercepting one vertex. When d=3, 1 1 1 − = s 6 e Since e must be positive, 1 1 − >0 s 6 ⇒6>๐ ⇒ So the value of s is at most 5. Similarly, when d=4, s is at most 3, when d=5, s is also at most 3. Since the formula is “symmetric” for d and s, so we have the same conclusion. 18 19 Therefore, we have d (deg(v)) s (deg(f)) v e F 3 3 4 6 4 3 4 8 12 6 3 5 20 30 12 4 3 6 12 8 5 3 12 30 20 19 Picture(Wolfram Mathworld) 20 Concave polyhedron (Kepler-Poinsot Solid) (from Wolfram Alpha) 20