Discrete mathematics II. - Graphs

Size: px
Start display at page:

Download "Discrete mathematics II. - Graphs"

Transcription

1 Emil Vatai April 25, 2018

2 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, E is the set of edges and ϕ : E (V ) is the connection map, so that ϕ(e) = {v 1, v 2 } V for each e E. Remark E = dmn(ϕ) is always true.

3 Basic definitions Terminology I Definition (Connection and endpoints) If e E and v ϕ(e), then the edge e is connected to the vertex v or the vertex v is an endpoint of edge e. Definition (Isolated vertex) If no edge is connected to v V, then v is an isolated vertex. Definition (Empty graph) If E = i.e. it has no edges, then it is an empty graph.

4 Basic definitions Some questions Why the complicated definition Do we need E?

5 Basic definitions Adjacency Definition (Adjacency of edges) Two different edges e 1 and e 2 are adjacent or e 1 and e 2 are neighbours if ϕ(e 1 ) ϕ(e 2 ), i.e. there is a common vertex to which they are connected to. Definition (Adjacency of vertices) Similarly, two different vertices v 1 and v 2 are adjacent or v 1 and v 2 are neighbours if ϕ(e) = {v 1, v 2 }, i.e. if there is a common edge of which they are endpoints of.

6 Basic definitions Simple graphs and multigraphs Definition (Loops, parallel edges) An edge connected to only one vertex is called a loop. Two different edges e 1 and e 2 are parallel if ϕ(e 1 ) = ϕ(e 2 ) i.e. they are connected to the same vertices. Definition (Simple graph, multigraph) A graph is a simple graph if it contain no loops and no parallel edges. A graph is a multigraph if it contains loops or parallel edges.

7 Basic definitions Finite and infinite graph Definition (Finite and infinite graph) If the number of elements in both E and V is finite, then we have a finite graph, otherwise it is an infinite graph. If not stated otherwise, all graphs mentioned will be finite.

8 Basic definitions A function on a set of vertices Definition (A function on a set of vertices) For a graph G = (ϕ, E, V ) and S V, let E(S) = { e E : v S v V \ S ϕ(e) = {v, v } }, i.e. E(S) is the set of edges which connect to one vertex (one endpoint) in S and the other in V \ S. Note: E(S) = E(V \ S).

