Discrete Mathematics and Its Applications

Slides:



Advertisements
Similar presentations
CSE 211 Discrete Mathematics
Advertisements

CSE 211 Discrete Mathematics
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,
Graph-02.
1 Slides based on those of Kenneth H. Rosen Slides by Sylvia Sorkin, Community College of Baltimore County - Essex Campus Graphs.
1 Section 8.1 Introduction to Graphs. 2 Graph A discrete structure consisting of a set of vertices and a set of edges connecting these vertices –used.
Applied Discrete Mathematics Week 12: Trees
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.
Discrete Structures Chapter 7A Graphs Nurul Amelina Nasharuddin Multimedia Department.
CTIS 154 Discrete Mathematics II1 8.2 Paths and Cycles Kadir A. Peker.
Selected Topics in Data Networking Graph Representation.
Applied Discrete Mathematics Week 12: Trees
KNURE, Software department, Ph , N.V. Bilous Faculty of computer sciences Software department, KNURE Discrete.
Let us switch to a new topic:
Graphs Rosen 8.1, 8.2. There Are Many Uses for Graphs! Networks Data organizations Scene graphs Geometric simplification Program structure and processes.
9.2 Graph Terminology and Special Types Graphs
GRAPH Learning Outcomes Students should be able to:
Graphs Chapter 10.
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 9 (Part 1): Graphs  Introduction to Graphs (9.1)
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.
Module #19: Graph Theory: part I Rosen 5 th ed., chs. 8-9 내년 3 월 ? 교환 학생 프로그램 영어 점수 미리미리 준비하세요.
Foundations of Discrete Mathematics
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 9 (Part 2): Graphs  Graph Terminology (9.2)
aka “Undirected Graphs”
1 CS104 : Discrete Structures Chapter V Graph Theory.
Based on slides by Y. Peng University of Maryland
9.1 Introduction to Graphs
GRAPHS THEROY. 2 –Graphs Graph basics and definitions Vertices/nodes, edges, adjacency, incidence Degree, in-degree, out-degree Subgraphs, unions, isomorphism.
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.
9 Graphs. A graph G = (V, E) consists of V, a nonempty set of vertices (or nodes) and E, a set of edges. Each edge has either one or two vertices associated.
Chapter 5 Graphs  the puzzle of the seven bridge in the Königsberg,  on the Pregel.
CS 103 Discrete Structures Lecture 20
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 9 (Part 1): Graphs  Introduction to Graphs (9.1)
Graphs 9.1 Graphs and Graph Models أ. زينب آل كاظم 1.
Basic properties Continuation
Introduction to Graphs Slides by Gene Boggess
Graphs Basic properties.
1 Graphs Terminology By: Sandeep Tuli Astt. Prof. CSE.
Lecture 5.1: Graphs Basics
Chapter Graphs and Graph Models
Chapter 9: 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.
Chapter Chapter Summary Graphs and Graph Models Graph Terminology and Special Types of Graphs Representing Graphs and Graph Isomorphism Connectivity.
Chapter 9 (Part 1): Graphs
Applied Discrete Mathematics Week 14: Trees
Applied Discrete Mathematics Week 13: Graphs
Lecture 19: CONNECTIVITY Sections
Applied Discrete Mathematics Week 13: Graphs
Copyright © Zeph Grunschlag,
Graph Graphs and graph theory can be used to model:
Chapters 8.1 and 8.2 Based on slides by Y. Peng University of Maryland
Discrete Structures – CNS2300
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 10 Graphs Slides are adopted from “Discrete.
Graphs and Graph Models
Graphs Chapters 10.1 and 10.2 Based on slides by Y. Peng University of Maryland.
Chapter 13 (Part 1): Graphs
Chapters 8.1 and 8.2 Based on slides by Y. Peng University of Maryland
CS100: Discrete structures
10.1 Graphs and Graph Models
Graph Theory What is a graph?.
Let us switch to a new topic:
Graphs G = (V, E) V are the vertices; E are the edges.
Chapter 5 Graphs the puzzle of the seven bridge in the Königsberg,
Applied Discrete Mathematics Week 13: Graphs
Presentation transcript:

Discrete Mathematics and Its Applications Kenneth H. Rosen Chapter 7 Graphs Slides by Sylvia Sorkin, Community College of Baltimore County - Essex Campus

Simple Graph Definition 1. A simple graph G = (V, E) consists of V, a nonempty set of vertices, and E, a set of unordered pairs of distinct elements of V called edges.

A simple graph Detroit New York San Francisco Chicago Denver Washington Los Angeles How many vertices? How many edges?

A simple graph SET OF VERTICES V = { Chicago, Denver, Detroit, Los Angeles, New York, San Francisco, Washington } SET OF EDGES E = { {San Francisco, Los Angeles}, {San Francisco, Denver}, {Los Angeles, Denver}, {Denver, Chicago}, {Chicago, Detroit}, {Detroit, New York}, {New York, Washington}, {Chicago, Washington}, {Chicago, New York} }

A simple graph Detroit New York San Francisco Chicago Denver Washington Los Angeles The network is made up of computers and telephone lines between computers. There is at most 1 telephone line between 2 computers in the network. Each line operates in both directions. No computer has a telephone line to itself. These are undirected edges, each of which connects two distinct vertices, and no two edges connect the same pair of vertices.

