Number Theory and Graph Theory

Similar documents
Number Theory and Graph Theory

Chapter 3: Paths and Cycles

Modules. 6 Hamilton Graphs (4-8 lectures) Introduction Necessary conditions and sufficient conditions Exercises...

3 Euler Tours, Hamilton Cycles, and Their Applications

Introduction III. Graphs. Motivations I. Introduction IV

Fundamental Properties of Graphs

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.

11.2 Eulerian Trails

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

Discrete mathematics

8.2 Paths and Cycles

Chapter 11: Graphs and Trees. March 23, 2008

Math 170- Graph Theory Notes

MAT 145: PROBLEM SET 4

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

Elements of Graph Theory

Varying Applications (examples)

Chapter 2 Graphs. 2.1 Definition of Graphs

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

Basics of Graph Theory

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

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

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

Assignment 4 Solutions of graph problems

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

Topic 10 Part 2 [474 marks]

Crossing bridges. Crossing bridges Great Ideas in Theoretical Computer Science. Lecture 12: Graphs I: The Basics. Königsberg (Prussia)

14 More Graphs: Euler Tours and Hamilton Cycles

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 7

Matching Theory. Figure 1: Is this graph bipartite?

Graph Theory. Chapter 4.

Math 776 Graph Theory Lecture Note 1 Basic concepts

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

TWO CONTRIBUTIONS OF EULER

Introduction to Graphs

Lecture 5: Graphs. Rajat Mittal. IIT Kanpur

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

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

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

The University of Sydney MATH 2009

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 Theory. Part of Texas Counties.

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

Math.3336: Discrete Mathematics. Chapter 10 Graph Theory

INTRODUCTION TO GRAPH THEORY. 1. Definitions

GRAPH THEORY: AN INTRODUCTION

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

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

Theory of Computing. Lecture 10 MAS 714 Hartmut Klauck

1 Variations of the Traveling Salesman Problem

6.2. Paths and Cycles

Module 11. Directed Graphs. Contents

Definition: A graph G = (V, E) is called a tree if G is connected and acyclic. The following theorem captures many important facts about trees.

An Introduction to Graph Theory

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

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

Graph Theory CS/Math231 Discrete Mathematics Spring2015

Artificial Intelligence

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI

Theorem 2.9: nearest addition algorithm

Graph Theory Questions from Past Papers

Graph (1A) Young Won Lim 4/19/18

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

Characterization of Graphs with Eulerian Circuits

Math 443/543 Graph Theory Notes 2: Transportation problems

Eulerian Tours and Fleury s Algorithm

Part II. Graph Theory. Year

WUCT121. Discrete Mathematics. Graphs

Eulerian tours. Russell Impagliazzo and Miles Jones Thanks to Janine Tiefenbruck. April 20, 2016

Module 7. Independent sets, coverings. and matchings. Contents

Chapter 1 Graph Theory

{ 1} Definitions. 10. Extremal graph theory. Problem definition Paths and cycles Complete subgraphs

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.

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

11.4 Bipartite Multigraphs

Introduction to Graph Theory

Sarah Will Math 490 December 2, 2009

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

(5.2) 151 Math Exercises. Graph Terminology and Special Types of Graphs. Malek Zein AL-Abidin

EULERIAN GRAPHS AND ITS APPLICATIONS

1 Digraphs. Definition 1

Section 3.1: Nonseparable Graphs Cut vertex of a connected graph G: A vertex x G such that G x is not connected. Theorem 3.1, p. 57: Every connected

Ma/CS 6a Class 8: Eulerian Cycles

5.1 Min-Max Theorem for General Matching

Mathematics and Statistics, Part A: Graph Theory Problem Sheet 1, lectures 1-4

PACKING DIGRAPHS WITH DIRECTED CLOSED TRAILS

Graph Theory Day Four

Graph Theory. Connectivity, Coloring, Matching. Arjun Suresh 1. 1 GATE Overflow

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

