Graph Theory Proof In Class Exercise.

Slides:



Advertisements
Similar presentations
CS 336 March 19, 2012 Tandy Warnow.
Advertisements

MCA 202: Discrete Mathematics under construction Instructor Neelima Gupta
Introduction to Graph Theory Instructor: Dr. Chaudhary Department of Computer Science Millersville University Reading Assignment Chapter 1.
Walks, Paths and Circuits Walks, Paths and Circuits Sanjay Jain, Lecturer, School of Computing.
Introduction to Graphs
The 7 Bridges of Konigsberg A puzzle in need of solving.
Introduction to Graph Theory Lecture 11: Eulerian and Hamiltonian Graphs.
Section 14.1 Intro to Graph Theory. Beginnings of Graph Theory Euler’s Konigsberg Bridge Problem (18 th c.)  Can one walk through town and cross all.
MCA 520: Graph Theory Instructor Neelima Gupta
1 Chapter 15.3 Hamilton Paths and Hamilton Circuits Objectives 1.Understand the definitions of Hamilton paths & Hamilton circuits. 2.Find the number of.
Koenigsberg bridge problem It is the Pregel River divided Koenigsberg into four distinct sections. Seven bridges connected the four portions of Koenigsberg.
Applied Combinatorics, 4th Ed. Alan Tucker
Section 2.1 Euler Cycles Vocabulary CYCLE – a sequence of consecutively linked edges (x 1,x2),(x2,x3),…,(x n-1,x n ) whose starting vertex is the ending.
What is the first line of the proof? a). Assume G has an Eulerian circuit. b). Assume every vertex has even degree. c). Let v be any vertex in G. d). Let.
Introduction to Graphs Lecture 18: Nov 16. Seven Bridges of Königsberg Is it possible to walk with a route that crosses each bridge exactly once?
An Euler Circuit is a cycle of an undirected graph, that traverses every edge of the graph exactly once, and ends at the same node from which it began.
1 CIS /204—Spring 2008 Recitation 10 Friday, April 4, 2008.
MATH 310, FALL 2003 (Combinatorial Problem Solving) Lecture 5,Wednesday, September 10.
Complexity ©D.Moshkovitz 1 Paths On the Reasonability of Finding Paths in Graphs.
Eulerian Graphs CSE 331 Section 2 James Daly. Reminders Project 3 is out Covers graphs Due Friday.
Euler Paths and Circuits. The original problem A resident of Konigsberg wrote to Leonard Euler saying that a popular pastime for couples was to try.
Theory of Computing Lecture 10 MAS 714 Hartmut Klauck.
 Jim has six children.  Chris fights with Bob,Faye, and Eve all the time; Eve fights (besides with Chris) with Al and Di all the time; and Al and Bob.
