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

Similar documents
Assignment 4 Solutions of graph problems

INTRODUCTION TO GRAPH THEORY. 1. Definitions

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

Chapter 3: Paths and Cycles

An Introduction to Graph Theory

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.

Sarah Will Math 490 December 2, 2009

Lecture 5: Graphs. Rajat Mittal. IIT Kanpur

DO NOT RE-DISTRIBUTE THIS SOLUTION FILE

MAT 145: PROBLEM SET 4

Math 776 Graph Theory Lecture Note 1 Basic concepts

Exercise set 2 Solutions

Basics of Graph Theory

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

8.2 Paths and Cycles

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

Fundamental Properties of Graphs

Majority and Friendship Paradoxes

2. CONNECTIVITY Connectivity

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

Part II. Graph Theory. Year

Module 11. Directed Graphs. Contents

Characterization of Graphs with Eulerian Circuits

Math.3336: Discrete Mathematics. Chapter 10 Graph Theory

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

Remarks on Kuratowski s Planarity Theorem. A planar graph is a graph that can be drawn in a plane without edges crossing one another.

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

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

8 Colouring Planar Graphs

Elements of Graph Theory

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

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

Chapter 11: Graphs and Trees. March 23, 2008

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

14 More Graphs: Euler Tours and Hamilton Cycles

Number Theory and Graph Theory

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

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.

Math 170- Graph Theory Notes

Discrete mathematics II. - Graphs

Solutions to In Class Problems Week 5, Wed.

Introduction to Graph Theory

Notebook Assignments

11.2 Eulerian Trails

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

Discrete mathematics

Matching and Planarity

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 Theory Questions from Past Papers

Introduction III. Graphs. Motivations I. Introduction IV

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

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

Lecture 5: Graphs. Graphs! Euler Definitions: model. Fact! Euler Again!! Planar graphs. Euler Again!!!!

Lecture 6: Graph Properties

Math 443/543 Graph Theory Notes 2: Transportation problems

Math Summer 2012

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

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

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

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

Discrete Wiskunde II. Lecture 6: Planar Graphs

0.0.1 Network Analysis

Lecture 20 : Trees DRAFT

Graph Theory. Chapter 4.

Graph Theory. Part of Texas Counties.

GRAPH THEORY: AN INTRODUCTION

MAS 341: GRAPH THEORY 2016 EXAM SOLUTIONS

Discrete Mathematics I So Practice Sheet Solutions 1

Greedy algorithms is another useful way for solving optimization problems.

CLAW-FREE 3-CONNECTED P 11 -FREE GRAPHS ARE HAMILTONIAN

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

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

1 Variations of the Traveling Salesman Problem

Math 485, Graph Theory: Homework #3

PACKING DIGRAPHS WITH DIRECTED CLOSED TRAILS

Intermediate Math Circles Wednesday, February 22, 2017 Graph Theory III

Treewidth and graph minors

Answers to specimen paper questions. Most of the answers below go into rather more detail than is really needed. Please let me know of any mistakes.

Planar graphs. Math Prof. Kindred - Lecture 16 Page 1

The Konigsberg Bridge Problem

5 Graphs

Assignment # 4 Selected Solutions

2 Geometry Solutions

Varying Applications (examples)

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

Pebble Sets in Convex Polygons

Homework 6 Solutions CS330 Discrete Structures, Fall 2017

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

Combinatorics Summary Sheet for Exam 1 Material 2019

Topic 10 Part 2 [474 marks]

Graph Theory: Starting Out

Ma/CS 6b Class 26: Art Galleries and Politicians

Double Vertex Graphs and Complete Double Vertex Graphs. Jobby Jacob, Wayne Goddard and Renu Laskar Clemson University April, 2007

Paths, Circuits, and Connected Graphs

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

1 Digraphs. Definition 1

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

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

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

Transcription:

Basic Combinatorics Math 40210, Section 01 Fall 2012 Homework 4 Solutions 1.4.2 2: One possible implementation: Start with abcgfjiea From edge cd build, using previously unmarked edges: cdhlponminjkghc Patch first two together: abcdhlponminjkghcgf jiea From edge kl build, using previously unmarked edges: klok Patch into what we have so far: abcdhlponminjklokghcgf jiea From edge eb build, using previously unmarked edges: ebfb Patch into what we have so far: abcdhlponminjklokghcgf jiebfba No more edges! Have Euler circuit abcdhlponminjklokghcgf jiebf ba 1.4.2 4: Suppose G is connected and has an Euler trail. Either: the trail is a circuit, in which we know (from a theorem) that all degrees are even. Or: the trail is not a circuit. Suppose in this case that it starts at a and ends at b a. Add edge ab to G, to get G. Clearly G has an Euler circuit (just add edge ab to the Euler trail in G), and so all degrees in G are even. This means that all degrees in G are even, except those of a and b, which are even minus one (also known as odd). In either situation, G has at most two vertices with odd degree. Conversely, suppose G is connected and has a most two odd degree vertices. If it has no odd degree vertices, then it has all even degree vertices and so has an Euler circuit and hence a trail. It can t have just one odd degree vertex (if it did the sum of the degrees would not be even), so he remaining case to consider is when G has exactly two odd degree vertices, a and b. Add an edge ab (or, if ab is already an edge, add a new vertex c joined only to a and b, to keep the graph simple) to get a graph which all even degrees and hence an Euler circuit. Remove ab (or ac and cb) from the circuit to get an Euler trial in the original graph, staring at a and ending at b. 1.4.2 5: We ll show that if every edge lies on an odd number of cycles, then all degrees are even (so G has an Euler circuit). Consider any vertex v. The total number of cycles passing through v is half the sum, over all edges e incident with v, of the number of cycles using the edge e; the reason for the half is that each cycle using v uses exactly two of the edges incident with v, and so is counted twice in the sum. Since the number 1

of cycles passing through v is an integer, it must be that the sum, over all edges e incident with v, of the number of cycles using the edge e, must be even. This is a sum of odd terms (by hypothesis), so for the sum to be even, there must be an even number of terms, and so the degree of v must be even, as we claimed. 1.4.2 7a: To have an Euler trail, at most two vertices must have odd degree. K n1,n 2 has n 1 vertices of degree n 2 and n 2 of degree n 1. We consider cases, depending on the parities of n 1 and n 2 (I m not thinking about the possibility that n 1, n 2 = 0, since we didn t really define K n1,n 2 in this case): If n 1, n 2 are both even: all degrees are even, G has Euler circuit no matter what the values of n 1, n 2 If n 1 is odd, n 2 is even: G has n 2 vertices of odd degree, the rest even, so has and Euler trail (but not a circuit) only if n 2 = 2 If n 1 is even, n 2 is odd: G has n 1 vertices of odd degree, the rest even, so has and Euler trail (but not a circuit) only if n 1 = 2 If n 1, n 2 are both odd: all degrees of G are odd, and the only such G with an Euler trail is K 1,1, so must have n 1 = n 2 = 1 Summary: K n1,n 2 has an Euler trail iff n 1, n 2 are both even, OR exactly one of n 1, n 2 is odd and the other is 2, OR both are odd and equal to 1. 1.4.2 7b: Following the analysis of the last part, K n1,n 2 has an Euler circuit iff n 1, n 2 are both even. In Problem 1.4.2(5), we showed that if every edge of G lies on an odd number of cycles, then G is Eulerian. It turns out that the converse of this is true, also (so this gives a new characterization of Eulerian graphs: a connected graph is Eulerian if and only if every vertex lies on an odd number of cycles). The proof of this is rather harder than I was expecting when I asked the question. I ll give a rough sketch here, and write up a more detailed solution later: Fix edge e = uv. We begin by counting walks from u to v in G uv that don t every immediately repeat an edge (i.e. that don t ever go a b a). Since (in G uv) d(u), d(v) are both odd, and all other degrees are even (this is where we use the hypothesis that G is Eulerian), when we are constructing such a walk, we always have an odd number of choices to make (Starting from u there are an odd number of choices, and from every other vertex, there is one edge we can t use (the edge we came in on) so there are an odd number of ways to continue). From this, it s possible to argue that there an odd number of such (finite) walks in total (essentially, because the product of odd numbers is odd). Now we go to paths from u to v. All paths appear as walks of the kind described above, but some vertex-repeating walks also appear, and we need to remove these. These vertex-repeating walks can always be deleted in pairs: given a vertex-repeating walk, find a pair of identical vertices along the walk with the property that there is 2