DEFINITION OF GRAPH GRAPH THEORY GRAPHS ACCORDING TO THEIR VERTICES AND EDGES EXAMPLE GRAPHS ACCORDING TO THEIR VERTICES AND EDGES

DO NOT RE-DISTRIBUTE THIS SOLUTION FILE

North Bank. West Island. East Island. South Bank

Exercise set 2 Solutions

2 Eulerian digraphs and oriented trees.

EECS 203 Lecture 20. More Graphs

Some Upper Bounds for Signed Star Domination Number of Graphs. S. Akbari, A. Norouzi-Fard, A. Rezaei, R. Rotabi, S. Sabour.

Introduction to Graph Theory

Graph Theory II. Po-Shen Loh. June edges each. Solution: Spread the n vertices around a circle. Take parallel classes.

About the Tutorial. Audience. Prerequisites. Disclaimer & Copyright. Graph Theory

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

Transcription:

1 Number Theory and Graph Theory Chapter 7 Graph properties By A. Satyanarayana Reddy Department of Mathematics Shiv Nadar University Uttar Pradesh, India E-mail: satya8118@gmail.com

2 Module-2: Eulerian and Hamiltonian Graphs Objectives Eulerian paths and Eulerian graphs Applications of Eulerian graphs Hamiltonian paths and Hamiltonian graphs There are many games and puzzles which can be analyzed by graph theoretic concepts. In fact, the two early discoveries which led to the existence of graphs arose from puzzles, namely, the Königsberg Bridge Problem and the Hamiltonian Game. These puzzles also resulted in the study of special types of graphs, now called Eulerian graphs and Hamiltonian graphs. Due to the rich structure of these graphs, they find wide use both in research and application. Definition 1. An Eulerian path in a multi graph is a path that includes each edge exactly once and every vertex at least once. Eulerian circuit: It is an Eulerian path whose end points are identical. Eulerian Graph: A graph which contains an Eulerian circuit. The following graphs are Eulerian. The following graphs are not Eulerian.

3 Theorem 2. An undirected multi graph has an Eulerian circuit if and only if it is connected and all its vertices are of even degree. Proof. Let X = (V,E) be an Eulerian graph. Claim: The degree of each vertex is even. As X is an Eulerian graph, it contains an Eulerian circuit, say C, which in particular is a closed walk. Let this walk start and end at the vertex u V. Since, C traverses each edge exactly once, each visit of C to an intermediate vertex v of C contributes two (first reach v and then go out from v) to the degree of v. So, deg(v) is even for every such vertex. Each intermediate visit to u contributes two to deg(u) and also the initial and final edges of C contribute one each to deg(u). Hence, deg(u) is also even. Conversely, suppose X is a connected graph and degree of each vertex of X be even. Claim: X has an Eulerian circuit We prove the result by induction on m, the number of edges of X. Note that the result is clearly true if m = 3,4. So, let the result be true for any graph that has fewer than m edges and let X = (V,E) be a graph on m edges. As deg(v) 2 for all v V, X contains a cycle. Let C be a closed walk in X of maximum length. If C contains all the edges of X, we are done. So, on the contrary, assume that the graph X \ E(C) is a non-trivial even degree graph. Let C 1 be one of the non-trivial components of X \ E(C). Then, C 1 is an even connected graph and C 1 has less number of edges than X. Thus, by induction hypothesis, C 1 is Eulerian with, say C 1, as its Eulerian circuit. Moreover, C 1 has a vertex v in common with C. Hence, we have obtained an Eulerian circuit C 1 C which starts and ends at the vertex v. Also, the length of C 1 C is strictly larger than that of C. This contradicts our assumption that C was a closed walk of maximum length. Hence, X is indeed Eulerian. Example 3. 1. The complete graph K n is Eulerian if and only if n is odd.