9 Basic definitions Degree of a vertex Definition (Degree of a vertex) The degree of a vertex v V is the number of edges connected to v counting the loops twice i.e. deg(v) = {e E : v ϕ(e)} + {e E : ϕ(e) = {v}} }{{}}{{} all edges (including loops) loops (1) = S({v}) }{{} +2 {e E : ϕ(e) = {v}} }{{} all edges (excluding loops) loops (2) Sometimes the notation d(v) or δ(v) is used.

10 Basic definitions Regular and n-regular graphs Definition (Regular, and n-regular graphs) A graph is n-regular (for n N) if deg(v) = n for each v V. A graph is regular if n N for which it is n-regular. Example (Equivalent definition of isolated vertices) A vertex v V is isolated iff deg(v) = 0. Definition (Even and odd vertices) A vertex v is odd if deg(v) is odd and v is even if deg(v) is even.

11 Basic definitions The number of edges and the sum of degrees Theorem (The number of edges and the sum of degrees) If G = (ϕ, E, V ) is a finite graph, then v V deg(v) = 2 E Proof. Starting from an empty graph, the introduction of each new edge increases the total of degrees by 2. If ϕ(e) = {v 1, v 2 }, then both deg(v 1 ) and deg(v 2 ) increase by 1, or if ϕ(e) = {v} (loop), then deg(v) increases by 2. Theorem (Corollary) Every graph has an even number of odd vertices.

12 Basic definitions Example v 1 e 2 e 3 V = {v 1, v 2, v 3, v 4, v 5 } E = {e 1, e 2, e 3, e 4, e 5 } ϕ(e 1 ) = ϕ(e 2 ) = {v 1, v 2 } ϕ(e 3 ) = {v 1, v 4 } ϕ(e 4 ) = {v 3, v 4 } ϕ(e 5 ) = {v 4 } v 2 e 1 v 5 v 3 e 4 v 4 e 5 e 1 and e 2 are parallel e 5 is a loop v 5 is isolated deg(v 1 ) = 3 deg(v 2 ) = 2 deg(v 3 ) = 1 deg(v 4 ) = 4 deg(v 5 ) = 0

13 Isomorphic graphs Isomorphism Definition (Isomorphism of graphs) The graphs G = (ϕ, E, V ) and G = (ϕ, E, V ) are isomorphic if f : V V bijection, g : E E bijection and e E and v V if v = f (v) and e = g(e) then v ϕ(e) v ϕ (e ), i.e. the (f, g) pair of maps preserves the connection relation.

14 Isomorphic graphs Why is isomorphism important? The isomorphism of graphs is very important! Ironically, we rarely use it explicitly. Because the focus of interest is the connection relation between the edges and vertices, i.e. dots connected with lines. If we ignore the (names of) the edges and vertices, we can study all of the graphs isomorphic to each other. Isomorphism is used throughout the study of graphs, whenever E and V are not defined explicitly. It is because of isomorphism, that we can study graphs abstractly, without going into unnecessary detail. Oh, and you need to know it for the exam!!!

15 Isomorphic graphs Some well known graphs Definition (Complete graph, cycle, path, star) A complete graph (or a clique) is a simple graph with an edge between each pair of vertices. The complete graph with n vertices is K n. The cycle with n vertices is the graph with n vertices on a circle with each vertex connected to its neighbour. This is C n. If we delete one edge from C n+1 then we obtain the n long path denoted by P n, i.e. n edges connecting n + 1 vertices forming a single line. A star is the graph with n vertices on a circle, each connected to the vertex in the center. The star with n + 1 vertices is S n. The hypercubes H n (described later) with n vertices are also isomorphic to each other.

16 Isomorphic graphs K 4, C 4, P 4 and S 4 K 4 P 3 C 4 S 4 Example (Remarks) Because the graphs K n, C n, P n, S n are actually classes (sets) of graphs, we do not specify the edges or the vertices. Any graph isomorphic to e.g. K 4 as seen on the picture is also a K 4 graph.

17 Isomorphic graphs Bipartite graphs Definition (Bipartite graph) A G = (ϕ, E, V ) graph is a bipartite graph, if V, V V so that V V =, Example (Bipartite graph) V V = V and for every edge e E, ϕ(e) V and ϕ(e) V i.e. the set of vertices V of a bipartite graph can be split into two non-empty, disjoint sets so that V V = V, and each edge has one endpoint in V and the other in V.

18 Isomorphic graphs Cartesian product of graphs Definition (Cartesian product) Let G i = (ϕ i, E i, V i ) (for i I e.g. I = {1, 2, 3,...}) be an indexed family of graphs. The Cartesian product of these graphs is the graph G = (ϕ, E, V ), where V = V 1 V 2 and two vertices are connected if and only if they differ in one component only, and if the index of the differing component is j then the components are connected in G j. Alternatively V = i I V i = {(v 1, v 2,...) : v 1 V 1 v 2 V 2 }, ϕ(e) = {v, v } (for v = (v 1, v 2,...), v = (v 1, v 2,...)) if and only if!j I so that e j E j and ϕ j (e j ) = {v j, v j }

19 Isomorphic graphs The hypercube Example (The hypercube) The 0-dimensional hypercube H 0 consists of one vertex. The 1-dimensional hypercube H 1 consists of two vertices connected with a single edge. For n > 1, the n-dimensional hypercube is obtained from the Cartesian product of n number of H 1 hypercubes, i.e. H n = H n 1 H 1. An equivalent definition of H n is: V contains n long strings of 0 s and 1 s, and there is an edge between two vertices if they differ only in one element.

20 Subgraphs Subgraphs Definition (Subgraph) G = (ϕ, E, V ) is a subgraph of G = (ϕ, E, V ) (or G is a supergraph of G ) if G is a graph and E E, V V and ϕ ϕ. Definition (Induced subgraph) Let G = (ϕ, E, V ) be a subgraph of G = (ϕ, E, V ). G is a saturated (or full) subgraph induced by V if E contains all the edges of G with both endpoints in V (G is the largest subgraph with edges connected to V ) i.e. e E ϕ(e) V e E ϕ (e) = ϕ(e).

21 Subgraphs Complement graph Definition (Complement graph) The complement graph of G with regards to G is the graph (ϕ E\E, E \ E, V ). If G is a simple graph with n vertices, then the complement of G is the complement of G with regards to K n, i.e. the complement of a simple graph is the graph with the same vertices only the edges missing from the original graph. In the example below we have a simple graph, its complement, and the complete graph:

22 Subgraphs Deleting edges end vertices Definition (Deleting edges) Let G = (ϕ, E, V ) be a graph. If E E, the subgraph G = (ϕ E\E, E \ E, V ) is obtained by deleting the set of edges E. Definition (Deleting vertices) Let G = (ϕ, E, V ) be a graph. If V V, then G = (ϕ E\E, E \ E, V ) is the subgraph obtained by deleting the set of vertices V, where E = {e E : ϕ(e) V } i.e. the subset of edges which have either endpoint in V. Note: So if we delete a vertex, all the edges connected to it are deleted as well.

23 Subgraphs Walks Definition (Walks) Let G = (ϕ, E, V ) be a graph. A walk of length n from vertex v to vertex v is a finite sequence v 0, e 1, v 1,..., v n 1, e n, v n, where v 0 = v and v n = v and ϕ(e i ) = {v i 1, v i }, i.e. the edge e i connects the vertices v i 1 and v i. If v = v the walk is a closed walk, otherwise it is an open walk. Example (Walk) v 2 b d v 5 v c 3 v 4 e v 1 a f v 6 Open walk: v 1, a, v 3, c, v 4, f, v 6, e, v 5, d, v 4, c, v 3, b, v 2. Closed walk: v 1, a, v 3, c, v 4, f, v 6, e, v 5, d, v 4, c, v 3, a, v 1.

24 Subgraphs Trails Definition (Trails) Let G = (ϕ, E, V ) be a graph. If all the edges in a walk from v to v are different, then it is a trail (or a line), if this walk is closed then the trail is also a closed trail, otherwise it is open. Example (Trail) v 2 b d v 4 c v 3 e v 1 a f v 5 Open trail: v 1, a, v 3, d, v 4, e, v 5, f, v 3, b, v 2. Closed trail: v 1, a, v 3, d, v 4, e, v 5, f, v 3, b, v 2, c, v 1.

25 Subgraphs Paths and cycles Definition (Paths, cycles) Let G = (ϕ, E, V ) be a graph. If all the vertices v 0, v 1,..., v n are different in a walk, it is called a route or a path. An at least 1 long closed trail is a cycle (or circle) if all the vertices in the trail are different with the exception of the beginning and the end.

26 Subgraphs Distance, diameter Definition (Distance) The distance between two vertices v and v is the shortest (minimum) length of the walks between them (if there exists a walk between them, otherwise it is + ). Definition (Diameter) The diameter of a graph is the supremum (least upper bound) of the distances between all the vertices in the graph. (For a finite graph, you can use simply the maximum of the lengths).

27 Subgraphs Remarks Paths open trails open walks Every path is an open trail, but there are open trails which are not paths. Every open trail is an open walk, but there are open walks which are not open trails. Cycle closed trails closed walks Every cycle is a closed trail, but there are closed trails which are not cycles. Every closed trail is a closed walk, but there are closed walk which are not closed trails.

28 Subgraphs Examples Example (Closed walks) v 2 b d v 4 c v 3 e v 1 a f v 5 v 1, a, v 3, b, v 2, c, v 1 is a cycle, a closed trail, a closed walk. v 1, a, v 3, d, v 4, e, v 5, f, v 3, b, v 2, c, v 1 is an closed trail (and closed walk) but not a cycle. Example (Open walks) v 1, a, v 3, d, v 4, e, v 5 is a path, an open trail and an open walk. v 1, a, v 3, d, v 4, e, v 5, f, v 3 is an open trail (and an open walk), but not a path. v 1, a, v 3, d, v 4, e, v 5, f, v 3, d, v 4 is an open walk, but not an open trail.

29 Subgraphs Examples Theorem (Examples and clarification) A walk of length 0 is a path. Walks of length 1 are paths if they are not loops. A path can not contain loops, parallel edges or the same edge more than once. Ergo, paths are also trails. Cycles of length 1 are loop edges, cycles of length 2 contain two vertices and two parallel edges. Cycles of length 3, 4 etc. are sometimes referred to as a triangle, square etc.

30 Subgraphs Walk to path Theorem (Walk to path) With the previous notation, for each graph G, for each walk between v and v (v v ), a path between v and v can be obtained in G by deleting adequate e i, v i pairs. Proof. If v i = v j, i < j, then let us delete e i+1, v i+1, e i+2, v i+2,..., e j, v j from the walk, and repeat this procedure until all of the vertices in the remaining walk are all different. Because the length of the walk decreases after each step, the procedure eventually comes to a halt.

31 Subgraphs Closed trails are made up of disjoint cycles Theorem (Closed trails are made up of disjoint cycles) In every graph G, every closed trail of at least one length is the union of cycles with disjoint edges. Proof. If there are no repeating vertices on the trail, except the first and the last one, then it is a cycle and we are done. Otherwise there is at least one vertex recurring on the trail. At this vertex the trail can be split into two (shorter) closed trails. By repeating this procedure on the two closed subtrails, we obtain shorter and shorter closed trail, until we are left with only cycles.

32 Trees Connected graphs Definition (Connectedness, components) A graph is connected if there exists a walk (or equivalently a path) between any two vertices of the graph. The relation on V defined on two vertices if and only if they are connected via a walk (or path) is an equivalence relation (reflexive, transitive and symmetrical). The subgraphs spanned by the classes generated by this equivalence relation are the components of the original graph.

33 Trees Remarks about connectedness Remark about edges and components Two vertices from different components can not be adjacent so that each edge belongs to only one component. Equivalent definition of a connected graph A graph is connected if and only if it consists of one component.

34 Trees Trees Definition (Tree) A tree is a connected acyclic graph. Theorem (Equivalent definitions of trees) The following statements are equivalent for the simple graph G: 1. G is a tree (i.e. connected and without cycles); 2. G is connected, but deleting an edge makes it disconnected; 3. if v and v are different vertices of G, then there exists exactly one path between v and v ; 4. G does not contain any cycles, but the graph obtained by adding an edge between two of its vertices has a cycle.

35 Trees Proof of : If the edge between v and v is deleted, and the graph is connected, then there is a path between v and v in the subgraph, so returning that edge would introduce a cycle. 2 3: If there were two different paths between v and v : v = v 0, v 1, v 2,..., v n = v and v = v 0, v 1, v 2,..., v m = v. Let k = min{i : v i v i }. Deleting the edge between v k 1 and v k would leave the graph connected, because in all walks, that edge can be replaced with the walk v k 1, v k, v k+1,..., v m = v = v n, v n 1..., v k+1, v k. 3 1: If there is a cycle v, v,..., v in the graph, then there are two paths from v to v.

36 Trees Proof Proof of : A tree has no cycles and adding a loop, adds a cycle. Adding a new edge with endpoints v v and combining this edge with the path from v to v again introduces a cycle. 4 1: Add a temporary edge to the graph with endpoints v and v. The temporary edge is part of a cycle. So deleting the temporary edge from the cycle leaves us with a path from v to v in the original graph. Since this is true for each vertex pair v, v, the graph is connected.

37 Trees Two vertices with degree one Theorem (Two vertices with degree one) If a finite graph G contains no cycles, but contains edges, then there are at least two vertices with degree one. Proof. There must be a path of maximal length in G, e.g. from v to v, then either deg(v) = 1 = deg(v ) or if e.g. deg(v) 1 then there is a vertex w connected to v. If w is not on the path, the path is not of maximal length. If w is on the path, the graph would contain a cycle.

38 Trees Number of edges in a tree Theorem (Alternative definitions of trees) The following statements are equivalent for the simple finite graph G with n vertices: 1. G is a tree; 2. G has no cycles and has n 1 edges; 3. G is connected and has n 1 edges.

39 Trees Proof (part 1) Proof of 1 2. We need to show for acyclic graphs, that connectedness implies n 1 edges. For n = 1 it is trivial, we proceed with induction on n. Suppose the statement is true for all graphs with less than n vertices, and let G be a tree with n vertices and v n a vertex with only one adjacent vertex v n 1 (by the previous theorem there has to be such v n vertex). Deleting v n reduces the number of edges and vertices by one. The remaining graph is also a tree (acyclic and connected), because v n is an endpoint of some path. The induction hypothesis is true for the smaller graph, so it will be true for the original graph.

40 Trees Proof (part 2) Proof of 2 3. We need to show for a graph with n 1 edges, that if it has no cycles, then it is connected. Using the same reasoning and same notation as in the previous part of the proof, deleting v n is connected to v n 1, and by induction v n 1 is connected with the rest of the graph.

41 Trees Proof (part 3) Proof of 3 1. We need to show for a connected graph, that if it has n 1 edges, it has no cycles. If G would have a cycle, then deleting any edge from the cycle would leave us with a connected graph. Continue deleting the edges until no cycles are left but leaving the graph connected, i.e. until a tree is obtained. If we deleted k edges, then we obtain a tree with n vertices and n k 1 edges. But since we proved that 1 implies 2, only k = 0 is possible.

42 Trees Spanning tree Definition (Spanning tree) The spanning tree of G is a subgraph T which is a tree and has the same set of vertices as G. Note: Of course only connected graphs have spanning trees. Theorem (Existence of Spanning trees) Every connected (finite) graph has a spanning tree. Proof Keep deleting edges of cycles while there are cycles, and while the graph remains connected. After a finite number of steps, the process stops: the remaining graph has no cycles and it is connected.

43 Trees Number of cycles Theorem (Number of cycles) A finite connected graph G = (ϕ, E, V ) contains at least E V + 1 cycles with different sets of edges. Proof. 1. Let T be a spanning tree of G. It has V 1 edges. 2. Let E be the set of edges of G which are not in T. 3. If e E, then adding this edge to T introduces a cycle C e. 4. Of course, C e is part of the original graph. 5. The edge e is on the cycle C e, but if e e E, then e is not in C e, so the sets of edges of each cycle C e for each e E are mutually different.

44 Trees Remarks The set of edges of each cycle C e is uniquely defined by each e E, because if adding an edge to the spanning tree T would yield two different cycles, that would mean that there were two different paths between the end points of the edge added in T, so T wouldn t be a tree. This system of cycles is the basic cycle system determined by the spanning tree T. There might be other cycles in the graph, but it can be shown that all cycles can be systematically expressed using the basic cycle system. The boundary given in the theorem is only a lower bound, e.g. the graph defined by the edges of a tetrahedron has more than E V + 1 edges.

45 Trees Separating two vertices Definition (Separating two vertices) Let G = (ϕ, E, V ) a graph. If v, v are vertices, V V, and for each path from v to v, there exists a vertex v V which is on that path, then V separates v and v. If E E, and for each path from v to v contains an edge e E, then E separates v and v. Remark If you delete the elements of V or E from G, v and v will end up in different components of the remaining graph.

46 Trees Separating sets Definition (Separating sets) If there are vertices which are separated by a set of edges E, then E separates G. If E E separates G and E has no non-trivial subset which also separates G, then E is a separating set. Remark If E separates G, then deleting the E from G will increase the number of components of G. The separating set is a minimal set which separates G.

47 Trees Number of separating sets Theorem (Number of separating sets) In a finite connected graph G = (ϕ, E, V ) there are at least V 1 separating sets.

48 Trees Proof of number of separating sets Proof. Let T be a spanning tree of G and E the set of its edges. 1. If we remove an edge e E from T it will be separated into two components: T 1 and T E = V 1 and for each edge e E the set E e = (E \ E ) {e} separates G so it contains at least one separating set. E e separates G because all the paths from T 1 to T 2 either go through e or one of the edges in E \ E. 3. Let this separating set be S e, so that e S e and S e E e, then for each e E the separating sets S e are different. Moreover, E e contains exactly one cut set which contains e and the edges from E \ E which have one end in T 1 and the other in T 2.

49 Trees Forests Definition (Forest) A graph without cycles is a forest. Remarks The components of a forest are trees. Trees are connected forests. The number of edges of a finite forest is: V C where C is the number of components.

50 Trees Spanning forests Definition (Spanning forest) A subgraph, which consists of spanning trees of the components of its supergraph is a spanning forest of the supergraph. Remarks Forests and spanning forests to unconnected graphs are the same as trees and spanning trees to connected graphs.

51 Special walks Euler trails Definition (Euler trail) In a finite graph, a trail form v to v or a closed trail is an Euler trail if it contains all edges of the graph. Parity of degrees in graph with Euler trails If the trail is closed (i.e. v = v ) then the degrees of all vertices are even. The Euler trail enters and leaves each vertex the same number of times. If v v then v and v have odd degrees, and each vertex, excluding v and v, have even degrees. The converse is also true.

52 Special walks Euler trails Theorem (Decomposition of finite connected graphs) 1. A finite connected graph contains a closed Euler trail if and only if all vertices have even degrees. 2. If a finite connected graph contains 2s number of vertices with odd degrees, where s N +, then the graph is made up of s number of trails with mutually disjoint sets of edges.

53 Special walks Proof (part 1) Proof for s = 0. For s = 0 i.e. when d(v) is even, the proof is constructive: Start with a single vertex v V, which is a closed trail with no edges. Extend this closed trail into a longer closed trail, until all edges are used up as follows: 1. If there is an unused edge, there is a vertex v connected to it. 2. Start a trail from v always choosing unused edges. 3. Because all vertices are connected to an even number of unused edges, the procedure/algorithm can only stop at v. 4. The previous closed trail is extended with the previously discovered closed trail, and if there are unused edges, we repeat the procedure.

54 Special walks Proof (part 2) Proof for s > 0. Let s > Connect the 2s number of vertices with odd degrees in pairs with s number of temporary edges. 2. The graph including the temporary edges contains a closed Euler trail (because every vertex has even degrees). 3. Deleting the s number of virtual edges, breaks up the closed Euler trail into s number of open trails with mutually disjoint sets of edges.

55 Special walks Hamilton paths Definition (Hamilton path) A path from v to v is a Hamiltonian path if it contains all vertices of a graph. Definition (Hamiltonian cycle, Hamiltonian graph) A Hamiltonian cycle (or Hamiltonian circuit) is a cycle which contains all vertices of the graph. A graph is a Hamiltonian graph if it contains a Hamiltonian cycle.

56 Special walks Ore s theorem Theorem (Ore s theorem) Let G be a (finite and simple) graph with n 3 vertices. If deg(v) + deg(w) n for every pair of non-adjacent vertices v and w, then G is Hamiltonian.

57 Special walks Proof (part 1) Proof of Ore s theorem. If a graph is not Hamiltonian, then deg(v) + deg(w) < n for at least one pair of non-adjacent vertices v and w. 1. For each G graph which is non-hamiltonian, there is a non-hamiltonian graph H which is a supergraph of G, but adding any edge to H would introduce a Hamiltonian cycle. 2. Let v and w be any two non-adjacent vertices in H. 3. Adding the edge between v and w introduces a Hamiltonian cycle, ergo there is a Hamiltonian path v = v 1, v 2,..., v n = w.

58 Special walks Proof (part 2) Proof of Ore s theorem 4. For each index i in the range 2 i n, consider the two possible edges in H from v 1 to v i and from v i 1 to v n. 5. At most one of these two edges can be present in H, otherwise the cycle v 1, v 2,..., v i 1, v n, v n 1...., v i would be a Hamiltonian cycle. 6. The total number of edges connected to either v 1 or v n is at most equal to the number of choices of i, which is n So in H, deg(v) + deg(w) < n. 8. The degree of vertices in G are at most equal to the degrees in H, so deg(v) + deg(w) < n is also true in G.

59 Special walks Consequence of Ore s theorem Theorem (Dirac s theorem) If a finite simple graph G with n 3 vertices has deg(v) n/2 for all vertices v, then G is Hamiltonian. Proof. Because deg(v) n/2 for all vertices, deg(v) + deg(w) n/2 + n/2 = n, therefore by Ore s theorem, G is Hamiltonian.

60 Labeling of graphs Labeled and weighted graphs Definition (Labeled and weighted graphs) In practice, edges and/or vertices hold additional data. If G = (ϕ, E, V ) is a graph, L e and L v are the sets of labels (for edges and vertices respectively), furthermore the labeling maps of edges and vertices are l e : E L e and l v : V L v, then (ϕ, E, V, l e, L e, l v, L v ) is a labeled graph. Sometimes only the edges or only the vertices are labeled, then the adequate elements are omitted. Sometimes the word coloring is used instead of labeling, and the labels are called colors.

61 Labeling of graphs Weighted graphs Weighted graphs Often L e = R or L v = R, and in this case the term weighted graph is used and the weight map w connects the elements of the graph to their weights. In a (ϕ, E, V, w) graph with weighted edges, the weight of E E is w(e ) = e E w(e), and in a graph with weighted vertices, the weight of V V is w(v ) = v V w(v).

62 Labeling of graphs Kruskal s algorithm Theorem (Kruskal s algorithm) Let G = (ϕ, E, V, w) be a finite weighted undirected graph. The following algorithm finds a spanning forest of G with minimal weight. 1. Initialize: E. 2. Terminate?: If E {e} contains a cycle for each edge e E \ E, then the edges in E are the edges of a minimal weight spanning forest. 3. Expand E : Let e E \ E an unused edge with minimal weight which doesn t introduce a cycle in E and set E E {e}. Go to step 2.

63 Labeling of graphs Example A 1 B 3 C D 4 E 2 F

64 Labeling of graphs Proof of Kruskal s algorithm. It is enough to restrict the proof to one component only. 1. It is clear, that the result will be a spanning tree T. 2. Suppose a T spanning tree with minimal weight, which has the most possible common edges with T, and with smaller weight than T (then T is not a spanning tree with minimal weight). 3. Let e be an edge of T which is not an edge of T. 4. If e is added to T then this will add exactly one C cycle. 5. For all e edges of the C cycle, it is true that w(e) w(e ), because if w(e) > w(e ) then the algorithm would have chosen e instead of e. 6. If we omit e from T, then it will not be connected, and it will separate into two components.

65 Labeling of graphs Proof (part 2) Proof of Kruskal s algorithm. 7. There has to be one more edge e on the cycle C which connects the two components (e is obviously not from T ), and if we swap e for e in T we get another tree T. 8. We have shown that w(e ) w(e ). 9. If w(e ) < w(e ), then the weight of T would be strictly less than the weight of T, and that would imply that T is not a spanning tree of minimal weight, which leads to a contradiction. 10. On the other hand, w(e ) = w(e ) would imply that T has more common edges with T than T, which is again a contradiction.

66 Labeling of graphs Remarks Remark Kruskal s algorithm is an example of a greedy algorithm, because it always chooses the best possible solution. However this greedy strategy does not always give optimal results with all algorithms, e.g. see TSP (traveling salesman problem). Counter example The TSP is equivalent to finding a Hamiltonian path in a graph. v 2 2 v 3 0 v v 4 99

67 Directed graphs Basic definitions Directed graph Definition (Directed graph) A directed graph G = (ψ, E, V ) is a triplet with E as the set of edges, V as the set of vertices, and ψ : E V V. If ψ(e) = (v, v ), then v is the tail endpoint and v is the head endpoint of the edge e. Remarks Some authors, define E V V, or a bit inaccurately, omit the connection map and use the G = (E, V ) notation. For every directed graph G = (ψ, E, V ) there is a corresponding undirected graph G = (ϕ, E, V ) which can be obtained by forgetting the direction, i.e. if ψ(e) = (v, v ) then ϕ = {v, v }. It is also said that G is an orientation of G. One graph usually has multiple orientations.

68 Directed graphs Basic definitions Other definitions Most of the definitions, e.g. labels, weights etc., from undirected graphs can be extended onto directed graphs by considering the corresponding undirected graph. Definition (Transpose, strictly parallel) The transpose of the graph G = (ψ, E, V ) is G = (ψ, E, V ) for which ψ(e) = (v, v ) if and only if ψ (e) = (v, v). (Of course, the reversed loop is equal to itself.) The edges e 1 e 2, are strictly parallel if ψ(e 1 ) = ψ(e 2 ).

69 Directed graphs Basic definitions Other definitions Definition (E + (S) and E (S)) Let S V, then E + (S) the set of edges with tail endpoints in S and head endpoints in V \ S, or E + (S) = {e E : v v (v S v V \S (v, v ) = ψ(e))} E (S) is the set of edges with tail endpoints in V \ S and head endpoints in S or E (S) = {e E : v v (v S v V \S (v, v) = ψ(e))} E(S) = E + (S) E (S) and E + (S) = E (V \ S).

70 Directed graphs Basic definitions Degrees of vertices Definition (Outdegree and indegree, sink and source) The outdegree of the vertex v V is d + (v) = {e E : v (v V (v, v ) = ψ(e))} (sometimes deg + (v) or δ + (v)), i.e. the number of edges with tail endpoint v. If d + (v) = 0 then v is a sink. The indegree of the vertex v V is d (v) = {e E : v (v V (v, v) = ψ(e))} (sometimes deg (v) or δ (v)), i.e. the number of edges with head endpoint v. If d (v) = 0 then v is a source.

71 Directed graphs Basic definitions Degrees and edges Theorem (The connection between the sum of degrees and number of edges) In a finite directed graph, d + (v) = d (v) = E v V v V since each edge increases both sums by one (by introducing one tail and one head endpoint).

72 Directed graphs Isomorphic graphs Isomorphism for directed graphs Definition (Isomorphism for directed graphs) The graphs G = (ψ, E, V ) and G = (ψ, E, V ) are isomorphic if f : E E bijection and g : V V bijection, so e E ψ(e) = (v, v ) ψ (f (e)) = (g(v), g(v )) i.e. the (f, g) pair preserves the tail and head endpoint relations. Example (Some special graphs) Again we can talk about a class (or set) of graphs as one graph, e.g. C n is the directed cycle of n vertices; P n is the n long directed path; S n is the directed star, with n vertices with zero indegrees and one outdegrees and one vertex with n indegrees and zero outdegrees; K n is the directed complete graph.

73 Directed graphs Representation of graphs List representation List representation A directed graphs can be represented with an array of lists. After enumerating the vertices, each entry in the array is a list of (n, n ) pairs, where n is the number of v and n the number of v. Additional information can be stored with the list entries. For undirected graphs, each edge is stored twice, once for each endpoint.

74 Directed graphs Representation of graphs Matrix representation An m n matrix is a table of m rows and n columns, and the i-th row and j-th column is a i,j (1 i m and 1 j n). Let G = (ψ, E, V ) be a directed graph, E = {e 1, e 2,..., e m }, V = {v 1, v 2,..., v n }.

75 Directed graphs Representation of graphs Matrix representation Incidence matrix The incidence matrix of G is an n m matrix, where 1 i n, 1 j m and a i,j = 1 if v i is a tail endpoint of e j and a i,j = 1 if v i is a head endpoint of e j. If G is undirected, then the elements of the matrix are a i,j. Adjacency matrix The adjacency matrix for G is an n n matrix where 1 i, j n and a i,j is the number of edges from v i to v j. If G is undirected, a i,i is the number of loop edges connected to v i and a i,j is the number of edges connecting v i and v j.

76 Directed graphs Representation of graphs Example of graph matrices v 1 e 2 e 6 e 4 v 2 v 4 v 5 e 3 e 1 e 5 e 10 e 7 e 8 e 9 v 3 Incidence matrix: Adjacency matrix:

77 Directed graphs Subgraphs Subgraphs Definition (Directed subgraphs) The graph G = (ψ, E, V ) is a directed subgraph of G = (ψ, E, V ) if E E, V V and ψ ψ. It also said that G is a directed supergraph of G. If E contains all edges with both tail and head endpoints in V, then G is a saturated subgraph induced by V. If G = (ψ, E, V ) is a directed subgraph of G = (ψ, E, V ), then the complement of G with respect to G is the graph (ψ E\E, E \ E, V ).

78 Directed graphs Subgraphs Deleting edges and vertices Definition (Deleting edges and vertices from graphs) Let G = (ψ, E, V ) be a directed graph. If E E, then the subgraph obtained by deleting the set of edges E is G = (ψ E\E, E \ E, V ). If V V, then let E = {e E : v v (ψ(e) = (v, v ) ψ(e) = (v, v)) v V } then the subgraph obtained by deleting the set of vertices V is G = (ψ E\E, E \ E, V \ V ).

79 Directed graphs Subgraphs Walks, trails, paths Definition (Directed walks, trails, paths and cycles) Let G = (ψ, E, V ) be a directed graph. An directed walk of length n from v to v in G is a finite sequence v 0, e 1, v 1, e 2, v 2,..., v n 1, e n, v n, where the ψ(e i ) = (v i 1, v i ) for each 1 i n with v 0 = v and v n = v. If v = v then it is a closed directed walk, otherwise it is an open directed walk. If all the edges differ in a directed walk, then it is a directed trail. If the directed walk is closed, then it is a closed directed trail, otherwise it is an open directed trail. A directed walk is a directed path if all the v 0, v 1,..., v n vertices are different. A directed trail of at least one length is a directed cycle, if all the vertices are different except the first and the last one.

80 Directed graphs Subgraphs Strong connectivity Definition (Strong connectivity) A directed graph is strongly connected if between any pair of vertices (v, v ) there is a directed path from v to v and from v to v as well. On the vertices of a given directed graph, the relation that there is a directed path from one vertex to another, and from the other one to the first is an equivalence relation, and therefore it defines a classification of the vertices. A directed subgraph induced by the vertices in one such class is a strong component of the directed graph. A graph is strongly connected if and only if all of it s vertices belong to one class, i.e. it has only one strong component.

81 Directed graphs Subgraphs Example Unlike with undirected graphs, not all edges belong to a component. v 2 v 2 v 3 v 3 v 1 v 1 The above graph is connected but not strongly connected. {v 1, v 2, v 3 } and {v 1, v 2, v 3 } are the two strong components of the graph, and the edge between v 3 and v 3 does not belong to either of them.

82 Directed graphs Directed trees Directed trees Definition (Directed tree) A directed tree is a directed graph which is an (undirected) tree, and exactly one vertex with indegree 0 and all the other vertices with indegree 1. (A directed tree can be defined as the traverse of the above defined graph.) The vertex with indegree 0 is the root of the tree.

83 Directed graphs Directed trees Directed trees Definition (Depth, height, parent, child, siblings) Using induction on the length of a path, it can be shown, that there is exactly one (directed) path to each vertex from the root. The length of this path is the depth of the vertex. The maximum of the depths of vertices is the height of the tree. If there is an edge with v as its tail endpoint and v as its head endpoint, then v is the parent of v and v is a child of v, If two vertices have the same parent then they are siblings. The vertices of a directed tree with outdegree 0 are the leaves.

84 Directed graphs Directed trees Directed subtrees Definition (Directed subtree) For each vertex v there is a unique set of vertices to which there leads a directed path from v. The directed subgraph induced by these vertices is a directed tree with v as its root, and this directed subgraph is the directed subtree with v as its root.

85 Directed graphs Directed trees Rooted tree Definition (Rooted tree) An undirected tree with a vertex designated as the root is a rooted tree. There exists exactly one orientation of that tree which is a directed tree with the same root vertex as the designated one: each vertex is the head endpoint of the last edge of the only path from the designated root vertex to the mentioned vertex (which will be the tail endpoint for all the other edges). Therefore designating a root vertex is equivalent to providing an orientation of a directed tree.

86 Directed graphs Directed trees Binary trees, ternary trees, q-ary trees q-ary tree A q-ary tree is a directed tree with edges labeled with non-negative integers less than q, so that all edges coming from the same vertex have different labels. The most notable case is q = 2 i.e. the binary tree: here left edge, or left child and right edge or right child are used instead of labels 0 and 1. We remark, that if two q-ary trees differ only in the labels, they are still considered not equal, e.g. in a binary tree with only one edge, it s important if it s a left or a right edge. Directed trees are usually drawn with the root at the top. 1 1 This isn t consistent with the name tree, but it s consistent with the way we think about them, a parent is above the children etc.

87 Directed graphs Directed trees Theorem (Dijkstra s algorithm) Let (ψ, E, V, w) be a directed weighted graph with w(e) > 0 for each e E, s V and T V. The following algorithm calculates d(v) = the minimal weight of directed paths from s to v, for each v T (or + if there is no path). 1. Initialization: S (S is the set of finished vertices), H {s}, H is the set of vertices being processed ) and d(s) 0; v V \ {s} d(v) Terminate?: If T S or H =, then terminate. 3. Expand S: Let t H so that d(t) = min{d(t ) : t H}. S S {t} and H H \ {t}, and for each edge e coming from t to v V \ S, if d(t) + w(e) < d(v), then d(v) d(t) + w(e) if v H, then put v into H. Go to 2.

