Senior Math Circles November 25, 2009 Graph Theory II

Similar documents
INTRODUCTION TO GRAPH THEORY. 1. Definitions

GRAPH THEORY: AN INTRODUCTION

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

Week 9: Planar and non-planar graphs. 1st and 3rd of November, 2017

Grade 7/8 Math Circles Graph Theory - Solutions October 13/14, 2015

Discrete mathematics

1. CONVEX POLYGONS. Definition. A shape D in the plane is convex if every line drawn between two points in D is entirely inside D.

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

CS 2336 Discrete Mathematics

Intermediate Math Circles Fall 2018 Patterns & Counting

Lecture 20 : Trees DRAFT

Week 9: Planar and non-planar graphs. 7 and 9 November, 2018

Graph Theory Questions from Past Papers

CS70 - Lecture 6. Graphs: Coloring; Special Graphs. 1. Review of L5 2. Planar Five Color Theorem 3. Special Graphs:

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

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

Lecture 1. 1 Notation

Discrete Wiskunde II. Lecture 6: Planar Graphs

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

November 14, Planar Graphs. William T. Trotter.

Notebook Assignments

Grades 7 & 8, Math Circles 31 October/1/2 November, Graph Theory

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

DO NOT RE-DISTRIBUTE THIS SOLUTION FILE

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

DO NOT RE-DISTRIBUTE THIS SOLUTION FILE

Discrete Mathematics Introduction

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

Math 485, Graph Theory: Homework #3

LECTURES 3 and 4: Flows and Matchings

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

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

Graph Coloring. Margaret M. Fleck. 3 May This lecture discusses the graph coloring problem (section 9.8 of Rosen).

Chapter 3: Paths and Cycles

Mathematics As A Liberal Art

One simple example is that of a cube. Each face is a square (=regular quadrilateral) and each vertex is connected to exactly three squares.

The Game of Criss-Cross

Question. Why is the third shape not convex?

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

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

arxiv: v1 [math.ho] 7 Nov 2017

Planar Graphs and Surfaces. Graphs 2 1/58

Math 3012 Applied Combinatorics Lecture 12

An Introduction to Graph Theory

The University of Sydney MATH2008 Introduction to Modern Algebra

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

The Konigsberg Bridge Problem

Lecture 10 Graph algorithms: testing graph properties

Planar graphs. Chapter 8

Computer Science 280 Fall 2002 Homework 10 Solutions

MAS 341: GRAPH THEORY 2016 EXAM SOLUTIONS

The University of Sydney MATH 2009

MAT 145: PROBLEM SET 6

Chapter 3. Set Theory. 3.1 What is a Set?

Grades 7 & 8, Math Circles 31 October/1/2 November, Graph Theory

Topic 10 Part 2 [474 marks]

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

Dijkstra s algorithm for shortest paths when no edges have negative weight.

Ma/CS 6b Class 9: Euler s Formula

Euler Characteristic

REU 2006 Discrete Math Lecture 5

HW Graph Theory SOLUTIONS (hbovik) - Q

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

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

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

Map-colouring with Polydron

Technische Universität München Zentrum Mathematik

Basics of Graph Theory

14 More Graphs: Euler Tours and Hamilton Cycles

Week 7 Convex Hulls in 3D

Graph Theory Part A. Peter Keevash

Grade 6 Math Circles. Spatial and Visual Thinking

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

Technische Universität München Zentrum Mathematik

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

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

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

Simple Graph. General Graph

11.4 Three-Dimensional Figures

1 Appendix to notes 2, on Hyperbolic geometry:

Professor: Padraic Bartlett. Lecture 9: Trees and Art Galleries. Week 10 UCSB 2015

Algorithms Activity 6: Applications of BFS

Discrete Mathematics 2 Exam File Spring 2012

CS195H Homework 5. Due:March 12th, 2015

Graphs and networks Mixed exercise

Lecture 6: Graph Properties

Discrete Mathematics I So Practice Sheet Solutions 1

Tiling of Sphere by Congruent Pentagons

Exercise set 2 Solutions

Instant Insanity Instructor s Guide Make-it and Take-it Kit for AMTNYS 2006

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

7th Bay Area Mathematical Olympiad

Planar Graphs, Solids, and Surfaces. Planar Graphs 1/28

A Practical 4-coloring Method of Planar Graphs

PRACTICAL GEOMETRY SYMMETRY AND VISUALISING SOLID SHAPES

Key Graph Theory Theorems

How many colors are needed to color a map?

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

(d) If the moon shares nothing and the sun does not share our works, then the earth is alive with creeping men.

Transcription:

University of Waterloo Faculty of Mathematics Centre for Education in Mathematics and Computing Senior Math Circles November 5, 009 Graph Theory II Planar Graphs A graph that can be drawn in R without any edges crossing is planar. An example of a graph which is not planar is the complete graph on 5 vertices (the graph in which every vertex is adjacent to every other vertex; all ( 5 ) = 0 edges are present). F 5 F 4 F F F F 6 crossing When we draw a planar graph, it divides R into different regions which are called faces. When talking about the faces of a graph, the infinite outer face is included. For example, the diagram here of a cube graph has 6 faces, denoted F,..., F 6 with F 6 the infinite outer face. 4-colour theorem: The faces of any planar graph can be coloured using at most 4 colours in total such that any two adjacent faces are not the same colour. The theorem was proposed in 85, and was popularized by Cayley. It was proven in 879 & 880. Flaws were found in those proofs in 890 & 89. It remained open again until it was finally proven in 976 by Appel & Haken. computers were involved in checking a finite number of cases of proof. proof overview: give a list of reducible configurations, show that induction can be used whenever a reducible configuration is found, and show that every graph contains a reducible configuration. people are still coming up with simpler and more transparent proofs today.

Note that we only disallow faces which share an edge to be coloured the same it is okay if like-coloured faces share a vertex. Otherwise we can come up with graphs (like the one pictured) which take an arbitrarily large number of colours. In the problems at the end of this handout, we show that a weaker 6-colour theorem is reasonably easy to prove. In a connected planar graph, Euler s formula states that the number of vertices the number of edges + the number of faces = where the number of faces includes the infinite outer face. We will often abbreviate this as V + F E = where V is the number of vertices, F is the number of faces, and E is the number of edges. Dual Graphs. Every planar graph has a dual graph. For any connected planar graph G, the dual of its dual is again G. To obtain the dual of a graph (e.g., the cube graph shown with black vertices below), we put a white vertex in every face of G. Then, whenever two faces of G are next to each other, we connect the corresponding two white vertices with a dual edge. Note that we can delete the original graph and just deal with the dual graph by itself, as shown in the figure below. Planar Dual We always have the following: Original Graph number of original faces = number of dual vertices number of original edges = number of dual edges number of original vertices = number of dual faces For example, to prove the first fact, just recall that we put one dual vertex in each face of the original graph. Another fact is that, if v is a vertex of the original graph of degree d, then the dual face corresponding to v has exactly d sides (see the diagram for an idea of the proof).

In the example above, the original graph had degree at every vertex and every face was a square; this implies that the dual graph has triangular faces and degree 4 at every vertex, i.e. the dual graph is a octahedron. Exercise. Compute the dual graphs of the tetrahedron, icosahedron, and dodecahedron. How are these graphs related to each other? Duality has a nice effect on the 4-colour theorem. Instead of colouring faces of a planar graph, we can think about colouring vertices of the dual graph in such a way that adjacent vertices get different colours. (Why is this nice? For example, we can t colour the faces of non-planar graphs since they don t exist, but we can colour their vertices.) We call an assignment of colours to vertices a proper colouring if every adjacent pair gets different colours. Exercise. What is the least total number of colours required to properly colour the following graph? The graph in the exercise above is usually denoted K, and called the complete bipartite graph, since it has two ( bi- ) groups ( parts ) of three vertices (, ) such that each vertex is connected to all vertices in the other part ( complete. ) Breadth-First Search. Here is a natural question, related to applications like Google Maps. I give you a graph containing vertices A and B. What is the least number of steps (along edges) that will get me from vertex A to vertex B? In the example below, we see that there is a path P (bold, blue edges) of length 4. But how can we actually prove this is the shortest path? A We now give the most common all-purpose idea to find shortest paths in graphs, which is called breadth-first search. The idea is that we will label every vertex according to its distance from A, i.e. the label of v is the minimum number of steps to get from A to v. We need to compute all the small numbers first before computing the large numbers, and the term breadth-first refers to the fact that we are sort of searching outwards from A in layers. B

4 First, we label A with the number 0. Then we label all neighbours of A with. Next, for all vertices v with label, for every unlabeled vertex w adjacent to v, we label w with. Then the unlabeled neighbours of -labeled vertices become -labeled, et cetera. You can prove by induction on the distance from A that this assigns the correct distance label to every vertex. The diagram below gives an example. A 0 A 0 B B A 0 4 4 4 B Implicit Search & Meet in the Middle. Graphs are hidden everywhere. In some cases, a graph search problem is the most natural way to think about a problem which says nothing about graphs! An example is a word ladder puzzle. There are lots of variations on this idea, so we describe it in full detail. You are given a start word and an end word, both 4 letters long. (E.g. COLD for the start and HEAT for the end.) The goal is to quickly transform the start word into the end word, subject to the following rules: (i) you can only change one letter at a time, and (ii) all intermediate words must be actual English words. (So you can t change COLD into ZOLD.) In some cases, word ladders are easy. The given example has a solution with 4 transformations: COLD-HOLD-HELD-HEAD-HEAT. This is clearly optimal since we need to change each letter once. But for more complex situations, this reasoning won t always figure out the shortest solution. Here is a way of thinking about the problem in terms of graphs: define a vertex for every 4-letter English word, and connect two words by an edge whenever they differ only in one letter. Then we are just looking for a shortest path! Exercise. Use breadth-first search to find a shortest path from POST to POTS.

