Lecture 5 Graph Theory. Graphs Graphs are the most useful model with computer science such as logical design, formal languages, communication network,

Slides:



Advertisements
Similar presentations
CSE 211 Discrete Mathematics
Advertisements

CSE 211 Discrete Mathematics
Chapter 8 Topics in Graph Theory
Chapter 9 Graphs.
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.
Review Binary Search Trees Operations on Binary Search Tree
1 Slides based on those of Kenneth H. Rosen Slides by Sylvia Sorkin, Community College of Baltimore County - Essex Campus Graphs.
Discrete Mathematics and Its Applications
1 Section 8.2 Graph Terminology. 2 Terms related to undirected graphs Adjacent: 2 vertices u & v in an undirected graph G are adjacent (neighbors) in.
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.
Representing Graphs Wade Trappe. Lecture Overview Introduction Some Terminology –Paths Adjacency Matrix.
CTIS 154 Discrete Mathematics II1 8.2 Paths and Cycles Kadir A. Peker.
Applied Discrete Mathematics Week 12: Trees
Chapter 11 Graphs and Trees This handout: Terminology of Graphs Eulerian Cycles.
KNURE, Software department, Ph , N.V. Bilous Faculty of computer sciences Software department, KNURE Discrete.
Discrete Mathematics Lecture 9 Alexander Bukharovich New York University.
9.2 Graph Terminology and Special Types Graphs
GRAPH Learning Outcomes Students should be able to:
Graphs Chapter 10.
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 Graphs Chapters 9.1 and 9.2 University of Maryland Chapters 9.1 and 9.2 Based on slides by Y. Peng University of Maryland.
(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.
Can you connect the dots as shown without taking your pen off the page or drawing the same line twice.
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.
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.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Basic Notions on Graphs. The House-and-Utilities Problem.
Chapter 1 Fundamental Concepts Introduction to Graph Theory Douglas B. West July 11, 2002.
Chapter 5 Graphs  the puzzle of the seven bridge in the Königsberg,  on the Pregel.
Introduction to Graph Theory
Graph Theory and Applications
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
Basic properties Continuation
1 Graphs Terminology By: Sandeep Tuli Astt. Prof. CSE.
Introduction to Graph Theory
Chapter 9: Graphs.
(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.
1 Graphs Chapters 10.1 and 10.2 University of Maryland Chapters 10.1 and 10.2 Based on slides by Y. Peng University of Maryland.
Trees.
An Introduction to Graph Theory
Graphs: Definitions and Basic Properties
Chapters 8.1 and 8.2 Based on slides by Y. Peng University of Maryland
Chapter 5 Fundamental Concept
Graph theory Definitions Trees, cycles, directed graphs.
Agenda Lecture Content: Introduction to Graph Path and Cycle
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 10 Graphs Slides are adopted from “Discrete.
Graphs Chapters 10.1 and 10.2 Based on slides by Y. Peng University of Maryland.
Can you draw this picture without lifting up your pen/pencil?
Chapters 8.1 and 8.2 Based on slides by Y. Peng University of Maryland
CS100: Discrete structures
Representing Graphs Wade Trappe.
Let us switch to a new topic:
5/9/2019 Discrete Math II Howon Kim
Applied Combinatorics, 4th Ed. Alan Tucker
Chapter 10 Graphs and Trees
Applied Discrete Mathematics Week 13: Graphs
Agenda Review Lecture Content: Shortest Path Algorithm
Concepts of Computation
Presentation transcript:

Lecture 5 Graph Theory

Graphs Graphs are the most useful model with computer science such as logical design, formal languages, communication network, compiler writing and retrieval. A graph G consists of two things: (i)A set V whose elements are vertices, points or nodes. (ii) A set E of unordered pairs of distinct vertices called edges. We denote such a graph by G(V,E). Vertices u and v are said to be adjacent if there is an edge {u,v} with a function f from E(G) to V(G) X V(G). If e is an edges of G and f(e) = then p is called the initial vertex and q is the terminal vertex of e>

Graphs Example:- Consider the graph G with V(G) = {w,x,y,z}, E(G) = {e1,e2,e3,….,e8} and f give by the following table E(G)V(G) X V(G) e1 e2 e3 e4 e5 e6 e7 e8 e5 e7 Y X Z W e2 e6 e3 e1 e8 e4 Multi-edge loop Multi-Graph

Degree The degree of a vertex v, written deg(v), is equal to the number of edges which are incident on v. since each edge is counted twice in counting the degrees of the vertices of a graph, we have the following result. Theorem: The sum of the degrees of the vertices of a graph is equal to twice the number of edges. A vertex is said to be even or odd according as its degree is an even or odd number. Thus A and D are even vertices whereas B and C are odd vertices. This theorem also holds for multi-graphs where a loop is counted twice towards the degree of its endpoint. A vertex of degree zero is called an isolated vertex.

For Example : According to the following figures in the figure (a) we have deg(A) = 2, even deg(B) = 3, odd deg(C) = 3, odd deg(D) = 2 even in Fig (b) we have: deg (D) = 4 since the edge e6 is counted twice; hence D is an even vertex

Connectivity A walk in a multi-graph consists of an alternating sequence of vertices and edges of the form ( v0, e1, v1, e2, v2,……., en-1,vn-1,en,vn) such that the terminal vertex of one edge is initial vertix of the next. Length of walk: is the number n of edges. Closed walk: the walk is said to be closed if v0 = vn. Otherwise, we say that the walk is from v0 to vn. Trail: is a walk in which all edges are distinct. Path: is a walk in which all vertices are distinct. Cycle: is a closed walk such that all vertices are distinct except v1 = vn Example: Consider the following graph, then (P4, P1, P2, P5, P1, P2, P3, P6) : is a walk from P4 to P6. It is not a trail since the edge {P1,P2} is used twice. The sequence (P4, P1, P5, P2, P6): Is not a walk since there is no edge {P2, P6}. The sequence (P4, P1, P5, P2, P3, P5, P6) : Is a trail since no edge is used twice; but it is not a path since the vertex P5 is used twice. The sequence (P4, P1, P5, P3, P6): Is a path from P4 to P6. The shortest path from P4 to P6 is (P4, P5, P6) which has length 2 (2 edges only) The distance between vertices u & v d(u,v) is the length of the shortest path d(P4,P6) = 2

Connectivity, Connected Components A graph G is said to be connected if there is a path between any two of its vertices. Otherwise it is disconnected. Example : according to the following graphs: The graph in Fig.(a) is connected the graph in Fig. (b) is not connected since, for example, there is no path between vertices D and E. Figure (a) figure (b)

Connectivity, Connected Components Suppose G is a graph. A connected subgraph H of G is called a connected component of G if H is not contained in any larger connected subgraph of G. It is clear that any graph G can be partitioned into its connected components. For example according to the graph G in Fig. (b): has three connected components, the subgraphs induced by the vertex sets {A,C,D}, {E,F}, and {B}. The vertex B in Fig. (b) is called an isolated vertex since B does not belong to any edge or, in other words, deg(B) = 0

Cutpoints and Bridges Let G be a connected graph. A vertex v in G is called a cutpoint if G-v is disconnected. (G-v is the graph obtained from G by deleting v and all edges containing v.) An edge e of G is called a bridge if G - e is disconnected. (G - e is the graph obtained from G by simply deleting the edge e). In Fig. (6), the vertex D is a cutpoint and there are no bridges. In Fig. (7), the edge = {D,F} is a bridge. (Its endpoints D and F are cutpoints.)

difinitions A multigraph is said to traversable if it can be drawn without any breaks and without repeating any edge. That is if there is a walk includes all vertices and uses each edge exactly once. Such a walk must be a trail (no edge is used twice) A multigraph with more than two odd vertices cannot be traversable. Theorem (Euler) : A finite connected graph is eulerian if and only if each vertex has even degree. Any finite connected graph with two odd vertices is traversable. A traversable trail may begin at either odd vertex and will end at the other odd vertex.

Graph Types Notes: The diameter of connected Graph G is the maximum distance between any two of its vertix.