88 Directed graphs Directed trees Example v 1 v 1 s v 3 2 v v 2 0 s v 3 2 v S = H = {s} v 2

89 Directed graphs Directed trees Example v 1 10 v s v 3 2 v S = {s} H = {v 1, v 3 } 4 v 2 0 s v v S = {s, v 3 } H = {v 1, v 2, v 4 } v 2 14

90 Directed graphs Directed trees Example v 1 8 v s v v s v v v 4 S = {s, v 3, v 4 } H = {v 1, v 2 } 7 v 4 S = {s, v 1, v 3, v 4 } H = {v 2 }

91 Directed graphs Directed trees Proof of Dijkstra s algorithm Proof. The proof is by induction on the S, by showing that: 1. for every t S the value of d(t) is the minimal weight of the directed walks from s to t, and 2. if v H, then every directed walk from s to v, which has every vertex in S except v, has a weight of at least d(v). After the first initialization step, this is trivially true. Let t H (chosen in step 3), and consider an arbitrary directed walk with weight W from s to t. We will show, that d(t) W : Let t be the first vertex on the walk which is not in S and W the weight of the subwalk from s to t. Because we chose t to have minimal value of d(t) we have d(t) d(t ) by 2. of the induction hypothesis d(t ) W, and W W (why?).

92 Directed graphs Directed trees Proof part 2 Now we prove that if v H, then every directed walk from s to v, which has every vertex in S except v, has a weight of at least d(v): After updating the value of d(v) in the third step, if a walk goes from s to v and its last vertex is not in S, then let v be the vertex before the last and e the last edge. Since v S and the weight of the subwalk from s to v is at least d(v ), the weight of the entire walk has to be at least d(v ) + w(e) = d(v), and when v is added to S, d(v) can be set at most to this value, and afterwards it can only decrease.

