CSE 211 Discrete Mathematics

Slides:



Advertisements
Similar presentations
CSE 211 Discrete Mathematics
Advertisements

Discrete Mathematics University of Jazeera College of Information Technology & Design Khulood Ghazal Connectivity Lecture _13.
Chapter 8 Topics in Graph Theory
Chapter 9 Graphs.
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.
 期中测验时间:本周五上午 9 : 40  教师 TA 答疑时间 : 周三晚上 6 : 00—8 : 30  地点:软件楼 315 房间,  教师 TA :李弋老师  开卷考试.
Lecture 21 Paths and Circuits CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
C++ Programming: Program Design Including Data Structures, Third Edition Chapter 21: Graphs.
Applied Discrete Mathematics Week 12: Trees
Discrete Structures Chapter 7B Graphs Nurul Amelina Nasharuddin Multimedia Department.
CTIS 154 Discrete Mathematics II1 8.2 Paths and Cycles Kadir A. Peker.
1 Section 8.4 Connectivity. 2 Paths In an undirected graph, a path of length n from u to v, where n is a positive integer, is a sequence of edges e 1,
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
Chapter 11 Graphs and Trees This handout: Terminology of Graphs Eulerian Cycles.
Discrete Mathematics Lecture 9 Alexander Bukharovich New York University.
22C:19 Discrete Math Graphs Spring 2014 Sukumar Ghosh.
Copyright © Cengage Learning. All rights reserved.
GRAPH Learning Outcomes Students should be able to:
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,
Graphs Rosen, Chapter 8. Isomorphism (Rosen 560 to 563) Are two graphs G1 and G2 of equal form? That is, could I rename the vertices of G1 such that the.
Euler and Hamilton Paths
Structures 7 Decision Maths: Graph Theory, Networks and Algorithms.
Euler and Hamilton Paths. Euler Paths and Circuits The Seven bridges of Königsberg a b c d A B C D.
CS 200 Algorithms and Data Structures
Based on slides by Y. Peng University of Maryland
Module #19: Graph Theory: part II Rosen 5 th ed., chs. 8-9.
Graphs.  Definition A simple graph G= (V, E) consists of vertices, V, a nonempty set of vertices, and E, a set of unordered pairs of distinct elements.
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.
1 12/2/2015 MATH 224 – Discrete Mathematics Formally a graph is just a collection of unordered or ordered pairs, where for example, if {a,b} G if a, b.
COSC 2007 Data Structures II Chapter 14 Graphs I.
Lecture 10: Graph-Path-Circuit
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
Lecture 52 Section 11.2 Wed, Apr 26, 2006
Discrete Structures CISC 2315 FALL 2010 Graphs & Trees.
Review Euler Graph Theory: DEFINITION: A NETWORK IS A FIGURE MADE UP OF POINTS (VERTICES) CONNECTED BY NON-INTERSECTING CURVES (ARCS). DEFINITION: A VERTEX.
Introduction to Graphs Slides by Gene Boggess
Chapter 9: Graphs.
1) Find and label the degree of each vertex in the graph.
Euler and Hamiltonian Graphs
Graphs Definition: a graph is an abstract representation of a set of objects where some pairs of the objects are connected by links. The interconnected.
Graphs Rosen, Chapter 8. NOT ONE OF THESE! One of these!
(CSC 102) Lecture 30 Discrete Structures. Graphs.
Chap 7 Graph Def 1: Simple graph G=(V,E) V : nonempty set of vertices E : set of unordered pairs of distinct elements of V called edges Def 2: Multigraph.
1 GRAPH Learning Outcomes Students should be able to: Explain basic terminology of a graph Identify Euler and Hamiltonian cycle Represent graphs using.
رياضيات متقطعة لعلوم الحاسب MATH 226. Chapter 10.
Trees.
An Introduction to Graph Theory
EECS 203 Lecture 19 Graphs.
Graphs Hubert Chan (Chapter 9) [O1 Abstract Concepts]
Euler and Hamiltonian Graphs
Graph theory Definitions Trees, cycles, directed graphs.
Agenda Lecture Content: Introduction to Graph Path and Cycle
Discrete Structures – CNS2300
Introduction to Graph Theory Euler and Hamilton Paths and Circuits
Graphs Chapter 13.
Euler and Hamilton Paths
Euler and Hamiltonian Graphs
Chapter 10 Graphs and Trees
GRAPHS.
Presentation transcript:

CSE 211 Discrete Mathematics Chapter 8.4 Connectivity

Paths in Undirected Graphs There is a path from vertex v0 to vertex vn if there is a sequence of edges from v0 to vn This path is labeled as v0,v1,v2,…,vn and has a length of n. The path is a circuit if the path begins and ends with the same vertex. A path is simple if it does not contain the same edge more than once.

Graph Theoretic Foundations Paths and Cycles: Walk in a graph G is v0, e1, v1, …, vl-1, el, vl

Graph Theoretic Foundations Paths and Cycles: IF v0, v1, …, vl are distinct (except possible v0,vl) then the walk is a path. Denoted by v0, v1, …, vl or e1, e2, …, el Length of path is l

Paths, Cycles, and Trails A trail is a walk with no repeated edge.

Graph Theoretic Foundations Paths and Cycles: A path or walk is closed if v0 = vl A closed path containing at least one edge is called a cycle.

Paths in Undirected Graphs A path or circuit is said to pass through the vertices v0, v1, v2, …, vn or traverse the edges e1, e2, …, en.

Example u1, u4, u2, u3 Is it simple? yes What is the length? 3 Does it have any circuits? no u1 u2 u5 u4 u3

Example u1, u5, u4, u1, u2, u3 Is it simple? yes What is the length? 5 Does it have any circuits? Yes; u1, u5, u4, u1 u1 u2 u5 u3 u4

Example u1, u2, u5, u4, u3 Is it simple? yes What is the length? 4 Does it have any circuits? no u1 u2 u5 u3 u4

Connectedness An undirected graph is called connected if there is a path between every pair of distinct vertices of the graph. There is a simple path between every pair of distinct vertices of a connected undirected graph.

Example Are the following graphs connected? Yes No c e f a d b g e c a

Connectedness (Cont.) A graph that is not connected is the union of two or more disjoint connected subgraphs (called the connected components of the graph).

Example What are the connected components of the following graph? b d

Example What are the connected components of the following graph? b a {a, b, c}, {d, e}, {f, g, h}

Cut edges and vertices If one can remove a vertex (and all incident edges) and produce a graph with more connected components, the vertex is called a cut vertex. If removal of an edge creates more connected components the edge is called a cut edge or bridge.

Example Find the cut vertices and cut edges in the following graph. a b c d f e h g

Example Find the cut vertices and cut edges in the following graph. b c d f e h g Cut vertices: c and e Cut edge: (c, e)

Graph Theoretic Foundations Connectivity: Connectivity (G) of graph G is … G is k connected if (G)  k Separator or vertex-cut Cut vertex Separation pair

Graph Theoretic Foundations Trees and Forests: Tree – connected graph without any cycle Forest – a graph without any cycle

Connectedness in Directed Graphs A directed graph is strongly connected if there is a directed path between every pair of vertices. A directed graph is weakly connected if there is a path between every pair of vertices in the underlying undirected graph.

Example Is the following graph strongly connected? Is it weakly connected? This graph is strongly connected. Why? Because there is a directed path between every pair of vertices. If a directed graph is strongly connected, then it must also be weakly connected. a b c e d

Example Is the following graph strongly connected? Is it weakly connected? This graph is not strongly connected. Why not? Because there is no directed path between a and b, a and e, etc. However, it is weakly connected. (Imagine this graph as an undirected graph.) a b c e d

Connectedness in Directed Graphs The subgraphs of a directed graph G that are strongly connected but not contained in larger strongly connected subgraphs (the maximal strongly connected subgraphs) are called the strongly connected components or strong components of G.

