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

Similar documents
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?

Zhibin Huang 07. Juni Zufällige Graphen

Matchings, Ramsey Theory, And Other Graph Fun

Introduction to Graph Theory

Ma/CS 6b Class 10: Ramsey Theory

Combinatorics Summary Sheet for Exam 1 Material 2019

Basics of Graph Theory

Discrete mathematics II. - Graphs

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

Graph and Digraph Glossary

Math.3336: Discrete Mathematics. Chapter 10 Graph Theory

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

Ma/CS 6b Class 12: Ramsey Theory

Elements of Graph Theory

Chapter 2 Graphs. 2.1 Definition of Graphs

An Introduction to Graph Theory

MATH 350 GRAPH THEORY & COMBINATORICS. Contents

Lecture Notes on Graph Theory

HW Graph Theory SOLUTIONS (hbovik) - Q

Graph Theory. Part of Texas Counties.

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

Chapter 11: Graphs and Trees. March 23, 2008

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

Math 170- Graph Theory Notes

Math 776 Graph Theory Lecture Note 1 Basic concepts

A graph is a mathematical structure for representing relationships.

Artificial Intelligence

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.

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

TWO CONTRIBUTIONS OF EULER

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

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

The Six Color Theorem

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 7

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

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

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

Math 777 Graph Theory, Spring, 2006 Lecture Note 1 Planar graphs Week 1 Weak 2

Introduction III. Graphs. Motivations I. Introduction IV

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

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

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

Part II. Graph Theory. Year

CS 2336 Discrete Mathematics

Lecture 20 : Trees DRAFT

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

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

Number Theory and Graph Theory

IMO Training 2008: Graph Theory

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

Planar graphs. Chapter 8

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

Fundamental Properties of Graphs

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

Matching and Planarity

Discrete mathematics

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?

Discrete Wiskunde II. Lecture 6: Planar Graphs

Problem Set 2 Solutions

Instructor: Paul Zeitz, University of San Francisco

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI

Introduction to Graph Theory

Varying Applications (examples)

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

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

INTRODUCTION TO GRAPH THEORY. 1. Definitions

Kuratowski Notes , Fall 2005, Prof. Peter Shor Revised Fall 2007

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

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

Treewidth and graph minors

Ramsey s Theorem on Graphs

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

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.

Discrete Mathematics

Assignment 4 Solutions of graph problems

CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS

MAT 145: PROBLEM SET 4

The Konigsberg Bridge Problem

Degree of nonsimple graphs. Chemistry questions. Degree Sequences. Pigeon party.

Undirected Graphs. DSA - lecture 6 - T.U.Cluj-Napoca - M. Joldos 1

Induction Review. Graphs. EECS 310: Discrete Math Lecture 5 Graph Theory, Matching. Common Graphs. a set of edges or collection of two-elt subsets

The following is a summary, hand-waving certain things which actually should be proven.

Jordan Curves. A curve is a subset of IR 2 of the form

Math Summer 2012

Lecture 4: Trees and Art Galleries

The Probabilistic Method

Algorithms. Graphs. Algorithms

1 Digraphs. Definition 1

The clique number of a random graph in (,1 2) Let ( ) # -subgraphs in = 2 =: ( ) We will be interested in s.t. ( )~1. To gain some intuition note ( )

The clique number of a random graph in (,1 2) Let ( ) # -subgraphs in = 2 =: ( ) 2 ( ) ( )

An Investigation of the Planarity Condition of Grötzsch s Theorem

BIL694-Lecture 1: Introduction to Graphs

Today. Types of graphs. Complete Graphs. Trees. Hypercubes.

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

Graph Theory Mini-course

WUCT121. Discrete Mathematics. Graphs

9 About Intersection Graphs

November 14, Planar Graphs. William T. Trotter.

Math 443/543 Graph Theory Notes 2: Transportation problems

Transcription:

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 lecture before. Graph Theory, continued Graph theory Graph theory 1. Basic definitions 2. Isomorphism 3. Representation of graphs 4. Paths and cycles 5. Trees 6. Eulerian and Hamiltonian graphs 7. Longest and shortest paths 8. Colorability 9. Planarity 10. Cliques and Ramsey numbers 1. Basic Definitions Def: A (finite, simple) graph G=(V, E) is an ordered pair - V is a finite nonempty set (the vertices or nodes) - E is a set of two-elements subsets of V (the edges) I like {x,y} for an edge, emphasizing that {x,y} are unordered. Will sometimes see xy or (x,y), but both look like the order matters, which, in a simple graph, it does not. Usually people use n= V and m= E ; alternatively, = V and = E looks nice and suggestive. There are many other kinds of graphs for example, in a directed graph (digraph), the edges (now often called arcs) are ordered pairs, instead of unordered pairs. We sometimes allow graphs with selfloops (and edge between a vertex and itself) or multiple edges (two or more different edges connecting a pair of nodes). In a network, each edge (or arcs) has a real-valued weight. People consider infinite graphs. We even have graphs where an even can be incident (touch) touch than two vertices (hypergraphs). None of these variants are not allowed in simple graphs. For this lecture, we re going to stick to them.