93 Planar graphs, chromatic number Drawing graphs in a plane Planar graphs Definition (Planar graph) A planar graph is a graph that can be embedded in the plane, i.e., it can be drawn on the plane (R 2 ) in such a way that its edges intersect only at their endpoints. In other words, it can be drawn in such a way that no edges cross each other. Such a drawing is called a plane graph representation or planar embedding of the graph. Remark Not all graphs are planar, i.e. not all graphs can be embedded in R 2 (not even all finite graphs are planar). However every (finite) graph can be embedded in R 3.

94 Planar graphs, chromatic number Drawing graphs in a plane Faces Definition (Face) Given a planar embedding of a graph G, a face is the subset of points of the plane bounded by edges of G, i.e. a face is a set of points, such that between any two points of a face, there is a line (curve) in the plane, such that it does not cross any of the edges (or vertices) of G. A face can be unbounded, and in that case it is an external face, otherwise it is an internal face. Remark The status of internal/external face is not significant: An external face can become an internal face in a different planar embedding, however the number of faces is independent from the embedding.

95 Planar graphs, chromatic number Drawing graphs in a plane Examples Non-planar and planar embedding v2 v4 v2 e 4 e 1 e 2 e 3 e 1 e 2 e 3 v3 v1 v3 v1 e 4 v4 External/internal faces