4 2. All cycle graphs are Eulerian. 3. The complete bipartite graphs K m,n are Eulerian if and only if both m,n are even. 4. All trees and wheel graphs are not Eulerian. Theorem 4. A non-directed multi graph has an Eulerian path if and only if it is connected and has exactly zero or two vertices of odd degree. Proof. Let X be a non-directed multi graph. If X has an Eulerian path then clearly X is connected. By definition, the end vertices of this path, say u 0 and u k, have odd degrees and the rest of the vertices have even degree. If u 0 = u k, then X has no vertex of odd degree, else, u 0 and u k are the only vertices of odd degree. Conversely, let X be a connected graph having exactly zero or two vertices of odd degree. If X has no vertex of odd degree, directly apply Theorem 2 to get the required result. If X has exactly two vertices of odd degree then consider the new graph X which is obtained from X by joining the two odd vertices. Now, apply Theorem 2 to X. Hence, the required result follows. Theorem 5. A connected graph X is Eulerian if and only if its edge set can be decomposed into cycles. Proof. Let X = (V,E) be a connected graph and suppose that X can be decomposed into cycles. If k of these cycles are incident at a particular vertex, say v, then deg(v) = 2k. Therefore, the degree of every vertex of X is even and hence X is Eulerian. Conversely, let X be Eulerian. We show X can be decomposed into cycles. To prove this, we use induction on the number of edges. Since deg(v) 2 for each v V (X), X has a cycle, say C. Then E(X) \ E(C) is possibly a disconnected graph, each of whose components C 1,C 2,...,C k is an even degree graph and hence Eulerian. By the induction hypothesis, each C i is a disjoint union of cycles. These together with C provides a partition of E(X) into cycles A multi graph is said to be traversable if it has an Eulerian path.

5 A directed multi graph X is said to have an Eulerian circuit if it is unilaterally connected and the in-degree of every vertex is equal to its out degree. Definition 6. Let X be a connected multi graph. The process of adding edges to X so that each vertex of X has even degree (so that the resultant graph has an Eulerian circuit) is called Eulerization of the graph X. A minimal Eulerization of X is an Eulerization of X with as few extra edges as possible. Few applications of Eulerian graphs/digraphs 1. Kolam It is a form of drawing that is drawn by using rice flour/chalk/chalk powder/white rock powder often using naturally/synthetically colored powders in Tamil Nadu, Karnataka, Andhra Pradesh, Kerala and some parts of Goa, Maharashtra, Indonesia, Malaysia, Thailand and a few other Asian countries. One type of kolam is called kambi kolam which is related to Eulerian graphs. One can convert a kolam drawing in to a graph as follows: assign a vertex at each crossing of kolam. But there is restriction on drawing of edges, edges cannot be drawn freely there is a particular pattern to follow. The single (one should not lift hand) kambi kolam will then be an Eulerian graph with the drawing starting and ending in the same vertex and passing through every edge of the graph only once. 2. Chinese Postman Problem It is the problem that a Postman faces: he wishes to travel along every road in a city in order to deliver letters, with the least possible distance. The problem is how to find a shortest closed walk of the graph in which each edge is traversed at least once, rather than exactly once. 3. Teleprinter s problem How long is a longest circular (or cyclic) sequence of 1 s and 0 s such that no subsequence of r bits appears more than once in the sequence? Construct one such largest sequence. Solution:

6 As we know there are 2 r distinct r-tuples that can be formed with digits 0 and 1. So, the sequence can be no longer than 2 r bits long. We shall construct a circular sequence of length 2 r with the required property that no subsequence of r bits be repeated. Construct a digraph X whose vertices are r 1 binary tuples. Clearly there are 2 r 1 vertices in X. Let x 1 x 2...x r 1 be an arbitrary vertex where each x i = 0 or 1. Draw directed edges from this vertex (x 1 x 2...x r 1 ) to (x 2 x 3...x r 1 0) and x 2 x 3...x r 1 1 and label these edges as x 1 x 2...x r 1 0 and x 1 x 2...x r 1 1, respectively. From this construction, we see that the in-degree and the out-degree of each vertex is the same and it equals 2. Hence, the resulting digraph is an Eulerian digraph. The required sequence can be obtained from this Eulerian circuit by taking the first bit of the label on the edge. The circular arrangement can be achieved by joining two ends of the sequence. The following digraph illustrates the case for r = 3. 01 e 2 = 001 e 3 = 011 e 1 = 000 e 4 = 111 e 00 6 = 101 e 7 = 010 11 e 8 = 100 10 e 5 = 110 One of the Euler circuit in the above digraph is e 1 e 2 e 3 e 4 e 5 e 6 e 7 e 8. The corresponding sequence is 00011101. This sequence is constructed by taking the first bits of e 1,e 2,...,e 8. Another way of looking at the sequence is that the first three bits correspond to e 1, the second, third and fourth bits correspond to e 2 and so on, with the last three bits corresponding to e 6