Example What are the strongly connected components of the following graph? a b c e d This graph has three strongly connected components: The vertex a The vertex e The graph consisting of V = {b, c, d} and E = { (b, c), (c, d), (d, b)}

Distance in Trees and Graphs Consider a connected graph G. The distance between vertices u and v in G, written d(u, v), is the length of the shortest path between u and v. The diameter of G, written diam(G), is the maximum distance between any two points in G. For example, in Fig. 1-8(a), d(A,F) = 2 and diam(G) = 3, whereas in Fig. 1-8(b), d(A, F) = 3 and diam(G) = 4

Distance in Trees and Graphs If G has a u, v-path, then the distance from u to v, written dG(u, v) or simply d(u, v), is the least length of u, v-path. The diameter (diam G) is maxu,vV(G)d(u,v)

Distance in Trees and Graphs Find the diameter, eccentricity, radius and center of the given G.

CSE 211 Discrete Mathematics and Its Applications Chapter 8.5 Euler and Hamilton Paths

Euler Paths and Circuits The Seven bridges of Königsberg A B C D a b c d

Euler Paths and Circuits An Euler path is a path using every edge of the graph G exactly once. An Euler circuit is an Euler path that returns to its start. A B C D Does this graph have an Euler circuit? No.

Necessary and Sufficient Conditions How about multigraphs? A connected multigraph has a Euler circuit iff each of its vertices has an even degree. A connected multigraph has a Euler path but not an Euler circuit iff it has exactly two vertices of odd degree.

Example yes no no (a, e, c, d, e, b, a) Which of the following graphs has an Euler circuit? e d a c b e d a c b e c a d b yes no no (a, e, c, d, e, b, a)

Example yes no yes (a, e, c, d, e, b, a ) (a, c, d, e, b, d, a, b) Which of the following graphs has an Euler path? e d a c b e d a c b e c a d b yes no yes (a, e, c, d, e, b, a ) (a, c, d, e, b, d, a, b)

Euler Circuit in Directed Graphs NO (a, g, c, b, g, e, d, f, a) NO

Euler Path in Directed Graphs NO (a, g, c, b, g, e, d, f, a) (c, a, b, c, d, b)

Hamilton Paths and Circuits A Hamilton path in a graph G is a path which visits every vertex in G exactly once. A Hamilton circuit is a Hamilton path that returns to its start.

Hamilton Circuits Is there a circuit in this graph that passes through each vertex exactly once?

Hamilton Circuits Yes; this is a circuit that passes through each vertex exactly once.

Finding Hamilton Circuits Which of these three figures has a Hamilton circuit? Of, if no Hamilton circuit, a Hamilton path?

Finding Hamilton Circuits G1 has a Hamilton circuit: a, b, c, d, e, a G2 does not have a Hamilton circuit, but does have a Hamilton path: a, b, c, d G3 has neither.

Finding Hamilton Circuits Unlike the Euler circuit problem, finding Hamilton circuits is hard. There is no simple set of necessary and sufficient conditions, and no simple algorithm.

Properties to look for ... No vertex of degree 1 If a node has degree 2, then both edges incident to it must be in any Hamilton circuit. No smaller circuits contained in any Hamilton circuit (the start/endpoint of any smaller circuit would have to be visited twice).

A Sufficient Condition Let G be a connected simple graph with n vertices with n  3. G has a Hamilton circuit if the degree of each vertex is  n/2.

Travelling Salesman Problem A Hamilton circuit or path may be used to solve practical problems that require visiting “vertices”, such as: road intersections pipeline crossings communication network nodes A classic example is the Travelling Salesman Problem – finding a Hamilton circuit in a complete graph such that the total weight of its edges is minimal.

Summary Property Euler Hamilton Repeated visits to a given node allowed? Yes No Repeated traversals of a given edge allowed? Omitted nodes allowed? Omitted edges allowed?