Chapter 11 - Graph CSNB 143 Discrete Mathematical Structures.

Slides:



Advertisements
Similar presentations
CSE 211 Discrete Mathematics
Advertisements

 Theorem 5.9: Let G be a simple graph with n vertices, where n>2. G has a Hamilton circuit if for any two vertices u and v of G that are not adjacent,
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.
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 :李弋老师  开卷考试.
Introduction to 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.
Koenigsberg bridge problem It is the Pregel River divided Koenigsberg into four distinct sections. Seven bridges connected the four portions of Koenigsberg.
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.
Discrete Structures Chapter 7B Graphs Nurul Amelina Nasharuddin Multimedia Department.
Representing Graphs Wade Trappe. Lecture Overview Introduction Some Terminology –Paths Adjacency Matrix.
Discrete Structures Chapter 7A Graphs Nurul Amelina Nasharuddin Multimedia Department.
CTIS 154 Discrete Mathematics II1 8.2 Paths and Cycles Kadir A. Peker.
MTH118 Sanchita Mal-Sarkar. Routing Problems The fundamental questions: Is there any proper route for the particular problem? If there are many possible.
Discrete Mathematics Lecture 9 Alexander Bukharovich New York University.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Discrete Math Round, Round, Get Around… I Get Around Mathematics of Getting Around.
GRAPH Learning Outcomes Students should be able to:
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,
1 Excursions in Modern Mathematics Sixth Edition Peter Tannenbaum.
Spring 2015 Mathematics in Management Science Euler’s Theorems Euler Circuits & Paths ECT & EPT Burning Bridges Fleury’s Algorithm.
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.
Euler Paths & Euler Circuits
(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.
CSNB143 – Discrete Structure Topic 9 – Graph. Learning Outcomes Student should be able to identify graphs and its components. Students should know how.
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.
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.
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
Aim: What is an Euler Path and Circuit?
Unit – V Graph theory. Representation of Graphs Graph G (V, E,  ) V Set of vertices ESet of edges  Function that assigns vertices {v, w} to each edge.
1.5 Graph Theory. Graph Theory The Branch of mathematics in which graphs and networks are used to solve problems.
Graph Theory. A branch of math in which graphs are used to solve a problem. It is unlike a Cartesian graph that we used throughout our younger years of.
Lecture 10: Graph-Path-Circuit
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
Aim: Graph Theory – Paths & Circuits Course: Math Literacy Do Now: Aim: What are Circuits and Paths? Can you draw this figure without retracing any of.
 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.
Basic properties Continuation
Chapter 9: Graphs.
1) Find and label the degree of each vertex in the graph.
Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 14.1 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.
9.5 Euler and Hamilton graphs. 9.5: Euler and Hamilton paths Konigsberg problem.
Leda Demos By: Kelley Louie Credits: definitions from Algorithms Lectures and Discrete Mathematics with Algorithms by Albertson and Hutchinson graphics.
An Introduction to Graph Theory
Excursions in Modern Mathematics Sixth Edition
Excursions in Modern Mathematics Sixth Edition
CSNB 143 Discrete Mathematical Structures
Graphs: Definitions and Basic Properties
Agenda Lecture Content: Introduction to Graph Path and Cycle
Discrete Structures – CNS2300
Can you draw this picture without lifting up your pen/pencil?
Excursions in Modern Mathematics Sixth Edition
Graph Theory What is a graph?.
Discrete Mathematics Lecture 13_14: Graph Theory and Tree
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Section 14.1 Graphs, Paths, and Circuits
Applied Combinatorics, 4th Ed. Alan Tucker
Graphs, Paths, and Circuits
Warm Up – 3/19 - Wednesday Give the vertex set. Give the edge set.
Presentation transcript:

Chapter 11 - Graph CSNB 143 Discrete Mathematical Structures

OBJECTIVES Student should be able to identify graphs and its components. Students should be able to understand all the important things about graphs. Students should know how to use certain ways to solve problems in graphs.

Graph A graph G consist of a finite set V of objects called vertices (bucu-bucu), a finite set E of objects called edges (sisi-sisi) and a function , that assigns two vertices to each edge (may be the same vertex). We will write G = (V, E,  ). If e is an edge, and  (e) = {v, w), that are vertices for e, we say e is an edge between v and w. The vertices v and w are called the end points of e.

Ex 1:Let say V = {1, 2, 3, 4} and E = {e 1, e 2, e 3, e 4, e 5 }. Let  defined by  (e 1 ) =  (e 5 ) = {1, 2};  (e 2 ) = {4, 3};  (e 3 ) = {1, 3};  (e 4 ) = {2, 4} Then G = (V, E,  ) is a graph. Usually, graphs are represented by pictures, using a point for each vertex and a line for each edge, as below:

Graphs are often used to record information about relationships or connections. It is because the connections are the most important information, and not the pictures. Ex 2:From Ex 1, other pictures for graph G:

The degree of a vertex is the number of edges connected to it. Any edge that connects from a vertex to the same vertex, such as loop, contributes 2 to the degree of a vertex. A vertex with degree 0 is called an isolated vertex. A pair of vertices that determine an edge, or sharing the same edge, are adjacent (bersebelahan) vertices.

Ex 3:Consider graphs below: A B.a.b E C.c 1.d.e 6 D (a) (b) (c)