A Non-Simple Graph Definition 2. In a multigraph G = (V, E) two or more edges may connect the same pair of vertices.

A Multigraph THERE CAN BE MULTIPLE TELEPHONE LINES BETWEEN TWO COMPUTERS IN THE NETWORK. Detroit New York San Francisco Chicago Denver Washington Los Angeles

Multiple Edges Detroit New York San Francisco Chicago Denver Washington Los Angeles Two edges are called multiple or parallel edges if they connect the same two distinct vertices.

Another Non-Simple Graph Definition 3. In a pseudograph G = (V, E) two or more edges may connect the same pair of vertices, and in addition, an edge may connect a vertex to itself.

A Pseudograph THERE CAN BE TELEPHONE LINES IN THE NETWORK FROM A COMPUTER TO ITSELF (for diagnostic use). Detroit New York San Francisco Chicago Denver Washington Los Angeles

Loops Detroit New York San Francisco Chicago Denver Washington Los Angeles An edge is called a loop if it connects a vertex to itself.

Undirected Graphs pseudographs multigraphs simple graphs

A Directed Graph Definition 4. In a directed graph G = (V, E) the edges are ordered pairs of (not necessarily distinct) vertices.

A Directed Graph SOME TELEPHONE LINES IN THE NETWORK MAY OPERATE IN ONLY ONE DIRECTION . Those that operate in two directions are represented by pairs of edges in opposite directions. Detroit New York Chicago San Francisco Denver Washington Los Angeles

A Directed Multigraph Definition 5. In a directed multigraph G = (V, E) the edges are ordered pairs of (not necessarily distinct) vertices, and in addition there may be multiple edges.

A Directed Multigraph THERE MAY BE SEVERAL ONE-WAY LINES IN THE SAME DIRECTION FROM ONE COMPUTER TO ANOTHER IN THE NETWORK. Detroit New York Chicago San Francisco Denver Washington Los Angeles

Types of Graphs TYPE EDGES MULTIPLE EDGES LOOPS ALLOWED? ALLOWED? Simple graph Undirected NO NO Multigraph Undirected YES NO Pseudograph Undirected YES YES Directed graph Directed NO YES Directed multigraph Directed YES YES

Adjacent Vertices (Neighbors) Definition 1. Two vertices, u and v in an undirected graph G are called adjacent (or neighbors) in G, if {u, v} is an edge of G. An edge e connecting u and v is called incident with vertices u and v, or is said to connect u and v. The vertices u and v are called endpoints of edge {u, v}.

Degree of a vertex Definition 1. The degree of a vertex in an undirected graph is the number of edges incident with it, except that a loop at a vertex contributes twice to the degree of that vertex. c d deg( d ) = 1 b a g f e

Degree of a vertex Definition 1. The degree of a vertex in an undirected graph is the number of edges incident with it, except that a loop at a vertex contributes twice to the degree of that vertex. c d b deg( e ) = 0 a g f e

Degree of a vertex Definition 1. The degree of a vertex in an undirected graph is the number of edges incident with it, except that a loop at a vertex contributes twice to the degree of that vertex. c d deg( b ) = 6 b a g f e

Degree of a vertex Find the degree of all the other vertices. deg( a ) deg( c ) deg( f ) deg( g ) c d deg( b ) = 6 deg( d ) = 1 b deg( e ) = 0 a g f e

Degree of a vertex deg( b ) = 6 deg( d ) = 1 deg( e ) = 0 Find the degree of all the other vertices. deg( a ) = 2 deg( c ) = 4 deg( f ) = 3 deg( g ) = 4 c d deg( b ) = 6 deg( d ) = 1 b deg( e ) = 0 a g f e

Degree of a vertex deg( b ) = 6 deg( d ) = 1 deg( e ) = 0 Find the degree of all the other vertices. deg( a ) = 2 deg( c ) = 4 deg( f ) = 3 deg( g ) = 4 TOTAL of degrees = 2 + 4 + 3 + 4 + 6 + 1 + 0 = 20 c d deg( b ) = 6 deg( d ) = 1 b deg( e ) = 0 a g f e

Degree of a vertex deg( b ) = 6 deg( d ) = 1 deg( e ) = 0 Find the degree of all the other vertices. deg( a ) = 2 deg( c ) = 4 deg( f ) = 3 deg( g ) = 4 TOTAL of degrees = 2 + 4 + 3 + 4 + 6 + 1 + 0 = 20 TOTAL NUMBER OF EDGES = 10 c d deg( b ) = 6 deg( d ) = 1 b deg( e ) = 0 a g f e

Handshaking Theorem Theorem 1. Let G = (V, E) be an undirected graph G with e edges. Then  deg( v ) = 2 e v  V “The sum of the degrees over all the vertices equals twice the number of edges.” NOTE: This applies even if multiple edges and loops are present.

Subgraph Definition 6. A subgraph of a graph G = (V, E) is a graph H = (W, F) where W  V and F  E.

C5 is a subgraph of K5 K5 C5

Union Definition 7. The union of 2 simple graphs G1 = ( V1 , E1 ) and G2 = ( V2 , E2 ) is the simple graph with vertex set V = V1  V2 and edge set E = E1  E2 . The union is denoted by G1  G2 .

W5 is the union of S5 and C5 S5 W5 C5 c b d c c f c a e b d f b d a a