7.1 Introduction to Graph Theory
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Introduction to Graphs. This Lecture In this part we will study some basic graph theory. Graph is a useful concept to model many problems in computer.
Associated Matrices of Vertex Edge Graphs Euler Paths and Circuits Block Days April 30, May 1 and May
Graph theory and networks. Basic definitions  A graph consists of points called vertices (or nodes) and lines called edges (or arcs). Each edge joins.
Euler Paths and Circuits. The original problem A resident of Konigsberg wrote to Leonard Euler saying that a popular pastime for couples was to try.
Eulerian Paths and Cycles. What is a Eulerian Path Given an graph. Find a path which uses every edge exactly once. This path is called an Eulerian Path.
Lecture 52 Section 11.2 Wed, Apr 26, 2006
Introduction to Graph Theory
(CSC 102) Lecture 30 Discrete Structures. Graphs.
Grade 11 AP Mathematics Graph Theory Definition: A graph, G, is a set of vertices v(G) = {v 1, v 2, v 3, …, v n } and edges e(G) = {v i v j where 1 ≤ i,
Trees.
Hex: a Game of Connecting Faces. Player 1 Player 2 Players take turns placing blue chips (player 1) and red chips (player 2). Player 1 plays first. Player.
CS Lecture 22 Graph Theory. Can I draw the above figure in one continuous trace with no line being drawn twice?
Graphs. Representations of graphs : undirected graph An undirected graph G have five vertices and seven edges An adjacency-list representation of G The.
MAT 110 Workshop Created by Michael Brown, Haden McDonald & Myra Bentley for use by the Center for Academic Support.
An Introduction to Graph Theory
Transition Graphs.
EECS 203 Lecture 19 Graphs.
CSNB 143 Discrete Mathematical Structures
Çizge Algoritmaları.
Graph Theory An Introduction.
Graphs: Definitions and Basic Properties
Data Structures Graphs - Terminology
Bipartite Matching Lecture 8: Oct 7.
Topological Sort In this topic, we will discuss: Motivations
Graph Theory CSRU1400, Fall 2007 Ellen Zhang.
School of Computing Clemson University Fall, 2012
Euler Paths and Circuits
Eulerian tours Miles Jones MTThF 8:30-9:50am CSE 4140 August 15, 2016.
Konigsberg’s Seven Bridges
HAMILTONIAN CIRCUIT ALGORITHMS
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett
Planarity Testing.
CSE 421: Introduction to Algorithms
Euler Paths and Circuits
Graph Theory.
Graphs Chapter 13.
Genome Assembly.
Graphs Chapter 11 Objectives Upon completion you will be able to:
Decision Maths Graphs.
Proof Techniques.
Hamilton Paths and Hamilton Circuits
Advanced Algorithms Analysis and Design
Applied Combinatorics, 4th Ed. Alan Tucker
Chapter 1: Urban Services Lesson Plan
The Pigeonhole Principle
Presentation transcript:

Graph Theory Proof In Class Exercise

Problem Queen Consolidated has developed a new inter-city transportation method to move products between its n distribution centers scattered around Starling city. They have dug tunnels directly between every pair of centers. Tunnels never intersect, and are designated to carry goods in a single direction. So between any two centers A and B, there is either a tunnel to carry goods from A to B or one to carry goods from B to A – but not both. Prove that, regardless of the value of n or how the tunnels are directed, there must be way to walk through tunnels in order to visit every distribution center without ever going the wrong direction in a tunnel.

Example

Proof by Induction What is The Base Case The Inductive Assumption The Inductive Step

Board Work Work in teams of three at the board, try to flesh out a solution Be prepared to describe it

Proof by Induction Base case (n = 2): If there n = 2 centers, there is only one tunnel. Clearly we can follow this tunnel from the source to the destination and hit ever center.

Proof by Induction Induction assumption: Assume that for some k ≥ 2, for any configuration of tunnels, there is a path that visits every center once.

Proof by Induction Induction step: We now prove the statement is true for k + 1. Suppose we have our k + 1 centers. Pick some center A and remove it. We are now left with k centers, so by our assumption there is a path that visits all of them. Label the centers along this path v1,v2,...,vk (in the order defined by that path), and and let i be the smallest value such that there is a tunnel from A to vi (if such an i exists).

Proof by Induction Now there are three possibilities: No such i exists – all tunnels go from vi to A. Then the path we are looking for is A,v1,v2,...,vk. i = 1: there is a tunnel from A to v1. Then the path we are looking for is A,v1,...,vk. i exists and i >1: Then there is tunnel from A to vi, and there is a tunnel from vi−1 to A (since i is the smallest value where there is a tunnel from A to vi). So now the path we want is: v1,...,vi−1,A, vi,...,vk.

Problem 2 - Eulerian cycle Show that any graph where the degree of every vertex is even has an Eulerian cycle. Show that if there are exactly two vertices a and b of odd degree, there is an Eulerian path from a to b. Show that if there are more than two vertices of odd degree, it is impossible to construct an Eulerian path.

Eulerian cycle Proof Proof: One way to prove this is by induction on the number of vertices. We will first solve the problem in the case that there are two vertices of odd degree. (If all vertices have even degree, temporarily remove some edge in the graph between vertices a and b and then a and b will have odd degree. Find the path from a to b which we will show how to do below, and then follow the removed edge from b back to a to make a cycle.)

Eulerian cycle Proof Suppose the odd-degree vertices are a and b. Begin at a and follow edges from one vertex to the next, crossing off edges so that you won’t use them again until you arrive at vertex b and you have used all the vertices into b. Why is it certain that you will eventually arrive at b? Well, suppose that you don’t. How could this happen? After you leave a, if you arrive at a vertex that is not b, there were, before you arrived, an even number of unused edges leading into it. That means that when you arrive, there is guaranteed to be an unused path away from that vertex, so you can continue your route. After entering and leaving a vertex, you reduce the number of edges by 2, so the vertex remains one with an even number (possibly zero) of unused paths. So if you have not yet arrived at vertex b, you can never get stuck at any other vertex, since there’s always a way out. Since the graph is finite, you cannot continue forever, so eventually you will have to arrive at vertex b. (And it has to be possible to get to vertex b since the graph is connected.)

Eulerian cycle Proof Note that a similar argument can be used to show that you can wait until you have used all the edges connecting to b. If b has more than one edge, leave each time you arrive until you get stuck at b. Now you have a path something like this: (a, a1, a2, . . . , an, b) leading from a to b. If all the edges are used in this path, you are done. If not, imagine that you have erased all the edges that you used. What remains will be a number of components of the graph (perhaps only one) where all the members of each component have even degree. Since b will not be in any of the components, all of them must have fewer vertices than the original graph.