5 Another conceivable situation is that you have a Rubik s cube that you want to solve using the least number of possible operations (turns of a side). You could model this by a graph with a vertex for each possible state/picture of the cube, and vertices linked by all possible face turns. In principle, if you know how to do some programming, and a little graph theory, this will allow you to find the shortest path between the original (mixed) state of the cube and the final (solved) state where all faces have one colour. We say in principle above because there are a lot of states to check, which takes up a lot of memory and uses a lot of processor time, even for today s modern computers. This complexity is important: if you ask Google Maps how to get to the supermarket because you are hungry, if it takes weeks to compute the answer, then you may have starved by then. Therefore, it is useful to have algorithms which have better performance than breadth-first search. A simple improvement to breadth firstsearch is the meet in the middle algorithm which interleaves a forwards breadth-first search from the start with a backwards breadth-first search from the end. We start whenever both searches have a common member. For example, let s find a shortest path from FOAM to FOOD. We start by searching one layer around FOAM: it is adjacent to ROAM, FORM, and FOAL. Then we go to FOOD and search one layer around it: it is adjacent to MOOD, FORD, FOOL, FOOT. Remark: as we go along, we are drawing tree structures which grow outwards from FOAM and FOOD, which are usually called breadth-first search trees. MOOD FOAL FORD FOOD FOAM ROAM FOOL FORM FOOT We just grew the FOOD tree so we go back to add a layer to the FOAM tree, which is pictured below. At this point the word FORD is in both trees so we are done: a shortest path is FOAM- FORM-FORD-FOOD. REAM ROOM ROAR FOAM ROAM FORM FOAL ROAD NORM FARM FIRM FORD etc.

6 In practice, this meet in the middle search can result in a huge savings. Imagine some search problem where the distance was 6. Suppose for the sake of estimating that the tree increases in size by a factor of nodes at each level. Then a BFS would result in a tree of size about 6 4 million, but meet-in the middle grows two trees each of size about 8 6500, which is a huge savings in work. Proofs of Euler s Formula. To conclude, since Euler s formula is one of the most well-used theorems about planar graphs, we should do it justice by actually figuring out how to prove it. We sketch two proof ideas here. Proof. Use induction. It is not so easy to figure out an appropriate induction variable, but a natural base case is trees: any tree has just one face, so V + F E = V + ( V ) = as needed. Then complete the proof by arguing that whenever we add an edge to the graph, it increases the number of faces by exactly. Proof. Use Problem in the exercises below for a direct proof.

7 Problems. Consider a connected planar graph G. Let T be a spanning tree of G. Let X be the set of all edges not in T. (a) Using the fact that T connects all vertices, show that in the dual graph G, X is acyclic. (b) Using the fact that T is acyclic, show that in the dual graph G, X connects all vertices. (Remember vertices of G correspond to faces of G.) (c) Deduce, using (a) and (b), that X is the edge set of a spanning tree of G.. A colouring of the vertices of G is proper if, for all edges uv of G, the colour of u and the colour of v are different. The 4-colour theorem states that every planar graph has a proper colouring using at most four colours in total. We will prove the weaker but easier statement that every planar graph has a proper colouring using at most six colours in total. Part. Assume the following statement is true: Every planar graph has at least one vertex v such that degree(v) 5. ( ) Assuming that ( ) is true, show by induction that every planar graph has a proper colouring using at most six colours in total. (Hint: deleting v from G leaves a planar graph.) Part. We will prove ( ). (a) If G has no cycles, show that G has a vertex of degree at most 5. (Hint: 5.) (b) If G has any cycles, then it is easy to argue that every face has at least three edges. Let E denote the number of edges of G and F denote the number of faces of G. Show that F E. (c) Suppose for the sake of contradiction that ( ) is false. Then there is a counterexample planar graph G in which every vertex has degree at least 6. Show that in this graph, V E, where V denotes the number of vertices of G. (d) Complete the proof of ( ) by using Euler s formula.. Use breadth-first search to prove one direction of last week s problem #6: if a graph has no cycles of odd length, construct a proper colouring using at most two colours. v 4. Find the furthest vertex (or vertices) from v in the graph on the left below. (It is called the Nauru graph.)

8 s t 5. Modify the breadth-first search and meet-inthe-middle search algorithms to work on directed graphs. As an example, find the shortest distance from s to t in the directed graph on the right above. 6. The 4-letter word graph has vertex set equal to the set of all 4-letter English words, and edges connecting two words when the letters in three positions are the same. (For example, MATH and MOTH are adjacent, POST and POTS are not adjacent, and an example of a path is COLD-HOLD-HELD-HEAD-HEAT.) (a) Find a cycle of length. (b) Find a shortest path between JUNK and GOLD. (c) Prove the graph is not planar (hint: use the 4-colour theorem and consider all words of the form?ats). Further resources: The draw this figure without tracing any line more than once puzzle from the first lecture is basically a question about whether the associated graph has a path which visits every edge once (but maybe some vertices more than once). It is called an Eulerian path. An Eulerian path exists if and only if the graph is connected, and at most two vertices have odd degree. An Eulerian cycle visits every edge exactly once and ends where it starts; an Eulerian cycle exists if and only if the graph is connected, and all vertices have even degree. See a proof at http://www.stanford.edu/class/cme05/lectures/lecture.pdf