2 Conventional representation: a picture. (Draw some.) But be clear: the picture is NOT the graph, it is a representation of the graph. The graph is the pair (V,E). Some special graphs a clique of size n, Kn, and complete bipartite graphs on n boys and m girls, Kn,m. K 1 K2 K 3 K 4 K 5 K 2,3 K 3,3 The Peterson graph Def: Two vertices v, w of a graph G=(V, E) are adjacent if {v,w} E. Def: The degree of a vertex deg(v) = {v,w}: w V Def: The neighbor set of v in a graph G=(V,E) is N(v) = {w V: {v,w} E}. Note that deg(v) = N(v). Some counting Question: How many different graphs are there on V={1,...,n}? 2 C(n,2) = 2 n(n-1)/2 Question: what is the maximal and minimal degrees of an n-vertex graph? Question: Count how many edges in Kn and Kn,m.. 2. Isomorphism We don't usually care about the names of points in V, only how they re connected up. If two graphs are the same, up to renaming, we call them isomorphic. Formally, graphs G=(V, E) and G =(V, E ) are isomorphic if there is a permutation : V V such that {v,w} E iff { (v), (w)} E. The properties of graphs that matter are those that are invariant under isomorphism.

3 Def: Graphs G=(V,E) and G =(V,E ) are isomorphic if there exists a permutation such that {x,y} E iff { (x), (y)} E. Proposition: Isomorphism is an equivalence relation. Amazing fact: there is no efficient algorithm known to decide if two graphs are isomorphic. (Most computer scientists believe that no such algorithm exists.) One of the biggest open questions in computer science. Maybe show how to prove to graphs are non-isomorphic using an interactive proof. Prop: v deg(v) = 2m 3. Representation of graphs Two common ways: adjacency matrix and adjacency list. Describe them. (This is covered in 30 or 40, which many students have had, although certainly not everyone.) 4. Paths in graphs Def: A path p=(v 1,..., v n) in G = (V,E) is a sequence of vertices s.t. {v i,v i+1} E for all i in {1,..., n 1}. A path is said to contain the vertices and to contain the edges {v i,v i+1}. The length of a path is the number of edges on it. A cycle is a path of length three or more that starts and ends at the same vertex and includes no repeated edges. A graph is acyclic if it contains no cycle. A graph G = (V,E) is connected if, for all x,y in V, there is a path from x to y. The components of a graph are the maximal connected subgraphs. (Graph G = (V,E ) is a subgraph of graph G = (V,E) if V' V and E E.) Alternative definition of components: Say that x ~ y (these vertices are in the same component) if there is a path from x to y. Prop: this is an equivalence relation. Its blocks (equivalence classes) are the components. Alternative definition of a component: the component containing v is all vertices connected to v by paths of any lengths; and all the induced edges (the edges of the original graph that span vertices in the component). Describe an algorithm, based on DFS, for counting the number of components of a graph and identifying them.

4 5. Trees Def: A tree is a connected acyclic graph. Proposition: In any tree, m = n 1 Proof: By induction on n. True when n=1. Now suppose G is an n-vertex tree, n>1. Claim that there is some node of degree 1 in G. If any node of degree 0: contradicts connected. If all nodes of degree 2, contradict acyclicity. Take your node of degree 1 and remove it, along with the adjoining edge. What remains is connected and acyclic, so (m-1) = (n-1) -1 for it. Took away one edge and one vertex, so m=n-1. 6. Eulerian and Hamiltonian graphs Def: A graph G is Eulerian if it there is a cycle C in G that goes through every edge exactly once. A graph G is Hamiltonian if there is a cycle that goes through every vertex exactly once. Theorem: (Euler) A connected graph G = (V,E) on n 3 vertices is Eulerian iff every vertex of G is of even degree. Proof: Choose s. Graph is Eulerian mean there is a path that starts at s and eventually ends at s, hitting every edge. Put a label of 0 on every vertex. Now, follow the path. Every time we exit a vertex, increment the label. Every time we enter a vertex, increment the label. At end of traversing the graph, label(v) = deg(v) and this is even. (sketch) If every vertex is of even degree, at least three vertices. Start at s and grow a cycle C of unexplored edges until you wind up back at s. You never get stuck by even-degree constraint. If every edge explored: Done. Otherwise, find contact point of C and an unexplored edge (exists by connectedness) and grow out from there. Splice together the paths. So there is a trivial algorithm to decide if G is Eulerian: just check if all its vertices are of even degree. Amazing fact: There is no reasonable algorithm known to decide if a graph is Hamiltonian. (Most computer scientists believe that no such algorithm exists.) Theorem [Bondy- Chvátal, 1972] Let G = (V,E) be a graph on n 3 vertices and let x and y

5 be nonadjacent vertices s.t. deg(x)+deg(y) n. Then G is Hamiltonian G {x,y} is Hamiltonian Restatement: G is Hamiltonian cl(g) is Hamiltonian Where cl(g) is the closure of G with respect to repeatedly adding vertices {x,y} iff deg(x)+deg(y) n Proof: Obvious Suppose G {x,y} is Hamiltonian, deg(x)+deg(y) n but G is not Hamiltonian Since G {x,y} is Hamiltonian we know at least that there s a Hamiltonian path x = v 1 v 2... vn = y in G. If x is adjacent to v i for i 2 then v i is not adjacent to y, for if there were an {v i, y} edge then we have a HC in G (draw the picture). Said differently, every time you have an edge coming out of x you have a nonedge coming out of y. So y has a potential of n 1 edges coming out of it, but the actual number will be less than this by at least deg(v): deg(y) (n 1) deg(x) i.e, deg(x) + deg(y) n. Contradiction. Corollary: Assume G is a graph on 3 vertices. If cl(g) is a clique then G is Hamiltonian Corollary [Dirac s theorem] Assume G is a graph on \ge 3 vertices. If deg(v) n/2 for all v, then G is Hamiltonian. 7. Longest and shortest paths Def: A shortest path between two vertices x and y is a path from x to y such that there is no shorter (=fewer edges) path from x to y. A longest path between two vertices x and y is a simple path (=no repeated vertices) from x to y. Claim: There is an efficient algorithm to identify a shortest path between two designated vertices in a graph. (You will learn one in ecs122a or ecs60) Amazing fact: There is no efficient algorithm known to find a longest path from x to y. (Most computer scientists believe that no such algorithm exists.)

6 Diameter of a graph = the length of a longest shortest path. Explain how an inability to efficiently decide if a graph is Hamiltonian implies an inability to find a longest path between a designated pair of vertices: namely, there is a simple path (=no repeated vertices) of length n 1 between x and y (where n = V ) iff G {x,y} has a HC. 8. Colorability Def: A graph G = (V,E) is k-colorable if we can paint the vertices using colors {1,...,k} such that no adjacent vertices have the same color. Formally, Def: A graph is bipartite if it is 2-colorable. In other words, we can partition V into (V 1, V 2) such that all edges go between a vertex in V 1 and a vertex in V 2. Proposition: There is a simple and efficient algorithm to decide if a graph G is 2-colorable / bipartite. Proof: Modify DFS. Initially, all vertices are uncolored: color[v]=uncolored While there are uncolored vertices v in G do DFS(v,0) Algorithm DFS(v,b) color[v] = b for each uncolored w in N(v) do DFS(w, 1-b) Amazing fact: There is no reasonable algorithm known to decide if a graph is 3-colorable. (Most computer scientists believe that no such algorithm exists.) Proposition [Appel, Haken 1989] Every planar graph is 4-colorable. 9. Planar graphs Def: A graph is planar if you can draw it in the plane with no crossing edges. Amazing fact: there is a simple algorithm to decide if a graph is planar (and, when it is, to find an embedding) Theorem [Euler, 1736]: For every planar graph, n m + f = 2 Theorem [Kuratowski, 1930]: Every nonplanar graph can be contracted to a K 5 or a K 3,3 Theorem [Fary 1948] If G is planar it can be embedded in the plane with only straight lines. The following definitions assume graph-theory terminology, to be introduced shortly. A clique of size n in a graph is a set of n mutually connected vertices. Denote K n. An independent set of size m in a graph is a set of m vertices that are mutually non-adjacent. Clique number (G) = size of a largest clique within G (largest subgraph that s a clique)

7 FACT: There is no efficient algorithm known to calculate k(g). Let R(n,m) = the minimum number of vertices such that a graph of R(n,m) vertices either has a clique of size n or an independent set of size m. Alternative version: R(n,m) = the minimum number of vertices such that if you red/blue color the edges of a graph with of R(n,m) vertices, there is either a red clique of size n or a blue clique of size m. Theorem: The above is well-defined: for every n,m 1 there exists a smallest number R(n,m) such that every graph on R(n,m) vertices contains either a clique of size n or an independent set of size m. Claim: R(3,3)=6 Interpretation: In any room of 6 people, there are 3 mutual friends or 3 mutual strangers. R(n,m): First, R(3,3) 6. Draw a five pointed start surrounded by a circle. There is no triangle and no independent set of size 3. Second, R(3,3) 6 Remove person 1 5 people left. Put into two pots: friends with 1, non-friends with 1. One has at least three people. If three friends: Case 1: some two know each other: DONE Case 2: no two know each other: DONE If three non-friends:...symmetric Difficult Puzzle: What is the minimum number of people that must assemble in a room such that there will be at least n friends or n non-friends: R(n,n) R(4,4) = 18 (Greenwood and Gleason, 1955) R(5,5) in [43, 49] Exoo, 1989; Radziszowski 1995 R(6,6) in [102,165] Erdős asks us to imagine an alien force, vastly more powerful than us, landing on Earth and demanding the value of R(5, 5) or they will destroy our planet. In that case, he claims, we should marshal all our computers [not computer scientists?!] and all our mathematicians and attempt to find the value. But suppose, instead, that they ask for R(6, 6). In that case, he believes, we should attempt to destroy the aliens. Quoted by Joel Spencer