no repetitions of vertices in between them. If the walk goes, for example, a b c d e a between these two repeating vertices (so the walk traverses a cycle), then there is another walk that is the same as the first except that in the middle it goes a e d c b a (so the walk traverses the cycle in the opposite direction). These two vertex-repeating walks can be removed from the list of walks together. In this way, we can eliminate all vertex-repeating walks by deleting an even number of walks; so what s left is an odd number of paths. Since there are an odd number of paths from u to v in G uv, there are an odd number of cycles using uv in G (add uv to each path to get each cycle). 1.4.3 1: Here s a possible solution: 1.4.3 3: Let P = v 1 v 2... v p be a longest path in G (or length p 1). We separate two cases. First, suppose that v 1 v p is an edge. If so, we have a cycle C = v 1 v 2... v p c 1. If this includes all the vertices, we have a Hamilton cycle. If not, then since G is connected, there is a v that is not in {v 1,..., v p } that is adjacent to something in C; but then we can use the edge from v to C, together with all but one of the edges of C, to create a path of length p in G, a contradiction (P, the longest path, has length p 1). That deals completely with the case v 1 v p an edge. If v 1 v p is not an edge, then deg(v 1 )+deg(v p ) n, by hypothesis. We may not complete the proof exactly as we completed the proof of Dirac theorem in class; if you read through the proof, you will see that we did not actually use δ n/2 in that proof, only that deg(v 1 ) + deg(v p ) n. 1.4.3 10a: Let C = v 1 v 2... v n v 1 be a Hamilton cycle. Say that a set of vertices forms an interval in C if it of the form {v i, v i+1,..., v i + k} for some i + k n; or of the form {v i, v i+1,..., v n 1, v n, v 1, v 2,..., v k } for some k < i. It s easy to see that if we remove l disjoint intervals from C, then the cycle breaks into exactly l components. A collection of S vertices from G can form at most S maximal intervals, so the removal of S vertices breaks C into at most S components. Adding back the edges of G that aren t in C, we can only decrease the number of components; so G S has at most S components. 3

