Topics Paths and Circuits (11.2) A B C D E F G.

Slides:



Advertisements
Similar presentations
CSE 211 Discrete Mathematics
Advertisements

Chapter 8 Topics in Graph Theory
Lecture 5 Graph Theory. Graphs Graphs are the most useful model with computer science such as logical design, formal languages, communication network,
22C:19 Discrete Math Graphs Fall 2010 Sukumar Ghosh.
Introduction to Graph Theory Instructor: Dr. Chaudhary Department of Computer Science Millersville University Reading Assignment Chapter 1.
22C:19 Discrete Math Graphs Fall 2014 Sukumar Ghosh.
Walks, Paths and Circuits Walks, Paths and Circuits Sanjay Jain, Lecturer, School of Computing.
Midwestern State University Department of Computer Science Dr. Ranette Halverson CMPS 2433 – CHAPTER 4 GRAPHS 1.
Graph-02.
Introduction to Graphs
Lecture 21 Paths and Circuits CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
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.
Breadth-First Search Seminar – Networking Algorithms CS and EE Dept. Lulea University of Technology 27 Jan Mohammad Reza Akhavan.
Graph Search Methods Spring 2007 CSE, POSTECH. Graph Search Methods A vertex u is reachable from vertex v iff there is a path from v to u. A search method.
Midwestern State University Department of Computer Science Dr. Ranette Halverson CMPS 2433 CHAPTER 4 - PART 2 GRAPHS 1.
Koenigsberg bridge problem It is the Pregel River divided Koenigsberg into four distinct sections. Seven bridges connected the four portions of Koenigsberg.
Data Structures, Spring 2004 © L. Joskowicz 1 Data Structures – LECTURE 14 Strongly connected components Definition and motivation Algorithm Chapter 22.5.
Discrete Structures Chapter 7B Graphs Nurul Amelina Nasharuddin Multimedia Department.
CTIS 154 Discrete Mathematics II1 8.2 Paths and Cycles Kadir A. Peker.
4/17/2017 Section 8.5 Euler & Hamilton Paths ch8.5.
Graphs. Graph A “graph” is a collection of “nodes” that are connected to each other Graph Theory: This novel way of solving problems was invented by a.
Euler and Hamilton Paths
MCA 520: Graph Theory Instructor Neelima Gupta
Chapter 11 Graphs and Trees This handout: Terminology of Graphs Eulerian Cycles.
Discrete Mathematics Lecture 9 Alexander Bukharovich New York University.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
22C:19 Discrete Math Graphs Spring 2014 Sukumar Ghosh.
GRAPH Learning Outcomes Students should be able to:
Graph Theory Chapter 6 from Johnsonbaugh Article(6.1, 6.2)
EECS 203: It’s the end of the class and I feel fine. Graphs.
Graph Theoretic Concepts. What is a graph? A set of vertices (or nodes) linked by edges Mathematically, we often write G = (V,E)  V: set of vertices,
Graph Theory Topics to be covered:
GRAPHS CSE, POSTECH. Chapter 16 covers the following topics Graph terminology: vertex, edge, adjacent, incident, degree, cycle, path, connected component,
(CSC 102) Lecture 29 Discrete Structures. Graphs.
Representing and Using Graphs
Euler and Hamilton Paths
1 Topics Intro. to Graphs (11.1) A B C D EF G. 2 Definition (p.650) A graph G = V(G) + E(G) A set of vertices (or nodes), V(G) = {v 1, v 2, …, v n } A.
Euler and Hamilton Paths. Euler Paths and Circuits The Seven bridges of Königsberg a b c d A B C D.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
Graphs, Puzzles, & Map Coloring
5.4 Graph Models (part I – simple graphs). Graph is the tool for describing real-life situation. The process of using mathematical concept to solve real-life.
Data Structures & Algorithms Graphs
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Introduction to Graph Theory
CSCI 115 Chapter 8 Topics in Graph Theory. CSCI 115 §8.1 Graphs.
Graph theory and networks. Basic definitions  A graph consists of points called vertices (or nodes) and lines called edges (or arcs). Each edge joins.
MAT 2720 Discrete Mathematics Section 8.2 Paths and Cycles
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 5 The Mathematics of Getting Around 5.1Euler Circuit Problems 5.2What.
Basic properties Continuation
Walks, Paths and Circuits. A graph is a connected graph if it is possible to travel from one vertex to any other vertex by moving along successive edges.
Graphs Basic properties.
Chapter 9: Graphs.
Chapter 20: Graphs. Objectives In this chapter, you will: – Learn about graphs – Become familiar with the basic terminology of graph theory – Discover.
1) Find and label the degree of each vertex in the graph.
Euler and Hamiltonian Graphs
Chapter 14 Section 3 - Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
1 GRAPH Learning Outcomes Students should be able to: Explain basic terminology of a graph Identify Euler and Hamiltonian cycle Represent graphs using.
Programming Abstractions Cynthia Lee CS106B. Upcoming Topics Graphs! 1.Basics  What are they? How do we represent them? 2.Theorems  What are some things.
Introduction to Graph & Network Theory Thinking About Networks: From Metabolism to the Genome to Social Conflict Summer Workshop for Teachers June 27 th.
Graphs: Definitions and Basic Properties
Agenda Lecture Content: Introduction to Graph Path and Cycle
Introduction to Graph Theory Euler and Hamilton Paths and Circuits
Graph Theory.
Connectivity Section 10.4.
5 The Mathematics of Getting Around
Discrete Mathematics Lecture 13_14: Graph Theory and Tree
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Euler and Hamilton Paths
Chapter 10 Graphs and Trees
Presentation transcript:

Topics Paths and Circuits (11.2) A B C D E F G

Definitions (p.667) Let G be a graph, and v and w be vertices of G. A walk from v to w has the form ve1v1e2v2...en-1vn-1enw where v0 (the starting point) is v and vn (the destination) is w. Note: Each vi and ei may be repeated. en e2 e1 v v1 … w A B C D E F G Exercise: Find example walks from A to G in the graph. Q: Is there a best walk? Shortest walk?

Why are we concerned with walks in a graph? Many real-world applications … Navigation Transportation Computer networks Network topology Routing of data packets Wireless network (node movement) … Problem solving, games, gambling, … Searching (e.g., searching the Internet) Communication Management …

Why are we concerned with walks in a graph? See http://en.wikipedia.org/wiki/Graph_theory#Applications “Applications of graph theory are primarily, but not exclusively, concerned with labeled graphs and various specializations of these. Structures that can be represented as graphs are ubiquitous, and many problems of practical interest can be represented by graphs. The link structure of a website could be represented by a directed graph: the vertices are the web pages available at the website and a directed edge from page A to page B exists if and only if A contains a link to B. A similar approach can be taken to problems in travel, biology, computer chip design, and many other fields. The development of algorithms to handle graphs is therefore of major interest in computer science.”

Why are we concerned with walks in a graph? B C D E F G A walk may represent a solution in the problem domain. Example: In a sociogram, a walk represents one of the communication paths between two persons in an organization or community. With some specialization, concepts such as ‘channels of influence’, ‘most effective communication path’, ‘cliques’, etc. start to make sense.

Connectedness A graph H is a connected component of a graph G iff p.669: Let G be a graph. Two vertices v and w of G are connected iff there exist a walk from v to w. The graph G is connected iff given any two vertices v and w in G, there exist a walk from v to w. p.670: A graph H is a connected component of a graph G iff H is a subgraph of G, H is connected, and No connected subgraph of G has H as a subgraph and contains vertices or edges that are not in H. A B C D E F G Example 11.2.4 Exercise: Find all the connected components in the example graph.

Paths Let G be a graph, and v and w be vertices of G. A path from v to w is a walk from v to w with no repeated edges. Note: Repeated vertices are allowed. A C B D E Exercise: Find example paths from A to E in the graph. Q1: How many paths are there? Q2: What is the shortest path?

Simple Paths Let G be a graph, and v and w be vertices of G. A simple path from v to w is a path from v to w with no repeated vertices. Note: Neither repeated edges nor repeated vertices are allowed. A C B D E Exercise: Find example simple paths from A to E in the graph. Q1: How many simple paths are there? Q2: What is the shortest simple path?

Closed Walks Let G be a graph, and v and w be vertices of G. A closed walk is a walk that starts and ends at the same vertex. Note: Repeated edges and vertices are allowed. Exercise: Find example closed walks in the graph. Q1: How many closed walks are there? Does this question make sense at all? Q2: Starting with node A, how many closed walks are there?

Circuits Let G be a graph, and v and w be vertices of G. A circuit is a closed walk with no repeated edges. Note: Repeated vertices are allowed. A C B D E Exercise: Find example circuits in the graph. Q1: Starting with node A, how many circuits are there?

Simple Circuits Let G be a graph, and v and w be vertices of G. A simple circuit is a circuit with no repeated vertices. Note: Neither repeated edges nor repeated vertices are allowed. A B C D E F Exercise: Find example simple circuits in the graph. Q1: Starting with node A, how many simple circuits are there?

Comparisons p.667: Table of comparisons Q: What’s the difference between a walk and a path? How about a walk and a closed walk? How about a path and a circuit? How about a path and a simple path? A B C D E F How about a circuit and a simple circuit? How about a simple path and a simple circuit?

Questions?

Euler Paths A C B D E p.675: Let G be a graph. An Euler path for G is a path that visits each edge exactly once. Note: Repeated vertices are allowed. Exercise: Find an Euler path from A to D in the example graphs. A C B D E Q: Does every graph have an Euler path? Nope! Theorem: In an Euler path, either all or all but two vertices (i.e., the two endpoints) have an even degree.

Finding an Euler Path Example 11.2.7 Correction: Remove the edge between node I and K in the graph on page 676. Q: Find other Euler paths in the example graph. Q: How many Euler paths are there? Q: Is there an algorithm to find all the Euler paths in a given graph? A C B D E Exercise: Find all the Euler paths from A to D in this example graph.

Euler Circuits p.671: Let G be a graph. An Euler circuit for G is a circuit that contains every vertex and every edge of G. Note: Although a vertex may be repeated, an edge may not be repeated in an Euler circuit. Exercise: Find an Euler circuit starting with A in the example graphs. A C B D E A C B D E Theorem 11.2.2 (p.671): If a graph G has an Euler circuit, then every vertex of G has even degree. Theorem 11.2.3 (p.672): If every vertex of a nonempty connected graph G has even degree, then G has an Euler circuit.

Questions?