WUCT121. Discrete Mathematics. Graphs

Size: px
Start display at page:

Download "WUCT121. Discrete Mathematics. Graphs"

Transcription

1 WUCT121 Discrete Mathematics Graphs WUCT121 Graphs 1

2 Section 1. Graphs 1.1. Introduction Graphs are used in many fields that require analysis of routes between locations. These areas include communications, computer networks and transportation. Diagrammatically a graph is drawn as points representing locations and lines or curves which represent connections between locations. The points are known as vertices and the lines are called edges. WUCT121 Graphs 2

3 Example: v 2 e 1 e 7 e 8 e 2 e 3 e 6 e 4 e 5 v 5 v 3 v 4 e 9 Each of the v i are vertices and the e i are the edges. In this example, the single point is called a vertex. ( 1 v 2 v, ) is an edge and is written as e = v, ) 1 ( 1 v2 Further we say e 1 is incident on and v 2, and also that and v 2 are incident on e 1. and v 2 are incident on the same edge e 1 so and v 2 are said to be adjacent vertices. Similarly, e 1 and e 2 are each incident on v 2, and so e 1 and e 2 are said to be adjacent edges. WUCT121 Graphs 3

4 1.2. Definitions: Graph. A graph G consists of a pair of non-empty finite sets V and E. V is the set of vertices and E is the set of edges of G. The elements of E are pairs of elements of V. Thus to determine a graph a set of vertices and a set of edges is required. To determine a set of edges a set of pairs of vertices is required Parallel Edges. If two distinct edges have the same pair of endpoints, then the edges are said to be parallel. Example: In the previous graph, e 2 and e 8 are parallel edges Loops. An edge which is defined by a single vertex is called a loop. A vertex which is the endpoint of a loop is said to be adjacent to itself. e 1 WUCT121 Graphs 4

5 Exercises: Draw a graph which has 4 vertices, 1 loop and one pair of parallel edges. Write down one pair of adjacent vertices and one pair of adjacent edges. e 1 e 2 v 2 e 3 e 4 V = v, v, v, }. { v4 Loop: e = v, ) 1 ( 1 v1 Parallel Edges: e 3 and e 4. and v 2 are adjacent vertices. e 1 and e 2 are adjacent edges v 3 4 e 5 v WUCT121 Graphs 5

6 Write down the set V of vertices and the set E of edges for the following graph, G 1. v 3 v 4 e 5 e 6 e 3 e 4 e 1 e 2 v 2 { v, v, v v } V = 1 2 3, 4, E = { e, e, e, e, e, e } 1 = {( v 1 2, v ), ( v 1, v ), ( v 2, v 4 ), ( v 2, v 4 ), ( v 1, v 2 ), ( v 3, v 4 )} WUCT121 Graphs 6

7 Is the following graph G 2 the same as the previous graph G 1? e 1 e 5 v 4 e 2 e 3 e 4 v 3 e 6 v 2 Yes Notes: There is no vertex of intersection. In the previous graph G 1, where the edges e 5 and e 6 cross is not a vertex. vertex. The vertices determine the edges. Parallel loops are loops incident on the same vertex. A vertex without any edges is called an isolated A graph need not be connected, that is, it need not be in one piece. WUCT121 Graphs 7

8 Exercises: Draw a graph which has 6 vertices, 1 pair of parallel loops, 1 pair of parallel edges, one isolated vertex and which is made up of 3 pieces or components. e 1 e 2 e 5 v 3 v 2 v 6 e 3 e 4 v 5 e 6 v 4 WUCT121 Graphs 8

9 Degree. The degree of a vertex v, written δ (v), is the number of edges incident on v. Notes: δ ( v) = If v is a vertex with a single loop as its edge, then 2. The reason for this convention is that each edge other than a loop is incident on 2 vertices. So, for consistency, the single vertex of a loop should be thought as both starting and ending point for the loop. Each loop incident on vertex v will contribute 2 to the value of δ (v). Example: What is the degree of in the following graph? e 1 e 2 v 2 e 3 v 3 δ ( ) = 4 WUCT121 Graphs 9

10 Exercises: Write down the degree of each of the vertices in the following graphs: v 4 e 5 e 6 e 3 e 4 e 1 v 3 e 2 v 2 δ ( v ) =, δ ( v ) = 4, δ ( v ) = 4, δ ( v ) = e 1 e 2 e 3 v 2 v 4 e5 e 4 δ δ ( v1 ) = 5, δ ( v2 ) = 3, δ ( v3 ) = 2, δ ( v4 ) ( v ) = 1, δ ( v ) = 1 5 v 5 6 e 6 v 6 v 3 = 0, WUCT121 Graphs 10

11 For each of the above graphs calculate δ ( ) k i= 1 k = 4 in the first graph and k = 6 in the second k 4 i i = 1 i = 1 The first graph, ( v ) = δ ( v ) = 12 δ. k 6 i i = 1 i = 1 The second graph, δ ( v ) = δ ( v ) = 12 i i v i, where Note: The first graph was a connected graph and 4 i= 1 ( ) = 2 6 = 12 = 2 number of edges δ. v i The second graph is disconnected and 6 i = 1 ( ) = 2 6 = 12 = 2 number of edges δ. v i Is this formula always true? WUCT121 Graphs 11

12 1.3. Euler s Laws Euler s First Law In any graph, the sum of the degrees of the vertices equals twice the number of edges. Proof: Each edge of a graph, including loops by convention, has two ends. Thus each edge contributes 2 to the sum of the degrees of the vertices, by adding 1 to each of its endpoints. Thus the sum of the degrees of the vertices equals twice the number of edges. The number ( v) G. δ is sometimes called the total degree of v V Euler's First Law could be summarised ( v) = m( E) 2 δ, v V where m ( E) is the number of edges of the graph. Exercises: Draw a graph with 4 vertices having degrees 1, 2, 0 and 2. 4 Since ( ) = 5 i = 1 v i δ (an odd number), this is not possible WUCT121 Graphs 12

13 Euler s Second Law In any graph, the number of vertices which have odd degree is even Exercises: Draw some different graphs each with 3 vertices having degrees 1, 2 and 3. e 1 v 2 e 2 e 3 v 3 e 1 v 2 e 2 e 3 v 3 Are these graphs the same? No WUCT121 Graphs 13

14 1.4. Simple Graphs and Sub-Graphs Knowing the number of vertices in a graph and the degree of each vertex is not enough information to draw the graph in a unique way Simple Graph A graph which has neither loops nor parallel edges is called a simple graph. Example: e 1 v 2 e 2 v 4 Exercises: e 3 v 3 Draw a simple graph with 3 vertices having degrees 1, 2 and 3. Not possible WUCT121 Graphs 14

15 Sub-Graph Let G = V G, E } be a graph. { G H = V H, E } is said to be a sub-graph of G if { H 1. VH VG and 2. EH EG That is, H is a sub-graph of G if each of the vertices of H is a vertex of G, and each of the edges of H is an edge of G. Every graph G is a sub-graph of G Proper Sub-Graph Let G = V G, E } be a graph. { G H = V H, E } is said to be a proper sub-graph of G if { H 1. VH VG and 2. EH EG and 3. H G WUCT121 Graphs 15

16 Exercises: Let G be given by e 1 e 5 v 4 e 2 e 3 e 4 v 3 e 6 v 2 Draw the sub-graph H = {{ v1, v2, v3, v4}, { e3, e5, e6}} e 5 v 4 e 3 v 3 e 6 WUCT121 Graphs 16

17 1.5. Paths Let G = { V, E} be a graph and let u, v V. A path from u to v is an alternating sequence of vertices and edges of the form: u,, α n eα, vβ, eα, vβ, K, e v. Example: Consider the graph e 1 e 5 v 4 e 2 e 3 e 4 v 3 e 6 v 2 Suppose we want to walk from (the bar) to v 3 (67.107). How could we proceed? One possible path is, e2, v2, e6, v3. But, after an extra long lunch, one might take the following path, e1, v1, e5, v4, e3, v2, e4, v4, e3, v2, e6, v3. WUCT121 Graphs 17

18 Length of a Path Let G = { V, E} be a graph and let u, v V. A path of length n from u to v is an alternating sequence of vertices and edges of the form u, e, vβ, e, v, 1 α 2 β 2, e, 1 α n α K If we let u = v β0 and n v v = v then each edge defined by: e = ( v, v ), for i = 1Kn Example: α i β β β i 1 i e α is i The path, e2, v2, e6, v3 from the previous has length 2 The path, e1, v1, e5, v4, e3, v2, e4, v4, e3, v2, e6, v3 from the previous has length Open Path A path is open if finishes at different vertices. Example: u v. That is if the path begins and The path, e2, v2, e6, v3 is open since u = v v3 = v 1. The path, e1, v1, e5, v4, e3, v2, e4, v4, e3, v2, e6, v3 is open since u = v1 v3 = v. WUCT121 Graphs 18

19 Closed Path A path is closed if finishes at the same vertex. Example: u = v. That is if the path begins and The path, e2, v2, e3, v4, e5, v1 is closed since u = = v Simple Path Let G = { V, E} be a graph and let u, v V. A simple path from u to v is a path which does not contain a repeated edge nor a repeated vertex. Examples: The path, e2, v2, e6, v3 is simple since no vertices or edges are repeated. The path, e1, v1, e5, v4, e3, v2, e4, v4, e3, v2, e6, v3 is not simple since e 3 is repeated. WUCT121 Graphs 19

20 Exercises: Consider the graph e 1 e 5 v 4 e 2 e 3 e 4 v 3 e 6 v 2 Write down a simple path from: o to v 3 v 1 e2, v2, e6,, v 3 o v 4 to v, v 4 e5, 1 o v 4 to v 2 v, v 4 e3, 2 WUCT121 Graphs 20

21 1.6. Connected Graphs Definition Let G = { V, E} be a graph. A pair of vertices u, v V are said to be connected if there exists a path from u to v. The graph G is said to be connected if and only if u, v V, there exists a path from u to v Connected Component Let G = { V, E} be a graph. A sub-graph H of G is said to be a connected component of G if 1. H is connected, and 2. there is no connected sub-graph of G which has H as a proper sub-graph. Notes: A graph is connected if and only if it has only one connected component Every graph is the union of its connected components. WUCT121 Graphs 21

22 Exercises: Consider the graph G. e 1 e 2 e 3 v 2 v 4 e5 e 4 v 5 e 6 v 6 v 3 Which of the following graphs are connected components of G? H 1 = {{ v4, v5, v6}, { e6}} No, there is no path from v 4 to v 5 H = {{ 4 }, { }} Yes 2 v H 3 = {{ v1, v2, v3}, { e3, e5}} No, H 3 is a proper sub-graph of H = {{ v1, v2, v3}, { e1, e2, e3, e4, e5}}, which is a connected sub-graph of G. WUCT121 Graphs 22

23 Exercises: Draw a connected graph having five vertices of degrees 1, 1, 2, 2, 2. v 2 e 1 e 2 v 3 e 4 e 3 v 5 v4 Draw a graph with two connected components, having five vertices. e 1 v 2 e 2 v 3 e 3 v 5 v4 WUCT121 Graphs 23

24 For the following graph: e 1 e 2 v 2 v 4 v 6 v 7 e 3 e 4 e 5 e 6 e 7 v 3 v 5 v 8 o Write down the connected components H H H = = = { v1, v2, v3}{, e1, e2, e3, e4 } { v4, v5, v6}{, e5, e6 } { v, v }{, e } o Write down two simple paths from to v 3 and one that is not simple. Simple:, e2, v2, e3, v3 and v 1, e2, v2, e4, v3 Not simple: v 1, e1, v1, e2, v2, e3, v3 o List two pairs of vertices that are not connected. v 2 and v 4, v 6 and v 8 WUCT121 Graphs 24

25 1.7. Isomorphic Graphs Example: Consider the following graphs, are they the isomorphic, i.e. the same? No. The left-hand graph has 5 edges; the right hand graph has 6 edges. WUCT121 Graphs 25

26 Firstly, label the graphs. It looks true, so check all the things we know: v 5 v 4 v v' 1 1 v 3 v 2 v' 4 v' 2 G G v ' 3 v ' 5 Number of vertices: both 5. Number of edges: both 5. Degrees of corresponding vertices: all degree 2. Connectedness: Each is fully connected. Number of connected components: Both 1. Pairs of connected vertices: All correspond. Number of loops: 0. Number of parallel edges: 0. Everything is equal and so the graphs are isomorphic. WUCT121 Graphs 26

27 More formally: G = { V, E} where V = v, v, v, v, } and E = {( v = { e 1 1, v, e 2 2 ), ( v, e G = { V, E } 3 2, e 4, v 3, e 5 { v5 ),( v } 3, v 4 ),( v 4, v 5 ),( v where V = { v, v, v, v v } E = {( v, v = { e, e, e, e, e } ), ( v , 5 5, v and, v ),( v, v 3 4 ),( v 4, v 5 1 )} ),( v5, v1 )}. Construct 2 functions: f : V V and g : E E f : V V g : E E V V E E e 1 e 1 v 2 v 2 e 2 e 2 v 3 v 3 e 3 e 3 v 4 v 4 e 4 e 4 v 5 v 5 e 5 e 5 WUCT121 Graphs 27

28 Definition Let G = { V, E} and G = { V, E } be graphs. G and G are said to be isomorphic if there exist a pair of functions f : V V and g : E E such that f associates each element in V with exactly one element in V and vice versa; g associates each element in E with exactly one element in E and vice versa, and for each v V, and each e E, if v is an endpoint of the edge e, then f (v) is an endpoint of the edge g (e). Notes: To prove two graphs are isomorphic you must give a formula (picture) for the functions f and g. If two graphs are isomorphic, they must have: - the same number of vertices - the same number of edges - the same degrees for corresponding vertices - the same number of connected components - the same number of loops WUCT121 Graphs 28

29 - the same number of parallel edges. Further, - both graphs are connected or both graphs are not connected, and - pairs of connected vertices must have the corresponding pair of vertices connected. In general, it is easier to prove two graphs are not isomorphic by proving that one of the above properties fails. WUCT121 Graphs 29

30 Exercises: Show that the following graphs are isomorphic. These two graphs each have - 4 vertices - 6 edges - vertices of degree 1, 3, 4 and 4-1 connected component - 1 loop - 1 pair of parallel edges The graphs can be labelled to illustrate their isomorphism: e 1 e 3 e 2 e 4 v 2 v 4 e 6 v3 e 5 e' 1 v' 4 e' 2 v' 1 G G e' 6 e ' 3 e ' 4 v ' 2 v ' 3 e ' 5 WUCT121 Graphs 30

31 Draw all possible graphs having 2 edges and 2 vertices; that is, draw all non-isomorphic graphs having 2 edges and 2 vertices. e 1 e 2 v 2 e 1 e 1 v 2 e 1 v 2 v 2 e 2 e 2 e 2 Since isomorphic graphs are essentially the same, we can use this idea to classify graphs. WUCT121 Graphs 31

32 1.8. Regular, Complete and Complete Bipartite Definition: Regular. A simple graph G = { V, E} is said to be regular of degree k, or simply k-regular if for each v V, δ ( v) = k. That is, if a graph is k-regular, every vertex has degree k. Exercises: Draw all 0-regular graphs with 1 vertex; 2 vertices; 3 vertices. 1 vertex: 2 vertices: v 1 v 2 3 vertices: v 1 v 2 v 3 Draw all 1-regular graphs with 1 vertex; 2 vertices; 3 vertices; 4 vertices. 1 vertex and 3 vertices not possible 2 vertices v 2 4 vertices v1 v2 v3 v4 WUCT121 Graphs 32

33 Draw all 2-regular graphs with 2 vertices; 3 vertices; 4 vertices. 2 vertices, not possible, δ ( v) = 2 2 = 4 v V 2 n( E) = 4, n( E) = 2, thus need parallel edges 3 vertices v 2 v 3 4 vertices v 3 v 2 v Definition: Complete. A simple graph G = { V, E} is said to be complete if each vertex of G is connected to every other vertex of G. The complete graph with n vertices is denoted K n. Notes: A complete graph is connected isomorphic n, two complete graphs having n vertices are For complete graphs, once the number of vertices is known, the number of edges and the endpoints of each edge are also known WUCT121 Graphs 33

34 Example: Draw K 5 v 5 v 2 v 4 v 3 Exercises: Draw K 1, K 2, K 3 and K 4. What is the degree of each vertex in each of the graphs drawn? K 1 : ( i ) 0 v 1 δ v = K2 : δ ( v i ) = v1 v2 1 K3 : δ ( v i ) = v 2 v 3 2 K4 : δ ( v i ) = 3 v 3 v 2 v 4 WUCT121 Graphs 34

35 Complete the following sentences: o A complete graph, K n, is an ( n 1) -regular graph. o A complete graph, K n, has n ( n 1) edges. [Use Euler s First Law: ( v) = 2n( E) Since K δ v V 2n n n ( v) = n( n 1) ( E) = n( n 1) ( ) 1 E = n( n 1) v V 1 2 has n vertices each of 2 δ.] degree ( n ) 1, WUCT121 Graphs 35

36 Definition: Bipartite. A simple graph G = { V, E} is said to be bipartite if there exists sets Notes: U V and W V, such that; 1. U W = V and U W = 2. every edge of G connects a vertex in U with a vertex in W. A bipartite graph G = { V, E} is one whose vertices can be separated into two disjoint sets, where every edge joins a vertex in one set to a vertex in the other u U, δ ( u) n( W ) and w W, δ ( w) n( U ) [ n (W ) is the number of elements in W] WUCT121 Graphs 36

37 Example: Consider the following graph G = { V, E}, where V = { u1, u2, w1, w2, w3}, is it bipartite? Yes u 1 u2 e 1 e 2 e 3 e 4 List the sets U and W. U = u 1, u } ; W = w, w, } Exercises: { 2 { 1 2 w3 Consider the following graphs, are they bipartite? If so write down the sets U and W. o w 1 w2 w3 u 1 u2 e 1 e2 w 1 w2 U = u 1, u } ; W = w 1, w } { 2 { 2 WUCT121 Graphs 37

38 o u 1 w 2 w 1 u 2 U = u 1, u }; W = w 1, w } { 2 { 2 Draw two bipartite graphs with 5 vertices. o Where U has 1 element and W has 4 elements. u 1 w1 w 2 w 3 w4 o Where U has 2 elements and W has 3 elements. u 1 u 2 w1 w 2 w 3 WUCT121 Graphs 38

39 Definition: Complete Bipartite. A simple graph G = { V, E}, is said to be complete bipartite if; Notes: 1. G is bipartite and 2. every vertex in U is connected to every vertex in W. A complete bipartite graph is one whose vertices can be separated into two disjoint sets where every vertex in one set is connected to every vertex in the other but no vertices within either set are connected. The symbol K n, m is used to denote the complete bipartite graph having n vertices in one set and m in the other. [Note that the comma is necessary!] u U, δ ( u) = n( W ) and w W, δ ( w) = n( U ) n ( E) = n m WUCT121 Graphs 39

40 Examples: Draw K 2, 2 Draw K 2, 3 K 2, 2 K 2,3 Exercises: Draw K 1, 3 K 1,3 Draw K 2, 4 K 2, 4 WUCT121 Graphs 40

41 Which of these graphs are bipartite. No w 3 u 1 w 1 u 3 u 2 Yes: U W = { u 1 = { w, u 1 2, w, u 2 3 }, w 3 } w 2 No WUCT121 Graphs 41

42 1.9. Eulerian Graphs. Problem 1: If you are walking in the park, can you cross each bridge exactly once? Does it depend on where you start? Could you do it with less bridges? Could you do it with more bridges? Problem 2: The Koenigsberg Bridge Problem. WUCT121 Graphs 42

43 Can you stroll around, crossing each bridge exactly once and return to your starting point? No one can do it. How do you prove it can't be done? If you're Leonhard Euler, you make some definitions, make the problem precise and prove a theorem! Redraw the problem as a graph: Definition: Circuit. Let G = { V, E} be a graph and let v V. A circuit in G is a path from v to v in which no edge is repeated. Note: A circuit is a closed path and in many books is called a cycle. WUCT121 Graphs 43

44 Exercises: Write down the circuits in the following graph, starting at the given vertices. o v 2 : v2, e3, v3, e4, v2 o : v1, e1, v1 o v 3 : v3, e4, v2, e3, v3 o v 7 : None Definition: Eulerian Path Let G = { V, E} be a graph. A path in G is an Eulerian path if every edge of G is included once and only once in the path. WUCT121 Graphs 44

45 Definition: Eulerian Circuit Let G = { V, E} be a graph. A circuit in G is an Eulerian circuit if every edge of G is included exactly once in the circuit Definition: Eulerian Graph Let G = { V, E} be a graph. G is an Eulerian graph if G has an Eulerian circuit. Exercises: Which of these graphs are Eulerian? K 3 K 4 v 2 v 3 Yes v 3 v v 2 4 No v 5 v 2 K 5 v 4 v K 3 2, 3 Yes No WUCT121 Graphs 45

46 Can you find an Eulerian path in the following graph that is not an Eulerian circuit? e 1 v 2 e 6 e 4 e 2 v 3 v 5 e 5 v 4 e 3 v, e v e v e v e v e v e v 4 3, 3, 2, 2, 4, 4, 5, 5, 6, 1, 1, 2 Is the graph Eulerian? No. In the Koenisberg Bridge Problem, we wanted to start and end at the same vertex. That is, we need to prove that the graph K is not Eulerian. How? Theorem: Euler's Theorem. Let G be a connected graph. G is an Eulerian graph if and only if the degree of each vertex is even. WUCT121 Graphs 46

47 For the Koenisberg Bridge Problem: δ ( C) = 3, so the graph is not Eulerian. Discussion: Is the connectedness condition in Euler's Theorem necessary? Consider the graph Each vertex has even degree but there is no Eulerian circuit. WUCT121 Graphs 47

48 In the Koenisberg Bridge setup, is it possible to cross each bridge exactly once without necessarily finishing where you start? That is, is there an Eulerian path in K? Theorem: Existence of Eulerian Path. A connected graph has an Eulerian path, which is not a circuit, if it has exactly two vertices of odd degree. Example: δ ( A) = 3; δ ( B) = 5; δ ( C) = 3; δ ( D) = 3 There are more than 2 vertices of odd degree; therefore, K does not have an Eulerian path. WUCT121 Graphs 48

49 1.10. Trees and Spanning Trees Definition: Tree. A tree is a connected graph which has no non-trivial circuits. Notes: In a graph, a path consisting of a single vertex is a trivial circuit. A graph is a tree if and only if it is circuit free and connected. A tree can contain a trivial circuit, thus a single vertex is a tree. Exercise: Which of these graphs are trees? G 1 G4,, G 6 WUCT121 Graphs 49

50 Trees can be used in conjunction with connected graphs Definition: Spanning Tree. A spanning tree for a graph G is a sub-graph of G which is a tree that includes every vertex of G. Notes. A spanning tree of a graph G is a maximal tree contained in the graph G. When you have a spanning tree T for a graph G, you cannot add another edge of G to T without producing a circuit. Exercises: Can you have a spanning tree for a graph that is not connected? No, by definition, a tree is connected. Does every connected graph have a spanning tree? Yes. Are spanning trees unique in each graph? No. WUCT121 Graphs 50

51 If not, do two spanning trees for the same graph have anything in common? They have the same number of edges. Find all spanning trees for the following graph. (There are 12) WUCT121 Graphs 51

52 Example: Consider the following graph, G, representing pairs of people (A, B, C, D and E) who are acquainted with each other. B C G: E A D We wish to install the minimum number of phone lines so that communication between these people is maintained. As an adviser, you need to find a spanning tree T for G. B C B C B C E E E A T 1 D A T 2 D A T 3 D How many edges does each tree have? 4 Note: Any two spanning trees will have the same number of edges. WUCT121 Graphs 52

53 To make the problem more practical: Suppose the cost involved in installing each line is not the same. How do you find the network having the least cost? Begin by putting the cost (in $100) along each edge. This results in a weighted graph. B 3 C 5 G: E A 3 D Calculating the cost for each tree: T 1 = = 12.5 T 2 = = 14.5 T 3 = = 12 The tree with the lowest cost" is called the minimum spanning tree. In this case, the minimum spanning tree is T 3. WUCT121 Graphs 53

54 When the graph has a large number of vertices, it is not easy to find all spanning trees. In fact, we are not usually interested in finding all spanning trees for a graph. We would like an algorithm which finds the minimum spanning tree for a weighted connected graph. Kruskal's Algorithm is one such algorithm Definition: Weighted Graph A weighted graph is a graph for which each edge has an associated real number, called the weight of the edge. The sum of the weights of all of the edges is the total weight of the graph. A minimum spanning tree for a weighted graph is a spanning tree that has the least possible total weight when compared with all other spanning trees for the graph. Note. If G is a weighted graph and e is an edge, then we will use w(e) to represent the weight of the edge e and w(g) to represent the total weight of the graph G. WUCT121 Graphs 54

55 Kruskal's Algorithm Example. Find the minimal spanning tree for the following connected weighted graph G. The starting point of Kruskal's Algorithm is to make an edge list, in which the edges are listed in order of increasing weights. WUCT121 Graphs 55

56 Kruskal's Algorithm then includes the 3 additional columns as follows: The minimum spanning tree is drawn below. Note that there are 4 edges in the minimum spanning tree. If the weighted connected graph G has n vertices, then the minimum spanning tree will always have n 1 edges. Knowing this fact, we need not have checked whether the edges e 6, e7, e8 in the table included in the example created a circuit. WUCT121 Graphs 56

57 Kruskal's algorithm will always produce a minimum spanning tree for any connected weighted graph G. The idea of the Kruskal's algorithm for finding a minimum spanning tree T of G is: To examine the edges of G one by one in order of increasing weight. At each step, the edge being examined is added to the sub-graph S (which will be made up of the edges of T), if the addition of this edge to S does not create a circuit. After n 1 edges have been added to S (where n is the number of vertices), then the edges of S together with the vertices of the graph G produce the required tree T. WUCT121 Graphs 57

58 Kruskal's Algorithm for finding minimum spanning trees for weighted graphs (Epp's version) is then: Input: G a connected weighted graph with n vertices. Algorithm Body: (Build a sub-graph T of G to consist of all of the vertices of G with edges added in order of increasing weight. At each stage, let m be the number of edges of T.) 1. Initialise T to have all of the vertices of G and no edges. 2. Let E be the set of all edges of G and let m = 0. (pre-condition: G is connected.) 3. While ( m < n 1) a. Find an edge e in E of least weight. b. Delete e from E. c. If addition of e to the edge set of T does not produce a circuit then add e to the edge set of T and set m = m + 1 End While (post-condition: T is a minimum spanning tree for G.) Output: T (a graph) End Algorithm WUCT121 Graphs 58

59 Theorem: Kruskal s Output. When a connected weighted graph is input into Kruskal's algorithm, the output is a minimum spanning tree. The need to construct an ordered edge table before the algorithm begins and the need to check whether a circuit has been formed are two detriments to the computer implementation of Kruskal's algorithm. Exercises: Use Kruskal's algorithm to find a minimum spanning tree for the following graph. Draw the minimum spanning tree. v2 4 v v v v 6 v 7 v8 13 WUCT121 Graphs 59

60 Edge Weight Will adding edge make circuit? Action taken Cumulative weight of sub-graph ( 4 v5 v, ) 2 No Added 2 ( 1 v3 v, ) 4 No Added 6 ( 2 v5 v, ) 5 No Added 11 ( 2 v4 v, ) 7 Yes Not added 11 ( 3 v7 v, ) 8 No Added 19 ( 3 v4 v, ) 10 No Added 29 ( 1 v2 v, ) 12 Yes Not Added 29 ( 7 v8 v, ) 13 No Added 42 ( 4 v8 v, ) 15 Yes Not Added 42 ( 5 v8 v, ) 18 Yes Not Added 42 ( 6 v8 v, ) 19 No Added 61 ( 2 v6 v, ) 20 Yes Not Added 61 WUCT121 Graphs 60

61 The minimum spanning tree is: v v2 1 v 3 v 4 v 5 v 6 v 7 v8 Let G be a connected graph. What can you say about an edge e of G if: o e is included in every spanning tree for G? e is not an edge in a circuit in G. o e is not included in any spanning tree for G? e is a loop. WUCT121 Graphs 61

62 1.11. Planar Graphs. Given a graph which is drawn with incidental crossings of edges, is it possible to determine whether an isomorphic graph could be drawn without any crossings of the edges? Exercises: Can either of these graphs be drawn with no incidental crossings? K 4 : v 1 v 3 v v 2 4 Yes v 4 v 3 v 2 K 3,3 No WUCT121 Graphs 62

63 Definition: Plane Graph. A graph G is said to be a plane graph if it is drawn in the plane in such a way that there are no incidental crossings of edges. Notes: A plane graph divides the plane into distinct regions called faces. a face. The outside of a plane graph is always considered Exercises: Number the faces in these graphs WUCT121 Graphs 63

64 Definition: Planar Graph. A graph G is said to be a planar graph if it can be drawn in the plane without incidental crossings of edges. Notes: A plane graph is a connected planar graph Theorem: Euler's Plane Graph Theorem. If G = { V, E} is a plane graph and if v equals the number of vertices, e equals the number of edges, and f equals the number of faces, then v e + f = 2. Exercises: Check Euler's Plane Graph Theorem for these graphs v = 4, e = 5, f = 3 v e + f = = 2 WUCT121 Graphs 64

65 WUCT121 Graphs , 5, = + = + = = = f e v f e v Re-draw so that there are no edges crossing: , 4, = + = + = = = f e v f e v The problem with applying this Theorem is that the graph has to be drawn as a plane graph before it can be applied. It does not help us decide if 3 3, K is a planar graph

66 The following theorem includes a condition which can be checked in the original graph Theorem: Conditions of a Plane Graph. If G = { V, E} is a plane graph, without loops or parallel edges, v = n(v ), e = n(e) and v 3, then 1. e 3v 6, AND 2. if every circuit has at least 4 edges then e 2v 4. If the conditions of this theorem are also satisfied in any simple graph, G, then G may or may not be a planar graph. However, if they are not satisfied, then G is not a planar graph. WUCT121 Graphs 66

67 Exercises: Check the conditions for a plane graph for the following graph. 1. Check e 3v 6 e = 14, v = 8 3v 6 = 18 e < 3v 6 2. All circuits have at least 4 edges. Check all the circuits and that e 2v 4. 2v 4 = 12 e > 2v 4 Therefore we do not have a planar graph. WUCT121 Graphs 67

68 Decide whether these graphs are planar. o K 3,3 1. Check e 3v 6 e = 9, v = 6 3v 6 = 12 e < 3v 6 2. All circuits have at least 4 edges. Check that e 2v 4. 2v 4 = 8 e > 2v 4 Therefore this graph is not planar. WUCT121 Graphs 68

69 o v1 v 2 v 3 v 4 1. Check e 3v 6 e = 11, v = 7 3v 6 = 15 e < 3v 6 v 5 v6 v7 2. Some circuits have three edges. From this, we do not know whether the graph is planar or not. 3. Re-drawing the graph, we find it is planar. v 1 v 3 v v 5 6 v 7 v 4 v 2 WUCT121 Graphs 69

70 o v 5 v 2 v 4 v 3 This is the complete graph K 5 1. Check e 3v 6 e = 10, 3v 6 = 9 e v = 5 > 3v 6 Thus K 5 is not planar WUCT121 Graphs 70

71 Theorem: Smallest Non-Planar Graphs K 3,3 and K 5 are the smallest possible non-planar graphs. Further, a graph is non-planar if and only if it contains K 3, 3 or K 5 as a sub-graph. Example: v 5 v 2 v 3 v 8 v 6 v 4 v 7 The graph does not have 6 vertices of degree 3 and so cannot contain K 3, 3. The graph does not have 5 vertices of degree 4 and so cannot contain K 5. WUCT121 Graphs 71

72 Redrawing the graph without crossings: v 2 v 3 v 5 v 7 v 1 v 4 v 6 v 8 v = 8, e = 11, f = 5 v e + f = = 2 WUCT121 Graphs 72

Graph Theory. 1 Introduction to Graphs. Martin Stynes Department of Mathematics, UCC January 26, 2011

Graph Theory. 1 Introduction to Graphs. Martin Stynes Department of Mathematics, UCC   January 26, 2011 Graph Theory Martin Stynes Department of Mathematics, UCC email: m.stynes@ucc.ie January 26, 2011 1 Introduction to Graphs 1 A graph G = (V, E) is a non-empty set of nodes or vertices V and a (possibly

More information

TWO CONTRIBUTIONS OF EULER

TWO CONTRIBUTIONS OF EULER TWO CONTRIBUTIONS OF EULER SIEMION FAJTLOWICZ. MATH 4315 Eulerian Tours. Although some mathematical problems which now can be thought of as graph-theoretical, go back to the times of Euclid, the invention

More information

Adjacent: Two distinct vertices u, v are adjacent if there is an edge with ends u, v. In this case we let uv denote such an edge.

Adjacent: Two distinct vertices u, v are adjacent if there is an edge with ends u, v. In this case we let uv denote such an edge. 1 Graph Basics What is a graph? Graph: a graph G consists of a set of vertices, denoted V (G), a set of edges, denoted E(G), and a relation called incidence so that each edge is incident with either one

More information

Assignment 4 Solutions of graph problems

Assignment 4 Solutions of graph problems Assignment 4 Solutions of graph problems 1. Let us assume that G is not a cycle. Consider the maximal path in the graph. Let the end points of the path be denoted as v 1, v k respectively. If either of

More information

Brief History. Graph Theory. What is a graph? Types of graphs Directed graph: a graph that has edges with specific directions

Brief History. Graph Theory. What is a graph? Types of graphs Directed graph: a graph that has edges with specific directions Brief History Graph Theory What is a graph? It all began in 1736 when Leonhard Euler gave a proof that not all seven bridges over the Pregolya River could all be walked over once and end up where you started.

More information

Fundamental Properties of Graphs

Fundamental Properties of Graphs Chapter three In many real-life situations we need to know how robust a graph that represents a certain network is, how edges or vertices can be removed without completely destroying the overall connectivity,

More information

INTRODUCTION TO GRAPH THEORY. 1. Definitions

INTRODUCTION TO GRAPH THEORY. 1. Definitions INTRODUCTION TO GRAPH THEORY D. JAKOBSON 1. Definitions A graph G consists of vertices {v 1, v 2,..., v n } and edges {e 1, e 2,..., e m } connecting pairs of vertices. An edge e = (uv) is incident with

More information

Introduction III. Graphs. Motivations I. Introduction IV

Introduction III. Graphs. Motivations I. Introduction IV Introduction I Graphs Computer Science & Engineering 235: Discrete Mathematics Christopher M. Bourke cbourke@cse.unl.edu Graph theory was introduced in the 18th century by Leonhard Euler via the Königsberg

More information

CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS

CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS 1 UNIT I INTRODUCTION CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS 1. Define Graph. A graph G = (V, E) consists

More information

Graph Theory: Introduction

Graph Theory: Introduction Graph Theory: Introduction Pallab Dasgupta, Professor, Dept. of Computer Sc. and Engineering, IIT Kharagpur pallab@cse.iitkgp.ernet.in Resources Copies of slides available at: http://www.facweb.iitkgp.ernet.in/~pallab

More information

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 7

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 7 CS 70 Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 7 An Introduction to Graphs A few centuries ago, residents of the city of Königsberg, Prussia were interested in a certain problem.

More information

Math 778S Spectral Graph Theory Handout #2: Basic graph theory

Math 778S Spectral Graph Theory Handout #2: Basic graph theory Math 778S Spectral Graph Theory Handout #: Basic graph theory Graph theory was founded by the great Swiss mathematician Leonhard Euler (1707-178) after he solved the Königsberg Bridge problem: Is it possible

More information

5 Graphs

5 Graphs 5 Graphs jacques@ucsd.edu Some of the putnam problems are to do with graphs. They do not assume more than a basic familiarity with the definitions and terminology of graph theory. 5.1 Basic definitions

More information

γ(ɛ) (a, b) (a, d) (d, a) (a, b) (c, d) (d, d) (e, e) (e, a) (e, e) (a) Draw a picture of G.

γ(ɛ) (a, b) (a, d) (d, a) (a, b) (c, d) (d, d) (e, e) (e, a) (e, e) (a) Draw a picture of G. MAD 3105 Spring 2006 Solutions for Review for Test 2 1. Define a graph G with V (G) = {a, b, c, d, e}, E(G) = {r, s, t, u, v, w, x, y, z} and γ, the function defining the edges, is given by the table ɛ

More information

MC302 GRAPH THEORY SOLUTIONS TO HOMEWORK #1 9/19/13 68 points + 6 extra credit points

MC302 GRAPH THEORY SOLUTIONS TO HOMEWORK #1 9/19/13 68 points + 6 extra credit points MC02 GRAPH THEORY SOLUTIONS TO HOMEWORK #1 9/19/1 68 points + 6 extra credit points 1. [CH] p. 1, #1... a. In each case, for the two graphs you say are isomorphic, justify it by labeling their vertices

More information

MC 302 GRAPH THEORY 10/1/13 Solutions to HW #2 50 points + 6 XC points

MC 302 GRAPH THEORY 10/1/13 Solutions to HW #2 50 points + 6 XC points MC 0 GRAPH THEORY 0// Solutions to HW # 0 points + XC points ) [CH] p.,..7. This problem introduces an important class of graphs called the hypercubes or k-cubes, Q, Q, Q, etc. I suggest that before you

More information

Combinatorics Summary Sheet for Exam 1 Material 2019

Combinatorics Summary Sheet for Exam 1 Material 2019 Combinatorics Summary Sheet for Exam 1 Material 2019 1 Graphs Graph An ordered three-tuple (V, E, F ) where V is a set representing the vertices, E is a set representing the edges, and F is a function

More information

v V Question: How many edges are there in a graph with 10 vertices each of degree 6?

v V Question: How many edges are there in a graph with 10 vertices each of degree 6? ECS20 Handout Graphs and Trees March 4, 2015 (updated 3/9) Notion of a graph 1. A graph G = (V,E) consists of V, a nonempty set of vertices (or nodes) and E, a set of pairs of elements of V called edges.

More information

Assignments are handed in on Tuesdays in even weeks. Deadlines are:

Assignments are handed in on Tuesdays in even weeks. Deadlines are: Tutorials at 2 3, 3 4 and 4 5 in M413b, on Tuesdays, in odd weeks. i.e. on the following dates. Tuesday the 28th January, 11th February, 25th February, 11th March, 25th March, 6th May. Assignments are

More information

Math 776 Graph Theory Lecture Note 1 Basic concepts

Math 776 Graph Theory Lecture Note 1 Basic concepts Math 776 Graph Theory Lecture Note 1 Basic concepts Lectured by Lincoln Lu Transcribed by Lincoln Lu Graph theory was founded by the great Swiss mathematician Leonhard Euler (1707-178) after he solved

More information

Lecture 5: Graphs. Rajat Mittal. IIT Kanpur

Lecture 5: Graphs. Rajat Mittal. IIT Kanpur Lecture : Graphs Rajat Mittal IIT Kanpur Combinatorial graphs provide a natural way to model connections between different objects. They are very useful in depicting communication networks, social networks

More information

2. CONNECTIVITY Connectivity

2. CONNECTIVITY Connectivity 2. CONNECTIVITY 70 2. Connectivity 2.1. Connectivity. Definition 2.1.1. (1) A path in a graph G = (V, E) is a sequence of vertices v 0, v 1, v 2,..., v n such that {v i 1, v i } is an edge of G for i =

More information

8.2 Paths and Cycles

8.2 Paths and Cycles 8.2 Paths and Cycles Degree a b c d e f Definition The degree of a vertex is the number of edges incident to it. A loop contributes 2 to the degree of the vertex. (G) is the maximum degree of G. δ(g) is

More information

Definition 1.1. A matching M in a graph G is called maximal if there is no matching M in G so that M M.

Definition 1.1. A matching M in a graph G is called maximal if there is no matching M in G so that M M. 1 Matchings Before, we defined a matching as a set of edges no two of which share an end in common. Suppose that we have a set of jobs and people and we want to match as many jobs to people as we can.

More information

Section 8.2 Graph Terminology. Undirected Graphs. Definition: Two vertices u, v in V are adjacent or neighbors if there is an edge e between u and v.

Section 8.2 Graph Terminology. Undirected Graphs. Definition: Two vertices u, v in V are adjacent or neighbors if there is an edge e between u and v. Section 8.2 Graph Terminology Undirected Graphs Definition: Two vertices u, v in V are adjacent or neighbors if there is an edge e between u and v. The edge e connects u and v. The vertices u and v are

More information

Varying Applications (examples)

Varying Applications (examples) Graph Theory Varying Applications (examples) Computer networks Distinguish between two chemical compounds with the same molecular formula but different structures Solve shortest path problems between cities

More information

Characterizing Graphs (3) Characterizing Graphs (1) Characterizing Graphs (2) Characterizing Graphs (4)

Characterizing Graphs (3) Characterizing Graphs (1) Characterizing Graphs (2) Characterizing Graphs (4) S-72.2420/T-79.5203 Basic Concepts 1 S-72.2420/T-79.5203 Basic Concepts 3 Characterizing Graphs (1) Characterizing Graphs (3) Characterizing a class G by a condition P means proving the equivalence G G

More information

Chapter 2 Graphs. 2.1 Definition of Graphs

Chapter 2 Graphs. 2.1 Definition of Graphs Chapter 2 Graphs Abstract Graphs are discrete structures that consist of vertices and edges connecting some of these vertices. Graphs have many applications in Mathematics, Computer Science, Engineering,

More information

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao,David Tse Note 8

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao,David Tse Note 8 CS 70 Discrete Mathematics and Probability Theory Fall 2009 Satish Rao,David Tse Note 8 An Introduction to Graphs Formulating a simple, precise specification of a computational problem is often a prerequisite

More information

Chapter 8 Topics in Graph Theory

Chapter 8 Topics in Graph Theory Chapter 8 Topics in Graph Theory Chapter 8: Topics in Graph Theory Section 8.1: Examples {1,2,3} Section 8.2: Examples {1,2,4} Section 8.3: Examples {1} 8.1 Graphs Graph A graph G consists of a finite

More information

Math 443/543 Graph Theory Notes 11: Graph minors and Kuratowski s Theorem

Math 443/543 Graph Theory Notes 11: Graph minors and Kuratowski s Theorem Math 443/543 Graph Theory Notes 11: Graph minors and Kuratowski s Theorem David Glickenstein November 26, 2008 1 Graph minors Let s revisit some de nitions. Let G = (V; E) be a graph. De nition 1 Removing

More information

CPS 102: Discrete Mathematics. Quiz 3 Date: Wednesday November 30, Instructor: Bruce Maggs NAME: Prob # Score. Total 60

CPS 102: Discrete Mathematics. Quiz 3 Date: Wednesday November 30, Instructor: Bruce Maggs NAME: Prob # Score. Total 60 CPS 102: Discrete Mathematics Instructor: Bruce Maggs Quiz 3 Date: Wednesday November 30, 2011 NAME: Prob # Score Max Score 1 10 2 10 3 10 4 10 5 10 6 10 Total 60 1 Problem 1 [10 points] Find a minimum-cost

More information

EULER S FORMULA AND THE FIVE COLOR THEOREM

EULER S FORMULA AND THE FIVE COLOR THEOREM EULER S FORMULA AND THE FIVE COLOR THEOREM MIN JAE SONG Abstract. In this paper, we will define the necessary concepts to formulate map coloring problems. Then, we will prove Euler s formula and apply

More information

GRAPHS, GRAPH MODELS, GRAPH TERMINOLOGY, AND SPECIAL TYPES OF GRAPHS

GRAPHS, GRAPH MODELS, GRAPH TERMINOLOGY, AND SPECIAL TYPES OF GRAPHS GRAPHS, GRAPH MODELS, GRAPH TERMINOLOGY, AND SPECIAL TYPES OF GRAPHS DR. ANDREW SCHWARTZ, PH.D. 10.1 Graphs and Graph Models (1) A graph G = (V, E) consists of V, a nonempty set of vertices (or nodes)

More information

A graph is finite if its vertex set and edge set are finite. We call a graph with just one vertex trivial and all other graphs nontrivial.

A graph is finite if its vertex set and edge set are finite. We call a graph with just one vertex trivial and all other graphs nontrivial. 2301-670 Graph theory 1.1 What is a graph? 1 st semester 2550 1 1.1. What is a graph? 1.1.2. Definition. A graph G is a triple (V(G), E(G), ψ G ) consisting of V(G) of vertices, a set E(G), disjoint from

More information

Discrete Mathematics for CS Spring 2008 David Wagner Note 13. An Introduction to Graphs

Discrete Mathematics for CS Spring 2008 David Wagner Note 13. An Introduction to Graphs CS 70 Discrete Mathematics for CS Spring 2008 David Wagner Note 13 An Introduction to Graphs Formulating a simple, precise specification of a computational problem is often a prerequisite to writing a

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence Graph theory G. Guérard Department of Nouvelles Energies Ecole Supérieur d Ingénieurs Léonard de Vinci Lecture 1 GG A.I. 1/37 Outline 1 Graph theory Undirected and directed graphs

More information

CHAPTER 2. Graphs. 1. Introduction to Graphs and Graph Isomorphism

CHAPTER 2. Graphs. 1. Introduction to Graphs and Graph Isomorphism CHAPTER 2 Graphs 1. Introduction to Graphs and Graph Isomorphism 1.1. The Graph Menagerie. Definition 1.1.1. A simple graph G = (V, E) consists of a set V of vertices and a set E of edges, represented

More information

Assignment 1 Introduction to Graph Theory CO342

Assignment 1 Introduction to Graph Theory CO342 Assignment 1 Introduction to Graph Theory CO342 This assignment will be marked out of a total of thirty points, and is due on Thursday 18th May at 10am in class. Throughout the assignment, the graphs are

More information

CHAPTER 10 GRAPHS AND TREES. Alessandro Artale UniBZ - artale/z

CHAPTER 10 GRAPHS AND TREES. Alessandro Artale UniBZ -  artale/z CHAPTER 10 GRAPHS AND TREES Alessandro Artale UniBZ - http://www.inf.unibz.it/ artale/z SECTION 10.1 Graphs: Definitions and Basic Properties Copyright Cengage Learning. All rights reserved. Graphs: Definitions

More information

Graph theory. Po-Shen Loh. June We begin by collecting some basic facts which can be proved via bare-hands techniques.

Graph theory. Po-Shen Loh. June We begin by collecting some basic facts which can be proved via bare-hands techniques. Graph theory Po-Shen Loh June 013 1 Basic results We begin by collecting some basic facts which can be proved via bare-hands techniques. 1. The sum of all of the degrees is equal to twice the number of

More information

Number Theory and Graph Theory

Number Theory and Graph Theory 1 Number Theory and Graph Theory Chapter 6 Basic concepts and definitions of graph theory By A. Satyanarayana Reddy Department of Mathematics Shiv Nadar University Uttar Pradesh, India E-mail: satya8118@gmail.com

More information

Module 2: NETWORKS AND DECISION MATHEMATICS

Module 2: NETWORKS AND DECISION MATHEMATICS Further Mathematics 2017 Module 2: NETWORKS AND DECISION MATHEMATICS Chapter 9 Undirected Graphs and Networks Key knowledge the conventions, terminology, properties and types of graphs; edge, face, loop,

More information

Exercise set 2 Solutions

Exercise set 2 Solutions Exercise set 2 Solutions Let H and H be the two components of T e and let F E(T ) consist of the edges of T with one endpoint in V (H), the other in V (H ) Since T is connected, F Furthermore, since T

More information

The University of Sydney MATH2969/2069. Graph Theory Tutorial 2 (Week 9) 2008

The University of Sydney MATH2969/2069. Graph Theory Tutorial 2 (Week 9) 2008 The University of Sydney MATH99/09 Graph Theory Tutorial (Week 9) 00. Show that the graph on the left is Hamiltonian, but that the other two are not. To show that the graph is Hamiltonian, simply find

More information

Lecture 6: Graph Properties

Lecture 6: Graph Properties Lecture 6: Graph Properties Rajat Mittal IIT Kanpur In this section, we will look at some of the combinatorial properties of graphs. Initially we will discuss independent sets. The bulk of the content

More information

Further Mathematics 2016 Module 2: NETWORKS AND DECISION MATHEMATICS Chapter 9 Undirected Graphs and Networks

Further Mathematics 2016 Module 2: NETWORKS AND DECISION MATHEMATICS Chapter 9 Undirected Graphs and Networks Further Mathematics 2016 Module 2: NETWORKS AND DECISION MATHEMATICS Chapter 9 Undirected Graphs and Networks Key knowledge the conventions, terminology, properties and types of graphs; edge, face, loop,

More information

Graph Theory S 1 I 2 I 1 S 2 I 1 I 2

Graph Theory S 1 I 2 I 1 S 2 I 1 I 2 Graph Theory S I I S S I I S Graphs Definition A graph G is a pair consisting of a vertex set V (G), and an edge set E(G) ( ) V (G). x and y are the endpoints of edge e = {x, y}. They are called adjacent

More information

Planar graphs. Math Prof. Kindred - Lecture 16 Page 1

Planar graphs. Math Prof. Kindred - Lecture 16 Page 1 Planar graphs Typically a drawing of a graph is simply a notational shorthand or a more visual way to capture the structure of the graph. Now we focus on the drawings themselves. Definition A drawing of

More information

Characterizations of graph classes by forbidden configurations

Characterizations of graph classes by forbidden configurations Characterizations of graph classes by forbidden configurations Zdeněk Dvořák September 14, 2015 We consider graph classes that can be described by excluding some fixed configurations. Let us give some

More information

Chapter 11: Graphs and Trees. March 23, 2008

Chapter 11: Graphs and Trees. March 23, 2008 Chapter 11: Graphs and Trees March 23, 2008 Outline 1 11.1 Graphs: An Introduction 2 11.2 Paths and Circuits 3 11.3 Matrix Representations of Graphs 4 11.5 Trees Graphs: Basic Definitions Informally, a

More information

Part II. Graph Theory. Year

Part II. Graph Theory. Year Part II Year 2017 2016 2015 2014 2013 2012 2011 2010 2009 2008 2007 2006 2005 2017 53 Paper 3, Section II 15H Define the Ramsey numbers R(s, t) for integers s, t 2. Show that R(s, t) exists for all s,

More information

1 Digraphs. Definition 1

1 Digraphs. Definition 1 1 Digraphs Definition 1 Adigraphordirected graphgisatriplecomprisedofavertex set V(G), edge set E(G), and a function assigning each edge an ordered pair of vertices (tail, head); these vertices together

More information

Discrete mathematics

Discrete mathematics Discrete mathematics Petr Kovář petr.kovar@vsb.cz VŠB Technical University of Ostrava DiM 470-2301/02, Winter term 2018/2019 About this file This file is meant to be a guideline for the lecturer. Many

More information

Graph Theory Mini-course

Graph Theory Mini-course Graph Theory Mini-course Anthony Varilly PROMYS, Boston University, Boston, MA 02215 Abstract Intuitively speaking, a graph is a collection of dots and lines joining some of these dots. Many problems in

More information

CMSC 380. Graph Terminology and Representation

CMSC 380. Graph Terminology and Representation CMSC 380 Graph Terminology and Representation GRAPH BASICS 2 Basic Graph Definitions n A graph G = (V,E) consists of a finite set of vertices, V, and a finite set of edges, E. n Each edge is a pair (v,w)

More information

Graph Theory. Part of Texas Counties.

Graph Theory. Part of Texas Counties. Graph Theory Part of Texas Counties. We would like to visit each of the above counties, crossing each county only once, starting from Harris county. Is this possible? This problem can be modeled as a graph.

More information

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics. An Introduction to Graph Theory

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics. An Introduction to Graph Theory SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics An Introduction to Graph Theory. Introduction. Definitions.. Vertices and Edges... The Handshaking Lemma.. Connected Graphs... Cut-Points and Bridges.

More information

DS UNIT 4. Matoshri College of Engineering and Research Center Nasik Department of Computer Engineering Discrete Structutre UNIT - IV

DS UNIT 4. Matoshri College of Engineering and Research Center Nasik Department of Computer Engineering Discrete Structutre UNIT - IV Sr.No. Question Option A Option B Option C Option D 1 2 3 4 5 6 Class : S.E.Comp Which one of the following is the example of non linear data structure Let A be an adjacency matrix of a graph G. The ij

More information

Discrete mathematics

Discrete mathematics Discrete mathematics Petr Kovář petr.kovar@vsb.cz VŠB Technical University of Ostrava DiM 470-2301/02, Winter term 2017/2018 About this file This file is meant to be a guideline for the lecturer. Many

More information

Matching and Planarity

Matching and Planarity Matching and Planarity Po-Shen Loh June 010 1 Warm-up 1. (Bondy 1.5.9.) There are n points in the plane such that every pair of points has distance 1. Show that there are at most n (unordered) pairs of

More information

GRAPH THEORY: AN INTRODUCTION

GRAPH THEORY: AN INTRODUCTION GRAPH THEORY: AN INTRODUCTION BEGINNERS 3/4/2018 1. GRAPHS AND THEIR PROPERTIES A graph G consists of two sets: a set of vertices V, and a set of edges E. A vertex is simply a labeled point. An edge is

More information

Discrete mathematics II. - Graphs

Discrete mathematics II. - Graphs Emil Vatai April 25, 2018 Basic definitions Definition of an undirected graph Definition (Undirected graph) An undirected graph or (just) a graph is a triplet G = (ϕ, E, V ), where V is the set of vertices,

More information

CS 311 Discrete Math for Computer Science Dr. William C. Bulko. Graphs

CS 311 Discrete Math for Computer Science Dr. William C. Bulko. Graphs CS 311 Discrete Math for Computer Science Dr. William C. Bulko Graphs 2014 Definitions Definition: A graph G = (V,E) consists of a nonempty set V of vertices (or nodes) and a set E of edges. Each edge

More information

CONNECTIVITY AND NETWORKS

CONNECTIVITY AND NETWORKS CONNECTIVITY AND NETWORKS We begin with the definition of a few symbols, two of which can cause great confusion, especially when hand-written. Consider a graph G. (G) the degree of the vertex with smallest

More information

1. a graph G = (V (G), E(G)) consists of a set V (G) of vertices, and a set E(G) of edges (edges are pairs of elements of V (G))

1. a graph G = (V (G), E(G)) consists of a set V (G) of vertices, and a set E(G) of edges (edges are pairs of elements of V (G)) 10 Graphs 10.1 Graphs and Graph Models 1. a graph G = (V (G), E(G)) consists of a set V (G) of vertices, and a set E(G) of edges (edges are pairs of elements of V (G)) 2. an edge is present, say e = {u,

More information

Elements of Graph Theory

Elements of Graph Theory Elements of Graph Theory Quick review of Chapters 9.1 9.5, 9.7 (studied in Mt1348/2008) = all basic concepts must be known New topics we will mostly skip shortest paths (Chapter 9.6), as that was covered

More information

K 4 C 5. Figure 4.5: Some well known family of graphs

K 4 C 5. Figure 4.5: Some well known family of graphs 08 CHAPTER. TOPICS IN CLASSICAL GRAPH THEORY K, K K K, K K, K K, K C C C C 6 6 P P P P P. Graph Operations Figure.: Some well known family of graphs A graph Y = (V,E ) is said to be a subgraph of a graph

More information

Discrete Mathematics (2009 Spring) Graphs (Chapter 9, 5 hours)

Discrete Mathematics (2009 Spring) Graphs (Chapter 9, 5 hours) Discrete Mathematics (2009 Spring) Graphs (Chapter 9, 5 hours) Chih-Wei Yi Dept. of Computer Science National Chiao Tung University June 1, 2009 9.1 Graphs and Graph Models What are Graphs? General meaning

More information

Graph and Digraph Glossary

Graph and Digraph Glossary 1 of 15 31.1.2004 14:45 Graph and Digraph Glossary A B C D E F G H I-J K L M N O P-Q R S T U V W-Z Acyclic Graph A graph is acyclic if it contains no cycles. Adjacency Matrix A 0-1 square matrix whose

More information

Discrete Mathematics Course Review 3

Discrete Mathematics Course Review 3 21-228 Discrete Mathematics Course Review 3 This document contains a list of the important definitions and theorems that have been covered thus far in the course. It is not a complete listing of what has

More information

Solutions to Exercises 9

Solutions to Exercises 9 Discrete Mathematics Lent 2009 MA210 Solutions to Exercises 9 (1) There are 5 cities. The cost of building a road directly between i and j is the entry a i,j in the matrix below. An indefinite entry indicates

More information

Chapter 3: Paths and Cycles

Chapter 3: Paths and Cycles Chapter 3: Paths and Cycles 5 Connectivity 1. Definitions: Walk: finite sequence of edges in which any two consecutive edges are adjacent or identical. (Initial vertex, Final vertex, length) Trail: walk

More information

Math Summer 2012

Math Summer 2012 Math 481 - Summer 2012 Final Exam You have one hour and fifty minutes to complete this exam. You are not allowed to use any electronic device. Be sure to give reasonable justification to all your answers.

More information

An Introduction to Graph Theory

An Introduction to Graph Theory An Introduction to Graph Theory CIS008-2 Logic and Foundations of Mathematics David Goodwin david.goodwin@perisic.com 12:00, Friday 17 th February 2012 Outline 1 Graphs 2 Paths and cycles 3 Graphs and

More information

Graph theory - solutions to problem set 1

Graph theory - solutions to problem set 1 Graph theory - solutions to problem set 1 1. (a) Is C n a subgraph of K n? Exercises (b) For what values of n and m is K n,n a subgraph of K m? (c) For what n is C n a subgraph of K n,n? (a) Yes! (you

More information

Basics of Graph Theory

Basics of Graph Theory Basics of Graph Theory 1 Basic notions A simple graph G = (V, E) consists of V, a nonempty set of vertices, and E, a set of unordered pairs of distinct elements of V called edges. Simple graphs have their

More information

Network Topology and Graph

Network Topology and Graph Network Topology Network Topology and Graph EEE442 Computer Method in Power System Analysis Any lumped network obeys 3 basic laws KVL KCL linear algebraic constraints Ohm s law Anawach Sangswang Dept.

More information

Lecture 20 : Trees DRAFT

Lecture 20 : Trees DRAFT CS/Math 240: Introduction to Discrete Mathematics 4/12/2011 Lecture 20 : Trees Instructor: Dieter van Melkebeek Scribe: Dalibor Zelený DRAFT Last time we discussed graphs. Today we continue this discussion,

More information

Chapter 4. Relations & Graphs. 4.1 Relations. Exercises For each of the relations specified below:

Chapter 4. Relations & Graphs. 4.1 Relations. Exercises For each of the relations specified below: Chapter 4 Relations & Graphs 4.1 Relations Definition: Let A and B be sets. A relation from A to B is a subset of A B. When we have a relation from A to A we often call it a relation on A. When we have

More information

MATH 363 Final Wednesday, April 28. Final exam. You may use lemmas and theorems that were proven in class and on assignments unless stated otherwise.

MATH 363 Final Wednesday, April 28. Final exam. You may use lemmas and theorems that were proven in class and on assignments unless stated otherwise. Final exam This is a closed book exam. No calculators are allowed. Unless stated otherwise, justify all your steps. You may use lemmas and theorems that were proven in class and on assignments unless stated

More information

Week 8: The fundamentals of graph theory; Planar Graphs 25 and 27 October, 2017

Week 8: The fundamentals of graph theory; Planar Graphs 25 and 27 October, 2017 (1/25) MA284 : Discrete Mathematics Week 8: The fundamentals of graph theory; Planar Graphs 25 and 27 October, 2017 1 Definitions 1. A graph 2. Paths and connected graphs 3. Complete graphs 4. Vertex degree

More information

Paths. Path is a sequence of edges that begins at a vertex of a graph and travels from vertex to vertex along edges of the graph.

Paths. Path is a sequence of edges that begins at a vertex of a graph and travels from vertex to vertex along edges of the graph. Paths Path is a sequence of edges that begins at a vertex of a graph and travels from vertex to vertex along edges of the graph. Formal Definition of a Path (Undirected) Let n be a nonnegative integer

More information

11.4 Bipartite Multigraphs

11.4 Bipartite Multigraphs 11.4 Bipartite Multigraphs Introduction Definition A graph G is bipartite if we can partition the vertices into two disjoint subsets U and V such that every edge of G has one incident vertex in U and the

More information

How can we lay cable at minimum cost to make every telephone reachable from every other? What is the fastest route between two given cities?

How can we lay cable at minimum cost to make every telephone reachable from every other? What is the fastest route between two given cities? 1 Introduction Graph theory is one of the most in-demand (i.e. profitable) and heavily-studied areas of applied mathematics and theoretical computer science. May graph theory questions are applied in this

More information

K 4,4 e Has No Finite Planar Cover

K 4,4 e Has No Finite Planar Cover K 4,4 e Has No Finite Planar Cover Petr Hliněný Dept. of Applied Mathematics, Charles University, Malostr. nám. 25, 118 00 Praha 1, Czech republic (E-mail: hlineny@kam.ms.mff.cuni.cz) February 9, 2005

More information

DO NOT RE-DISTRIBUTE THIS SOLUTION FILE

DO NOT RE-DISTRIBUTE THIS SOLUTION FILE Professor Kindred Math 104, Graph Theory Homework 3 Solutions February 14, 2013 Introduction to Graph Theory, West Section 2.1: 37, 62 Section 2.2: 6, 7, 15 Section 2.3: 7, 10, 14 DO NOT RE-DISTRIBUTE

More information

Graph Theory Day Four

Graph Theory Day Four Graph Theory Day Four February 8, 018 1 Connected Recall from last class, we discussed methods for proving a graph was connected. Our two methods were 1) Based on the definition, given any u, v V(G), there

More information

Planar Graphs. 1 Graphs and maps. 1.1 Planarity and duality

Planar Graphs. 1 Graphs and maps. 1.1 Planarity and duality Planar Graphs In the first half of this book, we consider mostly planar graphs and their geometric representations, mostly in the plane. We start with a survey of basic results on planar graphs. This chapter

More information

Simple Graph. General Graph

Simple Graph. General Graph Graph Theory A graph is a collection of points (also called vertices) and lines (also called edges), with each edge ending at a vertex In general, it is allowed for more than one edge to have the same

More information

Planar Graph (7A) Young Won Lim 5/21/18

Planar Graph (7A) Young Won Lim 5/21/18 Planar Graph (7A) Copyright (c) 2015 2018 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later

More information

Math 311. Trees Name: A Candel CSUN Math

Math 311. Trees Name: A Candel CSUN Math 1. A simple path in a graph is a path with no repeated edges. A simple circuit is a circuit without repeated edges. 2. Trees are special kinds of graphs. A tree is a connected graph with no simple circuits.

More information

Undirected Network Summary

Undirected Network Summary Undirected Network Summary Notice that the network above has multiple edges joining nodes a to d and the network has a loop at node d. Also c is called an isolated node as it is not connected to any other

More information

Discrete Mathematics

Discrete Mathematics Discrete Mathematics Lecturer: Mgr. Tereza Kovářová, Ph.D. tereza.kovarova@vsb.cz Guarantor: doc. Mgr. Petr Kovář, Ph.D. Department of Applied Mathematics, VŠB Technical University of Ostrava About this

More information

Notebook Assignments

Notebook Assignments Notebook Assignments These six assignments are a notebook using techniques from class in the single concrete context of graph theory. This is supplemental to your usual assignments, and is designed for

More information

Math 443/543 Graph Theory Notes 5: Planar graphs and coloring

Math 443/543 Graph Theory Notes 5: Planar graphs and coloring Math 443/543 Graph Theory Notes 5: Planar graphs and coloring David Glickenstein October 10, 2014 1 Planar graphs The Three Houses and Three Utilities Problem: Given three houses and three utilities, can

More information

Planar Graph (7A) Young Won Lim 6/20/18

Planar Graph (7A) Young Won Lim 6/20/18 Planar Graph (7A) Copyright (c) 2015 2018 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later

More information

Rigidity, connectivity and graph decompositions

Rigidity, connectivity and graph decompositions First Prev Next Last Rigidity, connectivity and graph decompositions Brigitte Servatius Herman Servatius Worcester Polytechnic Institute Page 1 of 100 First Prev Next Last Page 2 of 100 We say that a framework

More information

Advanced Combinatorial Optimization September 17, Lecture 3. Sketch some results regarding ear-decompositions and factor-critical graphs.

Advanced Combinatorial Optimization September 17, Lecture 3. Sketch some results regarding ear-decompositions and factor-critical graphs. 18.438 Advanced Combinatorial Optimization September 17, 2009 Lecturer: Michel X. Goemans Lecture 3 Scribe: Aleksander Madry ( Based on notes by Robert Kleinberg and Dan Stratila.) In this lecture, we

More information

Discrete mathematics , Fall Instructor: prof. János Pach

Discrete mathematics , Fall Instructor: prof. János Pach Discrete mathematics 2016-2017, Fall Instructor: prof. János Pach - covered material - Lecture 1. Counting problems To read: [Lov]: 1.2. Sets, 1.3. Number of subsets, 1.5. Sequences, 1.6. Permutations,

More information