96 Planar graphs, chromatic number Drawing graphs in a plane Drawing graphs Theorem (Euler s formula) Let G = (ϕ, E, V ). For any planar embedding of G E + 2 = V + f, where f is the number of faces. Sketch of the poof. Suppose there is a cycle in G. By deleting an edge of the cycle, two faces are merged, so both f and E is reduced by 1. In the end, we obtain a tree for which the equation holds (why?).

97 Planar graphs, chromatic number Drawing graphs in a plane Number of edges and vertices of planar graphs Theorem (Number of edges and vertices of planar graphs) If G = (ϕ, E, V ) is a simple, connected, planar graph with V 3, then E 3 V 6. Proof. For V = 3 we have two cases P 2 and C 3 both of which satisfy the inequality. If V > 3, then E 3 (why?). Since G is simple, every region is surrounded by at least 3 edges, so counting by faces, there should be 3f edges, and every edge separates two regions, so 2 E 3f. Using Euler s formula we get 2 E 3( E + 2 V ) which can be transformed to E 3 V 6, i.e. E 3 V 6. Remark The theorem holds for disconnected graphs as well, since it can be made planar by adding edges.

98 Planar graphs, chromatic number Drawing graphs in a plane The vertices with the least degree in a planar graph Theorem (The vertex with the least degree in a planar graph) If G = (ϕ, E, V ) be a simple, connected, planar graph, then δ = min v V deg(v) 5. Proof. We can assume V 3 (why?). Indirectly, suppose δ 6. Then 6 V 2 E (why?), furthermore, using the previous theorem 2 E 6 V 12, implying 6 V 6 V 12.