7 (}{{} 000 11}{{} 101 ). Note that this is a circular sequence and hence e 7 is obtained by taking the last e 1 e 6 two bits and the first bit, whereas e 8 is obtained by taking the last bit and the first two bits. 0.1 Hamiltonian graph Hamiltonian path : A simple path that consists of all the vertices of X. Hamiltonian Cycle: It is a Hamiltonian path whose end vertices are identical. Hamiltonian graph : A graph which consists of a Hamiltonian cycle. The cycle graph C n for n 3 is a Hamiltonian graph. The complete graph K n (n 3) is a Hamiltonian graph. The complete bipartite graph K m,n is Hamiltonian if and only if m = n > 1. If a graph X has n vertices then a Hamiltonian path must consist of exactly n 1 edges and a Hamiltonian cycle will contain exactly n edges. If we remove one edge from a Hamiltonian cycle, we get a Hamiltonian path. No bipartite graph with odd number of vertices can be a Hamiltonian graph. Proof. Let X = (V,E) be a bipartite graph with bipartition V = V 1 V 2. Then, every Hamiltonian cycle in X must visit all the vertices of X. As X is bipartite, this cycle will have the form a 1,b 1,a 2,b 2,...a k,b k,a 1, where a i V 1 and b i V 2, with 1 i k. As it is a cycle, it begins and ends at the same vertex, say a 1. Thus, we see that the number of vertices in the graph must be 2k. If X has a Hamiltonian cycle, then the degree of every vertex is 2.

8 If X has a Hamiltonian cycle then the edges incident with a vertex of degree 2 must be included in the cycle. Theorem 7. (Ore s theorem) Let X be a graph on n vertices with n 3. If deg(x) + deg(y) n, for every pair of non adjacent vertices x,y in X, then X has a Hamiltonian cycle. Proof. On the contrary, assume that X is not a Hamiltonian graph. Let Y be a graph obtained from X by adding edges to X so that Y is also not a Hamiltonian graph, but by adding one more edge to Y, the new graph becomes a Hamiltonian graph. Since K n is a Hamiltonian graph Y K n. Hence, there exists a,b V (Y ) = V (X) such that the vertices a and b are not adjacent in Y. Let Z = (V, E(Y ) {a, b}). Then, by the construction of Y, Z is a Hamiltonian graph. Let C be a Hamiltonian cycle in Z. Note that the edge {a,b} is contained in C as Z is a Hamiltonian graph whereas Y was not a Hamiltonian graph. We label the n vertices in C as a = v 1,b = v 2,v 3,...,v n such that {v i,v i+1 } is an edge in Z, for 1 i n 1. Moreover, {v n,v 1 } is also an edge in Z as C is a cycle. In other words, C = [a = v 1,b = v 2,v 3,...,v n,a] is a Hamiltonian cycle. Now, we show that whenever {b,v i } E(Y ), then {a,v i 1 } / E(Y ), for 3 i n. For if, both the edges {b,v i },{a,v i 1 } E(Y ), then b,v i,v i+1,...,v n,a,v i 1,v i 2,...,v 3,b becomes an Hamiltonian cycle in Y, a contradiction, as Y is not a Hamiltonian graph. Therefore, for each v i, 3 i n at most one of the edges {b,v i } or {a,v i 1 } is in E(Y ). Consequently, deg Y (a)+deg Y (b) < n. Hence, our assumption that X is not a Hamiltonian graph is false. Theorem 8 (Dirac s theorem). A sufficient condition for a simple graph X to have a Hamiltonian cycle is that the degree of every vertex of X be at least n/2. Proof. Let X be a graph with n 3 vertices and let the degree of every vertex in X be n 2. Then, the sum of degrees of any two non-adjacent vertices is n. Thus, by Ore s theorem, X is a Hamiltonian graph. Theorem 9. If X is a graph on n vertices with n 3 such that E(X) ( n 1) 2 + 2 then, X has a Hamiltonian cycle.

