Discrete mathematics II. - Graphs

Similar documents
Basics of Graph Theory

Elements of Graph Theory

Assignment 4 Solutions of graph problems

Graph and Digraph Glossary

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

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

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.

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

Introduction III. Graphs. Motivations I. Introduction IV

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

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

Chapter 11: Graphs and Trees. March 23, 2008

Introduction to Graph Theory

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

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

MATH 350 GRAPH THEORY & COMBINATORICS. Contents

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

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

Math 776 Graph Theory Lecture Note 1 Basic concepts

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.

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.

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

Treewidth and graph minors

Assignment 1 Introduction to Graph Theory CO342

Graph Theory. Part of Texas Counties.

Chapter 3: Paths and Cycles

Combinatorics Summary Sheet for Exam 1 Material 2019

Fundamental Properties of Graphs

CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS

Graph Theory CS/Math231 Discrete Mathematics Spring2015

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

Varying Applications (examples)

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

CMSC Honors Discrete Mathematics

Exercise set 2 Solutions

Graphs. Introduction To Graphs: Exercises. Definitions:

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

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

Lecture 2 - Graph Theory Fundamentals - Reachability and Exploration 1

8 Colouring Planar Graphs

Part II. Graph Theory. Year

Module 11. Directed Graphs. Contents

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

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

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

On the Relationships between Zero Forcing Numbers and Certain Graph Coverings

Simple graph Complete graph K 7. Non- connected graph

Lecture 20 : Trees DRAFT

Chapter 2 Graphs. 2.1 Definition of Graphs

0.0.1 Network Analysis

Simple Graph. General Graph

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

Chapter 1 Graph Theory

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

Discrete mathematics

Algorithms. Graphs. Algorithms

Artificial Intelligence

2. CONNECTIVITY Connectivity

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.

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

Lecture 8: The Traveling Salesman Problem

Planar graphs. Chapter 8

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

Symmetric Product Graphs

WUCT121. Discrete Mathematics. Graphs

1 Digraphs. Definition 1

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

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

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.

Majority and Friendship Paradoxes

Chapter 9 Graph Algorithms

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

Discrete Mathematics I So Practice Sheet Solutions 1

INTRODUCTION TO GRAPH THEORY. 1. Definitions

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

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

The Konigsberg Bridge Problem

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

Lecture Notes on Graph Theory

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

CS6702 GRAPH THEORY AND APPLICATIONS QUESTION BANK

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

Discrete Wiskunde II. Lecture 6: Planar Graphs

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

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

Math Summer 2012

GRAPH DECOMPOSITION BASED ON DEGREE CONSTRAINTS. March 3, 2016

Fixed-Parameter Algorithms, IA166

Graph Theory. 1 Graphs and Subgraphs

8.2 Paths and Cycles

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

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

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.

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

CS521 \ Notes for the Final Exam

How many colors are needed to color a map?

Discrete mathematics

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

Reference Sheet for CO142.2 Discrete Mathematics II

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

Transcription:

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

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.

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

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.

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.

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.

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

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.

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.

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.

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

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.

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

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.

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.

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.

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 }

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.

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

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: 4 3 4 3 4 3 1 2 1 2 1 2

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.

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.

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.

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.

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

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.

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.

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.

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.

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.

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.

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.

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.

Trees Proof of 1 2 3. 1 2: 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.

Trees Proof Proof of 1 4. 1 4: 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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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

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.

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.

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.

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.

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.

Special walks Proof (part 2) Proof for s > 0. Let s > 0. 1. 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.

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.

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.

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.

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

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.

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.

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

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.

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

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.

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.

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 1 99 1 2 v 4 99

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.

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

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

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.

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

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.

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.

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

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.

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: 0 1 0 0 0 1 1 0 0 0 1 1 1 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 1 0 0 1 1 1 1 0 1 0 0 0 0 0 0 0 0 1 1 1 1 Adjacency matrix: 0 1 0 1 0 0 0 1 1 0 0 0 0 0 1 0 1 1 0 1 1 0 1 0 0

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

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

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.

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.

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.

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.

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.

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.

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.

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.

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) +. 2. 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.

Directed graphs Directed trees Example v 1 v 1 s 10 5 7 3 2 v 3 2 v 4 1 9 6 4 v 2 0 s 10 5 7 3 v 3 2 v 4 2 6 S = H = {s} 1 9 4 v 2

Directed graphs Directed trees Example v 1 10 v 1 8 0 s 10 5 7 3 5 v 3 2 v 4 2 6 1 9 S = {s} H = {v 1, v 3 } 4 v 2 0 s 10 5 7 3 5 v 3 2 7 v 4 2 6 1 9 4 S = {s, v 3 } H = {v 1, v 2, v 4 } v 2 14

Directed graphs Directed trees Example v 1 8 v 1 8 10 3 2 1 10 3 2 1 0 s 5 7 5 v 3 2 6 9 4 v 2 13 0 s 5 7 5 v 3 2 6 9 4 v 2 9 7 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 }

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?).

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.

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.

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.

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

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?).

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.

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.

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.

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: 10 3 5 6 = 9, which is a contradiction.

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.

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.

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.