99 Planar graphs, chromatic number Drawing graphs in a plane K 3,3 is not planar Proof that K 3,3 not planar. Indirectly suppose K 3,3 is a planar graph with f number of faces. Then E = 9 and V = 6 and by Euler s formula f = 5. Since it is a simple bipartite graph, each face is surrounded by at least 4 edges (why?), and every edge separates at most 2 faces, so 4f 2 E, implying 20 18, which is a contradiction.

100 Planar graphs, chromatic number Drawing graphs in a plane K 5 is not planar Proof that K 5 not planar. Indirectly suppose that K 5 is a planar graph. Then E = 10 and V = 5, and using the theorem about the number of edges and vertices in planar graphs we get: = 9, which is a contradiction.

101 Planar graphs, chromatic number Drawing graphs in a plane Definition (Topologically isomorphic graphs) The finite graphs G and G are topologically isomorphic if they can be converted to isomorphic graphs applying the following transformation or its inverse a finite number of times: delete a vertex with degree two and connect its neighboring vertices with an edge. Theorem (Kuratowski s theorem) A simple and finite graph can be drawn in a plane if and only if it has no subgraph topologically isomorphic to the K 5 complete graph with 5 vertices or the K 3,3 three houses, three wells graph.

102 Planar graphs, chromatic number Graph colouring Chromatic number Chromatic number Definition (k-coloring) A k-colouring of a graph G is a vertex colouring (labeling) using only k colours, such that no two adjacent vertices receive the same colour. Definition (Chromatic number) The chromatic number of a graph is the smallest value of k possible to obtain a k-colouring of the graph. Theorem (Four colour theorem) Every planar graph is 4-colourable. The story about the proof. This was the first theorem prooved by a computer, (Appel and Haken 1976). The program ran for 1200 hours and tried 1936 counter examples.

103 Planar graphs, chromatic number Graph colouring Chromatic number About the four colour theorem Remarks There is a bijection between a planar graph with n vertices and a maps with n connected regions (or countries). The capitals of the countries are the vertices, and two vertices are connected, iff the corresponding countries share a border. Therefore, the four colour theorem states, that the (connected) regions on every map can always be coloured using only four colours, so that neighbours have different colours. The chromatic number of a graph is 1 iff it has no edges, and 2 iff it is a bipartite graph. The chromatic number of planar graphs is at most 4.

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

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

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

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

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

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

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

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

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

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

Graphs and trees come up everywhere. We can view the internet as a graph (in many ways) Web search views web pages as a graph

Graphs and trees come up everywhere. We can view the internet as a graph (in many ways) Web search views web pages as a graph Graphs and Trees Graphs and trees come up everywhere. We can view the internet as a graph (in many ways) who is connected to whom Web search views web pages as a graph Who points to whom Niche graphs (Ecology):

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

Introduction to Graph Theory

Introduction to Graph Theory Introduction to Graph Theory Tandy Warnow January 20, 2017 Graphs Tandy Warnow Graphs A graph G = (V, E) is an object that contains a vertex set V and an edge set E. We also write V (G) to denote the vertex

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

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

MATH 350 GRAPH THEORY & COMBINATORICS. Contents

MATH 350 GRAPH THEORY & COMBINATORICS. Contents MATH 350 GRAPH THEORY & COMBINATORICS PROF. SERGEY NORIN, FALL 2013 Contents 1. Basic definitions 1 2. Connectivity 2 3. Trees 3 4. Spanning Trees 3 5. Shortest paths 4 6. Eulerian & Hamiltonian cycles

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

4. (a) Draw the Petersen graph. (b) Use Kuratowski s teorem to prove that the Petersen graph is non-planar.

4. (a) Draw the Petersen graph. (b) Use Kuratowski s teorem to prove that the Petersen graph is non-planar. UPPSALA UNIVERSITET Matematiska institutionen Anders Johansson Graph Theory Frist, KandMa, IT 010 10 1 Problem sheet 4 Exam questions Solve a subset of, say, four questions to the problem session on friday.

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

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

UNDIRECTED GRAPH: a set of vertices and a set of undirected edges each of which is associated with a set of one or two of these vertices.

UNDIRECTED GRAPH: a set of vertices and a set of undirected edges each of which is associated with a set of one or two of these vertices. Graphs 1 Graph: A graph G = (V, E) consists of a nonempty set of vertices (or nodes) V and a set of edges E. Each edge has either one or two vertices associated with it, called its endpoints. An edge is

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

Treewidth and graph minors

Treewidth and graph minors Treewidth and graph minors Lectures 9 and 10, December 29, 2011, January 5, 2012 We shall touch upon the theory of Graph Minors by Robertson and Seymour. This theory gives a very general condition under

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

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

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

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

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

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 CS/Math231 Discrete Mathematics Spring2015

Graph Theory CS/Math231 Discrete Mathematics Spring2015 1 Graphs Definition 1 A directed graph (or digraph) G is a pair (V, E), where V is a finite set and E is a binary relation on V. The set V is called the vertex set of G, and its elements are called vertices

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

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

Graphs (MTAT , 6 EAP) Lectures: Mon 14-16, hall 404 Exercises: Wed 14-16, hall 402

Graphs (MTAT , 6 EAP) Lectures: Mon 14-16, hall 404 Exercises: Wed 14-16, hall 402 Graphs (MTAT.05.080, 6 EAP) Lectures: Mon 14-16, hall 404 Exercises: Wed 14-16, hall 402 homepage: http://courses.cs.ut.ee/2012/graafid (contains slides) For grade: Homework + three tests (during or after

More information

CMSC Honors Discrete Mathematics

CMSC Honors Discrete Mathematics CMSC 27130 Honors Discrete Mathematics Lectures by Alexander Razborov Notes by Justin Lubin The University of Chicago, Autumn 2017 1 Contents I Number Theory 4 1 The Euclidean Algorithm 4 2 Mathematical

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

Graphs. Introduction To Graphs: Exercises. Definitions:

Graphs. Introduction To Graphs: Exercises. Definitions: Graphs Eng.Jehad Aldahdooh Introduction To Graphs: Definitions: A graph G = (V, E) consists of V, a nonempty set of vertices (or nodes) and E, a set of edges. Each edge has either one or two vertices associated

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