9 Proof. Let X be a graph on n vertices with n 3 such that E(X) ( n 1) 2 + 2. If X = Kn then, we are done as K n is a Hamiltonian graph. So, let us assume that X K n. Hence, there exists a,b V (X) such that {a,b} / E(X). Now, we show that deg(a) + deg(b) n. Let Y be a graph obtained from X by deleting the vertices a,b. Then, E(X) = E(Y ) +deg(a)+ deg(b). Furthermore, we see that as Y is a simple graph on n 2 vertices, E(Y ) ( n 2) 2. Thus, ( ( n 1 n 2 2 Hence, deg(a) + deg(b) n. ) + 2 E(X) = E(Y ) + deg(a) + deg(b) 2 ) + deg(a) + deg(b). Example 10. Show that a complete graph on n vertices contains (n 1)/2 edge disjoint Hamiltonian cycles, whenever n 3 is odd. Traveling salesman problem (TSP) Given a collection of cities and the cost of travel between each pair of them, the traveling salesman problem, or TSP for short, is to find the cheapest way of visiting all of the cities and returning to your starting point. In the standard version of this problem, the travel costs are symmetric in the sense that traveling from city A to city B costs just as much as traveling from B to A. The simplicity of the statement of the problem is deceptive as the TSP is one of the most intensely studied problems in computational mathematics and yet has no effective solution method for the general case. Indeed, the resolution of the TSP would settle the P versus NP-problem and fetch a 1,000,000 dollars prize from the Clay Mathematics Institute. Although the complexity of the TSP is still unknown, for over 50 years its study has led the way to improved solution methods in many areas of mathematical optimization. It is easy to calculate the number of different tours through n cities: given a starting city, we have n 1 choices for the second city, n 2 choices for the third city, etc. Multiplying these together we get (n 1)! = (n 1)(n 2) 3 2 1. Now since our travel costs do not depend on the direction we take around the tour, we should divide this number by 2, which implies that there are (n 1)! 2 different possible tours.

c 3 c 4 10 This is a very large number and is often cited as one of the reasons for not being able to solve the TSP. It is true that the rapidly growing value of (n 1)! 2 rules out the possibility of checking all tours one by one, but there are other problems that are easy to solve (such as the minimum spanning tree), where the number of solutions for n points grows even more quickly. Example 11. 1. The complete graph K n for n odd is both a Hamiltonian graph as well as an Eulerian. The Cycle graph C n, for n 3, is also both a Hamiltonian graph and an Eulerian graph. Wheel graphs (WH n, for n 3) are Hamiltonian graphs but are not Eulerian graphs. The complete bipartite graphs K m,n, whenever m = n and m is even, are also examples of graphs that are both Hamiltonian and Eulerian. Hamiltonian Nonhamiltonian 2. Eulerian Noneulerian Example 12. Show that the Petersen graph has an Hamiltonian path but no Hamiltonian cycle. c 1 c 2 c 7 c 6 c 10 c 5 c 8 c 9

11 Clearly, c 1 c 2 c 3 c 4 c 5 c 10 c 8 c 6 c 9 c 7 is a Hamiltonian path. Now, we prove that the Petersen graph has no Hamiltonian cycle by contradiction. Suppose the Petersen graph is Hamiltonian. Then, it contains a cycle of length 10. But the degree of each vertex is 3, hence we have to add five chords into this cycle to get the original graph, but this is not possible as girth of the Petersen graph is 5.