In (a), vertex A has degree 2, vertex B has degree 4, vertex C has degree 1, vertex D has degree 3, vertex E has degree 2. Find the degrees for all vertices in (b) and (c). In (b), vertex e is an isolated vertex. Vertices a and b are adjacent. Vertices a and d are not adjacent.

A path  in a graph G consists of a vertex sequence of  : v 1, v 2, …, v k, each one is adjacent to the next, and no edge occurs more than once. In short, path is a journey from vertex v 1 and travel through the edges to v k without using any edge twice. A circuit is a path that begins and ends at the same vertex. (circuit = cycle). A path is called simple if no vertex appears more than once in the vertex sequence.

Ex 4:Consider Ex 3: In (a), path  1 : A, B, E, D, D; path  2 : D, E, B, C and path  3 : A, B, A. Note that in  3, we do not know which path between A and B has been used first. In (b), path  4 : a, b, c, a; and  5 : d, c, a, a, b. Path  4 is a cycle. Path  6 : c, a, b, c, d is not simple. In (c), sequence 1, 2, 3, 2 is not a path, because the single edge between 2 and 3 has been traveled twice. Path  7 : 4, 5, 6, 4 is simple and it is a cycle.

A graph is called connected if there is a path from any vertex to any vertex in the graph. If not, the graph is called disconnected. If the graph is disconnected, the various connected pieces are called the components of the graph. Ex 5:Consider Ex 3: Graph (a) is connected. Graphs (b) and (c) are disconnected graphs. Graph (c) has two components.

Sub graph Let say G = (V, E,  ) is a graph. Choose a subset E 1 from E and subset V 1 from V so that V 1 contains all the end points of edges in E 1. Then H = (V 1, E 1,  1 ) is also a graph where  1 is  restricted to edges in E 1. H is called the sub graph of G.

Ex 6:Consider Ex 3. All of these below are the sub graphs of (a). A B A B B E E C E C D D (d) (e) (f)

Euler Path and Circuit A path in a graph G is called an Euler path if it includes EVERY EDGE exactly once. An Euler circuit is an Euler path that is a circuit. Ex 7:Consider the following graph: E 2 1 D 3 B C 4 5 A (a) (b)

Euler path exist in (a); E, D, B, A, C, D, but Euler circuit is not exist. Euler circuit exist in (b); 5, 3, 2, 1, 3, 4, 5. Ex 8: Consider the floor plan as below. Each room is connected to every room and to the outside. Is it possible to begin in a room or outside and take a walk that goes through each door exactly once?

Room A Room B Room C D outside D is labeled as outside area. The answer would be easier to find if we change it into graph.

A B D C When we are looking at a graph, is it possible to determine whether an Euler path or Euler circuit exists without actually finding it?

Theorem 1 (to identify a circuit) If a graph G has a vertex of odd degree, there can be no Euler circuit in G. If G is a connected graph and every vertex has even degree, then there is an Euler circuit in G. Theorem 2 (to identify a path) If a graph G has more than two vertices of odd degree, then there can be no Euler path in G.

If G is connected and has exactly two vertices of odd degree, there is an Euler path in G. The path must begin at one vertex of odd degree and end at the other. So the previous graph will be: Room A Room B Room C D outside

So, Euler path exist. Use the Theorem given above to prove that. Degrees for the four vertices are: A = 4, B = 4, C = 5, D = 7. From Theorem 1, there is odd degree vertex, so, there is no Euler circuit. From Theorem 2, there are exactly two odd degree vertices, so there is an Euler path. It must begin from C/D and ends at D/C. The path is: C, D, C, A, D, A, B, D, B, C, D

Exercise: Consider the graphs below, and find an Euler path or circuit. (a) (c) (b) (d)

Hamilton Path and Circuit A Hamilton path is a path that contains EACH VERTEX exactly once. Hamilton circuit is a circuit that contains each vertex exactly once except for the first vertex, which is also the last. Ex 9: Consider the following graphs: d c e 2 5 b 3 4 a 1 6 (a) (b)

A B A B D C E C (c) D (d)

In (a), path c, d, e, b, a is a Hamilton path because it contains each vertex exactly once. There is no Hamilton circuit. In (b), there is no Hamilton path or circuit because it is a non connected graph. In (c), path A, D, C, B is a Hamilton circuit. In (d), there is no Hamilton path or Hamilton circuit.

When we saw a graph, is it possible to determine whether a Hamilton path or circuit exists or not? Theorem 1: Let G be a connected graph with n vertices, n > 2 and no loops or multiple edges, G has a Hamilton circuit if for any two vertices u and v of G that are not adjacent, the degree of u plus the degree of v is greater that or equal to n. D(u) + D(v)  the number of vertices. Corollary 1: G has a Hamilton circuit if each vertex has degree greater than or equal to n/2.

Reminder: If Theorem 1 failed, we cannot say that the graph has no Hamilton circuit. We have to check the circuit or path manually.

Ex 10: Consider the following: B C D A E H G F Take two non adjacent vertices; let say A and E. The sum of their degrees are (2 + 2) = 4 < 8 (number of vertices). But if we check properly in manual, we can have the Hamilton circuit that is A, B, C, D, E, F, G, H, A Exercise: Consider graphs from Euler exercise. Use Theorem 1 first before manual checking.