Discrete Structures Chapter 7B Graphs Nurul Amelina Nasharuddin Multimedia Department.

Slides:



Advertisements
Similar presentations
CSE 211 Discrete Mathematics
Advertisements

Chapter 8 Topics in Graph Theory
Chapter 9 Graphs.
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 :李弋老师  开卷考试.
1 Lecture 5 (part 2) Graphs II Euler and Hamiltonian Path / Circuit Reading: Epp Chp 11.2, 11.3.
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.
Introduction This chapter explores graphs and their applications in computer science This chapter explores graphs and their applications in computer science.
 Graph Graph  Types of Graphs Types of Graphs  Data Structures to Store Graphs Data Structures to Store Graphs  Graph Definitions Graph Definitions.
C++ Programming: Program Design Including Data Structures, Third Edition Chapter 21: Graphs.
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.
Representing Graphs Wade Trappe. Lecture Overview Introduction Some Terminology –Paths Adjacency Matrix.
Discrete Structures Chapter 7A Graphs Nurul Amelina Nasharuddin Multimedia Department.
1 CMSC 250 Discrete Structures CMSC 250 Lecture 1 January 28, 2008.
CTIS 154 Discrete Mathematics II1 8.2 Paths and Cycles Kadir A. Peker.
MATH 310, FALL 2003 (Combinatorial Problem Solving) Lecture 5,Wednesday, September 10.
Chapter 4 Graphs.
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.
GRAPH Learning Outcomes Students should be able to:
Data Structures Using C++ 2E
Graph Theory Topics to be covered:
5.1  Routing Problems: planning and design of delivery routes.  Euler Circuit Problems: Type of routing problem also known as transversability problem.
(CSC 102) Lecture 29 Discrete Structures. Graphs.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Euler and Hamilton Paths. Euler Paths and Circuits The Seven bridges of Königsberg a b c d A B C D.
CSNB143 – Discrete Structure Topic 9 – Graph. Learning Outcomes Student should be able to identify graphs and its components. Students should know how.
1 CS104 : Discrete Structures Chapter V Graph Theory.
CS 200 Algorithms and Data Structures
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.
Week 11 - Monday.  What did we talk about last time?  Binomial theorem and Pascal's triangle  Conditional probability  Bayes’ theorem.
Graphs What are Graphs? General meaning in everyday math: A plot or chart of numerical data using a coordinate system. Technical meaning in discrete.
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
Lecture 10: Graph-Path-Circuit
Graphs 9.1 Graphs and Graph Models أ. زينب آل كاظم 1.
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
Section 13  Questions  Graphs. Graphs  A graph representation: –Adjacency matrix. Pros:? Cons:? –Neighbor lists. Pros:? Cons:?
Chapter 6: Graphs 6.1 Euler Circuits
 Quotient graph  Definition 13: Suppose G(V,E) is a graph and R is a equivalence relation on the set V. We construct the quotient graph G R in the follow.
Chapter 11 - Graph CSNB 143 Discrete Mathematical Structures.
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.
CS 261 – Nov. 17 Graph properties – Bipartiteness – Isomorphic to another graph – Pseudograph, multigraph, subgraph Path Cycle – Hamiltonian – Euler.
Week 11 - Wednesday.  What did we talk about last time?  Graphs  Paths and circuits.
(CSC 102) Lecture 30 Discrete Structures. Graphs.
1 GRAPH Learning Outcomes Students should be able to: Explain basic terminology of a graph Identify Euler and Hamiltonian cycle Represent graphs using.
1 Lecture 5 (part 2) Graphs II (a) Circuits; (b) Representation Reading: Epp Chp 11.2, 11.3
رياضيات متقطعة لعلوم الحاسب MATH 226. Chapter 10.
An Introduction to Graph Theory
CSNB 143 Discrete Mathematical Structures
Discrete Structures – CNS2300
Can you draw this picture without lifting up your pen/pencil?
Introduction to Graph Theory Euler and Hamilton Paths and Circuits
Walks, Paths, and Circuits
Decision Maths Graphs.
Representing Graphs Wade Trappe.
Euler and Hamilton Paths
Graphs G = (V, E) V are the vertices; E are the edges.
Chapter 10 Graphs and Trees
Presentation transcript:

Discrete Structures Chapter 7B Graphs Nurul Amelina Nasharuddin Multimedia Department