Basic Combinatorics. Math 40210, Section 01 Fall Homework 4 Solutions

Basic Combinatorics. Math 40210, Section 01 Fall Homework 4 Solutions Basic Combinatorics Math 40210, Section 01 Fall 2012 Homework 4 Solutions 1.4.2 2: One possible implementation: Start with abcgfjiea From edge cd build, using previously unmarked edges: cdhlponminjkghc

More information

Lecture 2 - Graph Theory Fundamentals - Reachability and Exploration 1

Lecture 2 - Graph Theory Fundamentals - Reachability and Exploration 1 CME 305: Discrete Mathematics and Algorithms Instructor: Professor Aaron Sidford (sidford@stanford.edu) January 11, 2018 Lecture 2 - Graph Theory Fundamentals - Reachability and Exploration 1 In this lecture

More information

8 Colouring Planar Graphs

8 Colouring Planar Graphs 8 Colouring Planar Graphs The Four Colour Theorem Lemma 8.1 If G is a simple planar graph, then (i) 12 v V (G)(6 deg(v)) with equality for triangulations. (ii) G has a vertex of degree 5. Proof: For (i),

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

Module 11. Directed Graphs. Contents

Module 11. Directed Graphs. Contents Module 11 Directed Graphs Contents 11.1 Basic concepts......................... 256 Underlying graph of a digraph................ 257 Out-degrees and in-degrees.................. 258 Isomorphism..........................

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

Trees. 3. (Minimally Connected) G is connected and deleting any of its edges gives rise to a disconnected graph.

Trees. 3. (Minimally Connected) G is connected and deleting any of its edges gives rise to a disconnected graph. Trees 1 Introduction Trees are very special kind of (undirected) graphs. Formally speaking, a tree is a connected graph that is acyclic. 1 This definition has some drawbacks: given a graph it is not trivial

More information

11.9 Connectivity Connected Components. mcs 2015/5/18 1:43 page 419 #427

11.9 Connectivity Connected Components. mcs 2015/5/18 1:43 page 419 #427 mcs 2015/5/18 1:43 page 419 #427 11.9 Connectivity Definition 11.9.1. Two vertices are connected in a graph when there is a path that begins at one and ends at the other. By convention, every vertex is

More information

On the Relationships between Zero Forcing Numbers and Certain Graph Coverings

On the Relationships between Zero Forcing Numbers and Certain Graph Coverings On the Relationships between Zero Forcing Numbers and Certain Graph Coverings Fatemeh Alinaghipour Taklimi, Shaun Fallat 1,, Karen Meagher 2 Department of Mathematics and Statistics, University of Regina,

More information

Simple graph Complete graph K 7. Non- connected graph

Simple graph Complete graph K 7. Non- connected graph A graph G consists of a pair (V; E), where V is the set of vertices and E the set of edges. We write V (G) for the vertices of G and E(G) for the edges of G. If no two edges have the same endpoints we

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 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

0.0.1 Network Analysis

0.0.1 Network Analysis Graph Theory 0.0.1 Network Analysis Prototype Example: In Algonquian Park the rangers have set up snowmobile trails with various stops along the way. The system of trails is our Network. The main entrance

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

Hamilton paths & circuits. Gray codes. Hamilton Circuits. Planar Graphs. Hamilton circuits. 10 Nov 2015

Hamilton paths & circuits. Gray codes. Hamilton Circuits. Planar Graphs. Hamilton circuits. 10 Nov 2015 Hamilton paths & circuits Def. A path in a multigraph is a Hamilton path if it visits each vertex exactly once. Def. A circuit that is a Hamilton path is called a Hamilton circuit. Hamilton circuits Constructing

More information

Chapter 1 Graph Theory

Chapter 1 Graph Theory Chapter Graph Theory - Representations of Graphs Graph, G=(V,E): It consists of the set V of vertices and the set E of edges. If each edge has its direction, the graph is called the directed graph (digraph).

More information

MAT 7003 : Mathematical Foundations. (for Software Engineering) J Paul Gibson, A207.

MAT 7003 : Mathematical Foundations. (for Software Engineering) J Paul Gibson, A207. MAT 7003 : Mathematical Foundations (for Software Engineering) J Paul Gibson, A207 paul.gibson@it-sudparis.eu http://www-public.it-sudparis.eu/~gibson/teaching/mat7003/ Graphs and Trees http://www-public.it-sudparis.eu/~gibson/teaching/mat7003/l2-graphsandtrees.pdf

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

Algorithms. Graphs. Algorithms

Algorithms. Graphs. Algorithms Algorithms Graphs Algorithms Graphs Definition: A graph is a collection of edges and vertices. Each edge connects two vertices. Algorithms 1 Graphs Vertices: Nodes, points, computers, users, items,...

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

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

Let G = (V, E) be a graph. If u, v V, then u is adjacent to v if {u, v} E. We also use the notation u v to denote that u is adjacent to v.

Let G = (V, E) be a graph. If u, v V, then u is adjacent to v if {u, v} E. We also use the notation u v to denote that u is adjacent to v. Graph Adjacent Endpoint of an edge Incident Neighbors of a vertex Degree of a vertex Theorem Graph relation Order of a graph Size of a graph Maximum and minimum degree Let G = (V, E) be a graph. If u,

More information

Algorithms: Graphs. Amotz Bar-Noy. Spring 2012 CUNY. Amotz Bar-Noy (CUNY) Graphs Spring / 95

Algorithms: Graphs. Amotz Bar-Noy. Spring 2012 CUNY. Amotz Bar-Noy (CUNY) Graphs Spring / 95 Algorithms: Graphs Amotz Bar-Noy CUNY Spring 2012 Amotz Bar-Noy (CUNY) Graphs Spring 2012 1 / 95 Graphs Definition: A graph is a collection of edges and vertices. Each edge connects two vertices. Amotz

More information

Lecture 8: The Traveling Salesman Problem

Lecture 8: The Traveling Salesman Problem Lecture 8: The Traveling Salesman Problem Let G = (V, E) be an undirected graph. A Hamiltonian cycle of G is a cycle that visits every vertex v V exactly once. Instead of Hamiltonian cycle, we sometimes

More information

Planar graphs. Chapter 8

Planar graphs. Chapter 8 Chapter 8 Planar graphs Definition 8.1. A graph is called planar if it can be drawn in the plane so that edges intersect only at vertices to which they are incident. Example 8.2. Different representations

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

Symmetric Product Graphs

Symmetric Product Graphs Rochester Institute of Technology RIT Scholar Works Theses Thesis/Dissertation Collections 5-20-2015 Symmetric Product Graphs Evan Witz Follow this and additional works at: http://scholarworks.rit.edu/theses

More information

WUCT121. Discrete Mathematics. Graphs

WUCT121. Discrete Mathematics. Graphs WUCT121 Discrete Mathematics Graphs WUCT121 Graphs 1 Section 1. Graphs 1.1. Introduction Graphs are used in many fields that require analysis of routes between locations. These areas include communications,

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

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

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

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

Majority and Friendship Paradoxes

Majority and Friendship Paradoxes Majority and Friendship Paradoxes Majority Paradox Example: Small town is considering a bond initiative in an upcoming election. Some residents are in favor, some are against. Consider a poll asking the

More information

Chapter 9 Graph Algorithms

Chapter 9 Graph Algorithms Chapter 9 Graph Algorithms 2 Introduction graph theory useful in practice represent many real-life problems can be slow if not careful with data structures 3 Definitions an undirected graph G = (V, E)

More information

11/22/2016. Chapter 9 Graph Algorithms. Introduction. Definitions. Definitions. Definitions. Definitions

11/22/2016. Chapter 9 Graph Algorithms. Introduction. Definitions. Definitions. Definitions. Definitions Introduction Chapter 9 Graph Algorithms graph theory useful in practice represent many real-life problems can be slow if not careful with data structures 2 Definitions an undirected graph G = (V, E) is

More information

Discrete Mathematics I So Practice Sheet Solutions 1