1.4.3 10b: If G has a Hamilton cycle, a stronger bound follows from part a). So assume that P = v 1 v 2... v n be a Hamilton path, with v 1 v n. Form G from G by adding edge v 1 v n. Removing S vertices from G creates at most S components, by part a). Removing (if it s still there) the phantom edge v 1 v n adds at most one extra component; so removing S vertices from G creates at most S + 1 components. 1.4.3 12a: Suppose that n 1 and n 2 differ by more than 1. Then any path starting in the smaller partite set (say, wlog, the one of size n 1 ) can only visit the larger partite set at most n 1 times (before we run out of vertices in the smaller set to continue the path by), and so such a path can t be Hamiltonian. Any path starting in the larger partite set can only visit the larger partite set at most n 1 + 1 times (before we run out of vertices in the smaller set to continue the path by), and so such a path can t be Hamiltonian, either. So n 1 n 2 1 is necessary for a Hamilton path to exist. This condition is also sufficient: if n 2 = n 1 + 1, start the path in the partite set of size n 2 (in which case it ends in the same partite set, and so cannot be continued to a Hamilton cycle), and if n 2 = n 1, start the path anywhere (in this case, it ends in the opposite partite set, and so as long as n 1, n 2 2 it can be continued to a Hamilton cycle; it obviously can t if n 1 = n 2 = 1). In summary: K n1,n 2 is traceable iff n 1 and n 2 differ by at most 1. 1.4.3 12b: Following the reasoning of part a), a necessary and sufficient condition for K n1,n 2 to be Hamiltonian is if n 1 = n 2 and both are greater than 1. Hamilton paths/cycles in Petersen graph: For the first part (existence of a Hamilton path), see figure 1 of the figures page. To see that there is no Hamilton cycle: suppose there was. Then the graph consists of a 10-cycle, and 5 other edges that are all chords of this cycle (joining two non-consecutive vertices). If all 5 of these chords join pairs of vertices that are directly opposite each other in the 10-cycle, then we have some 4-cycles (see figure 2 of the figures page); so we may assume that at least one chord joins two vertices at distance 4 along the 10-cycle; note that no chord can join vertices at distance 2 or 3 along the 10-cycle, as this would instantly give either a 3-cycle or a 4-cycle. Let that chord be e. Now look at vertex v, opposite on the 10-cycle to one of the end vertices of e. Any chord added from v creates a cycle of length 3 or 4, a contradiction (see figure 3 of the figures page). So the Petersen graph is not Hamiltonian. What I describe above is due to Doug West. There are other, more laborious way, to prove this fact. Here s a sketch of one: any Hamilton cycle must cross from the outer pentagon to the inner star an even number of times (otherwise, it doesn t end where it began). So there are two cases, crossing twice and crossing 4 times. In either case, after a little brute force effort, you find that you cannot end up with a cycle. P versus NP 1: We use that fact that if G is connected, then for each pair i, j of vertices (with i j), there is a path between i and j of length at most n, so there is some 1 k n such that the ij entry of A k is greater than 0 (where A is the adjacency 4

matrix of G); but if G is not connected, then there is some pair i, j for which the ij entry of A k is 0 for all k = 1,..., n. So, start with the n by n adjacency matrix A. Compute A 2, A 3,..., A n. (Time for this: n n 3 = n 4 if you use standard matrix multiplication). Now look at the ij entry of each of these n matrices, for each i j. (Time for this n n 2 = n 3 ). If there is even a single i, j (i j) for which the ij entry of each A k is 0, then G is not connected; if for every i, j (i j) there is some k for which the ij entry of some A k is 0, then G is connected. The total time for this process is around n 4. P versus NP 2: For each of the no more than n 2 edges, compute the adjacency matrix of G minus that edge (this just requires changing two entries of the adjacency matrix of G). Then use the method described in the last question to check if the modified graph is connected (if it is, the edge is not a bridge; if it not, the edge is a bridge). The total time to check every edge is around n 2 n 4 = n 6. 1.5.1 1: See figure 4 of the figures page for possible representations. 1.5.1 4: Here we have to be careful. It s not enough to say, for example, remove an edge attached to a leaf; draw the smaller tree in the plane without crossing edges (ok by induction), then put in the last edge. If you take this approach, you need to give a convincing argument that the edges of the smaller tree have been drawn in such a way that a new edge can be added without crossing one of the previous edges, and this brings in a lot of messy topology. It s helpful actually to prove something a little stronger: every tree has a planar representation in which all edges are straight lines. We proceed by induction on n, the number of vertices. If n = 1, it is obvious. If n > 1, find a leaf u with unique neighbor v, and delete u to get a smaller tree, which by induction has a straight-line planar representation. Look at vertex v. In some small disc in R 2 centered at v, the planar representation consists of a finite number of radii centered at v, dividing the disc into finitely many wedges. Pick one of these arbitrarily, put u in it (anywhere) and join it to v, giving a straight-line planar representation of the larger tree. This ends the induction step. Note: It s a theorem (proved independently by Fáry and Wagner) that every planar graph has a planar representation in which every edge is a straight line. 1.5.1 5: Here s a possible solution: 5

1.5.1 8: We know that for connected graphs, the numbers of vertices and edges determine the number of regions, so it seems very unlikely that this information determines (planar) graphs up isomorphism. Figure 5 of the figures page shows one of (many) pairs that give a counterexample. 6