2 Objectives On completion of this topic, student should be able to: a.Explain basic terminology of a graph b.Identify Euler and Hamiltonian cycle c.Represent graphs using adjacency matrices

3 Seven Bridges of Königsberg Is it possible for a person to take a walk around town, starting and ending at the same location and crossing each of the seven bridges exactly once? NO

4 Terminology Walk, path, simple path, circuit, simple circuit Walk from two vertices is a finite alternating sequence of adjacent vertices and edges v 0 e 1 v 1 e 2 …e n v n Trivial walk from v to v consists of single vertex Closed walk – starts and ends at same vertex

5 Path Path – a walk that does not contain a repeated edge (may have a repeated vertex) v 0 e 1 v 1 e 2 …e n v n where all the e i are distinct Simple path – a path that does not contain a repeated vertex (and no repeated edge) v 0 e 1 v 1 e 2 …e n v n where all the e i and v j are distinct

6 Example - Path Path v Simple path w

7 Circuit Circuit – a closed walk without repeated edge v 0 e 1 v 1 e 2 …e n v n where e i are distinct and v 0 = v n Simple circuit – a circuit with no repeated vertex except first and last v 0 e 1 v 1 e 2 …e n v n where e i and v j are distinct and v 0 = v n

8 Example - Circuit Circuit Simple circuit

9 Repeated edge?Repeated vertex?Starts and ends at the same point? WalkAllowed PathNoAllowed Simple PathNo Closed WalkAllowed Yes CircuitNoAllowedYes Simple CircuitNoFirst and Last Only Yes

10 Connectedness Connectedness – if there is a walk from one to the other Let G be a graph. Two vertices v and w of G are connected iff there is a walk from v to w The graph G is connected iff given any two vertices v and w in G, there is a walk from v to w G is connected   vertices, v, w  V(G),  a walk from v to w

11 Example - Connectedness

12 Euler Circuits A circuit that contains every vertex and every edge of G A sequence of adjacent vertices and edges that 1.starts and ends at the same vertex, 2.uses every vertex of G at least once, and 3.uses every edge of G exactly once

13 If a Graph has an Euler Circuit, every Vertex has Even Degree. Contrapositive: if some vertex has odd degree, then the graph does not have an Euler circuit.

14 Theorem: Euler Circuits If a graph has an Euler Circuit, every vertex has even degree Contrapositive: if some vertex has odd degree, then the graph does not have an Euler circuit. If every vertex of nonempty graph has even degree and if graph is connected, then the graph has an Euler circuit

15 Theorem: Euler Circuits A graph G has an Euler circuit if, and only if, G is connected and every vertex of G has even degree

16 Hamiltonian Circuit A simple circuit that includes every vertex of G A sequence of adjacent vertices and distinct edges in which every vertex of G appears exactly once, except for the first and last, which are the same

17 Hamiltonian Circuit An Euler circuit for a graph G may not be a Hamiltonian circuit A Hamiltonian circuit may not be an Euler circuit Proved simple criterion for determining whether a graph has an Euler circuit No analogous criterion for determining whether a graph has a Hamiltonian circuit Nor is there an efficient algorithm for finding such an algorithm

18 Hamiltonian Circuit Finding Hamiltonian circuits

19 Traveling Salesman Problem

20 Objectives On completion of this topic, student should be able to: a.Explain basic terminology of a graph b.Identify Euler and Hamiltonian cycle c.Represent graphs using adjacency matrices

21 Matrices and Directed Graph Let G be a directed graph with ordered vertices v 1,v 2,…,v n The adjacency matrix of G is the n x n matrix, A =(a ij ) over the set of nonnegative integers such that a ij = the numbers of arrows from v i to v j for all i,j = 1,2,…,n.

22 Examples Adjacency matrix of a graph (Example ) Obtaining a directed graph from a matrix (Example )

23 Matrices and (Undirected) Graphs Let G be a (undirected) graph with ordered vertices v 1,v 2,…,v n The adjacency matrix of G is the n x n matrix A =(a ij ) over the set of nonnegative integers such that a ij = the numbers of edges connecting v i and v j for all i,j = 1,2,…,n

24 Examples Finding the adjacency matrix of a graph (Example )

25 Summary Definitions: vertex, edge, loop, parallel edges, complete graph and bipartite Paths & circuits: Euler and Hamiltonian circuits. Finding Euler circuit is easy but not so for Hamiltonian Matrix representation of graphs: adjacency matrix

26 THE END THANK YOU