Discrete Mathematics I So Practice Sheet Solutions 1 Discrete Mathematics I So 2016 Tibor Szabó Shagnik Das Practice Sheet Solutions 1 Provided below are possible solutions to the questions from the practice sheet issued towards the end of the course. Exercise

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

List of Theorems. Mat 416, Introduction to Graph Theory. Theorem 1 The numbers R(p, q) exist and for p, q 2,

List of Theorems. Mat 416, Introduction to Graph Theory. Theorem 1 The numbers R(p, q) exist and for p, q 2, List of Theorems Mat 416, Introduction to Graph Theory 1. Ramsey s Theorem for graphs 8.3.11. Theorem 1 The numbers R(p, q) exist and for p, q 2, R(p, q) R(p 1, q) + R(p, q 1). If both summands on the

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

The Konigsberg Bridge Problem

The Konigsberg Bridge Problem The Konigsberg Bridge Problem This is a classic mathematical problem. There were seven bridges across the river Pregel at Königsberg. Is it possible to take a walk in which each bridge is crossed exactly

More information

ECS 20 Lecture 17b = Discussion D8 Fall Nov 2013 Phil Rogaway

ECS 20 Lecture 17b = Discussion D8 Fall Nov 2013 Phil Rogaway 1 ECS 20 Lecture 17b = Discussion D8 Fall 2013 25 Nov 2013 Phil Rogaway Today: Using discussion section to finish up graph theory. Much of these notes the same as those prepared for last lecture and the

More information

Lecture Notes on Graph Theory

Lecture Notes on Graph Theory Lecture Notes on Graph Theory Vadim Lozin 1 Introductory concepts A graph G = (V, E) consists of two finite sets V and E. The elements of V are called the vertices and the elements of E the edges of G.

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

CS6702 GRAPH THEORY AND APPLICATIONS QUESTION BANK

CS6702 GRAPH THEORY AND APPLICATIONS QUESTION BANK CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS 1 UNIT I INTRODUCTION CS6702 GRAPH THEORY AND APPLICATIONS QUESTION BANK 1. Define Graph. 2. Define Simple graph. 3. Write few problems

More information

CS 441 Discrete Mathematics for CS Lecture 26. Graphs. CS 441 Discrete mathematics for CS. Final exam

CS 441 Discrete Mathematics for CS Lecture 26. Graphs. CS 441 Discrete mathematics for CS. Final exam CS 441 Discrete Mathematics for CS Lecture 26 Graphs Milos Hauskrecht milos@cs.pitt.edu 5329 Sennott Square Final exam Saturday, April 26, 2014 at 10:00-11:50am The same classroom as lectures The exam

More information

Discrete Wiskunde II. Lecture 6: Planar Graphs

Discrete Wiskunde II. Lecture 6: Planar Graphs , 2009 Lecture 6: Planar Graphs University of Twente m.uetz@utwente.nl wwwhome.math.utwente.nl/~uetzm/dw/ Planar Graphs Given an undirected graph (or multigraph) G = (V, E). A planar embedding of G is

More information

Definition For vertices u, v V (G), the distance from u to v, denoted d(u, v), in G is the length of a shortest u, v-path. 1

Definition For vertices u, v V (G), the distance from u to v, denoted d(u, v), in G is the length of a shortest u, v-path. 1 Graph fundamentals Bipartite graph characterization Lemma. If a graph contains an odd closed walk, then it contains an odd cycle. Proof strategy: Consider a shortest closed odd walk W. If W is not a cycle,

More information

Lecture 3: Recap. Administrivia. Graph theory: Historical Motivation. COMP9020 Lecture 4 Session 2, 2017 Graphs and Trees

Lecture 3: Recap. Administrivia. Graph theory: Historical Motivation. COMP9020 Lecture 4 Session 2, 2017 Graphs and Trees Administrivia Lecture 3: Recap Assignment 1 due 23:59 tomorrow. Quiz 4 up tonight, due 15:00 Thursday 31 August. Equivalence relations: (S), (R), (T) Total orders: (AS), (R), (T), (L) Partial orders: (AS),

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

GRAPH DECOMPOSITION BASED ON DEGREE CONSTRAINTS. March 3, 2016

GRAPH DECOMPOSITION BASED ON DEGREE CONSTRAINTS. March 3, 2016 GRAPH DECOMPOSITION BASED ON DEGREE CONSTRAINTS ZOÉ HAMEL March 3, 2016 1. Introduction Let G = (V (G), E(G)) be a graph G (loops and multiple edges not allowed) on the set of vertices V (G) and the set

More information

Fixed-Parameter Algorithms, IA166

Fixed-Parameter Algorithms, IA166 Fixed-Parameter Algorithms, IA166 Sebastian Ordyniak Faculty of Informatics Masaryk University Brno Spring Semester 2013 Introduction Outline 1 Introduction Algorithms on Locally Bounded Treewidth Layer

More information

Graph Theory. 1 Graphs and Subgraphs

Graph Theory. 1 Graphs and Subgraphs 1 Graphs and Subgraphs Graph Theory Definition 1.1. A multigraph or just graph is an ordered pair G = (V, E) consisting of a nonempty vertex set V of vertices and an edge set E of edges such that each

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

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

Chapter 12 and 11.1 Planar graphs, regular polyhedra, and graph colorings

Chapter 12 and 11.1 Planar graphs, regular polyhedra, and graph colorings Chapter 12 and 11.1 Planar graphs, regular polyhedra, and graph colorings Prof. Tesler Math 184A Fall 2017 Prof. Tesler Ch. 12: Planar Graphs Math 184A / Fall 2017 1 / 45 12.1 12.2. Planar graphs Definition

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

CS473-Algorithms I. Lecture 13-A. Graphs. Cevdet Aykanat - Bilkent University Computer Engineering Department

CS473-Algorithms I. Lecture 13-A. Graphs. Cevdet Aykanat - Bilkent University Computer Engineering Department CS473-Algorithms I Lecture 3-A Graphs Graphs A directed graph (or digraph) G is a pair (V, E), where V is a finite set, and E is a binary relation on V The set V: Vertex set of G The set E: Edge set of

More information

CS521 \ Notes for the Final Exam

CS521 \ Notes for the Final Exam CS521 \ Notes for final exam 1 Ariel Stolerman Asymptotic Notations: CS521 \ Notes for the Final Exam Notation Definition Limit Big-O ( ) Small-o ( ) Big- ( ) Small- ( ) Big- ( ) Notes: ( ) ( ) ( ) ( )

More information

How many colors are needed to color a map?

How many colors are needed to color a map? How many colors are needed to color a map? Is 4 always enough? Two relevant concepts How many colors do we need to color a map so neighboring countries get different colors? Simplifying assumption (not

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

Notation Index. Probability notation. (there exists) (such that) Fn-4 B n (Bell numbers) CL-27 s t (equivalence relation) GT-5.

Notation Index. Probability notation. (there exists) (such that) Fn-4 B n (Bell numbers) CL-27 s t (equivalence relation) GT-5. Notation Index (there exists) (for all) Fn-4 Fn-4 (such that) Fn-4 B n (Bell numbers) CL-27 s t (equivalence relation) GT-5 ( n ) k (binomial coefficient) CL-15 ( n m 1,m 2,...) (multinomial coefficient)

More information

Reference Sheet for CO142.2 Discrete Mathematics II

Reference Sheet for CO142.2 Discrete Mathematics II Reference Sheet for CO14. Discrete Mathematics II Spring 017 1 Graphs Defintions 1. Graph: set of N nodes and A arcs such that each a A is associated with an unordered pair of nodes.. Simple graph: no

More information

MATH 682 Notes Combinatorics and Graph Theory II. One interesting class of graphs rather akin to trees and acyclic graphs is the bipartite graph:

MATH 682 Notes Combinatorics and Graph Theory II. One interesting class of graphs rather akin to trees and acyclic graphs is the bipartite graph: 1 Bipartite graphs One interesting class of graphs rather akin to trees and acyclic graphs is the bipartite graph: Definition 1. A graph G is bipartite if the vertex-set of G can be partitioned into two

More information