Agenda Review Lecture Content: Shortest Path Algorithm

Slides:



Advertisements
Similar presentations
Chapter 8 Topics in Graph Theory
Advertisements

Lecture 5 Graph Theory. Graphs Graphs are the most useful model with computer science such as logical design, formal languages, communication network,
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.7 Planar Graphs. Intro problem- 3 houses and 3 utilities K 3,3 problem: Can 3 houses be connected to 3 utilities so that no 2 lines cross? Similarly,
 Graph Graph  Types of Graphs Types of Graphs  Data Structures to Store Graphs Data Structures to Store Graphs  Graph Definitions Graph Definitions.
Applied Discrete Mathematics Week 12: Trees
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.
Drawing of G. Planar Embedding of G Proposition Proof. 1. Consider a drawing of K 5 or K 3,3 in the plane. Let C be a spanning cycle. 2. If the.
9.3 Representing Graphs and Graph Isomorphism
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,
Chapter 6 Graph Theory R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001.
Based on slides by Y. Peng University of Maryland
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.
Basic Notions on Graphs. The House-and-Utilities Problem.
MAT 2720 Discrete Mathematics Section 8.7 Planar Graphs
Planar Graphs Graph Coloring
Agenda Review: –Planar Graphs Lecture Content:  Concepts of Trees  Spanning Trees  Binary Trees Exercise.
1 Graphs Theory UNIT IV. 2Contents  Basic terminology,  Multi graphs and weighted graphs  Paths and circuits  Shortest path in weighted graph  Hamiltonian.
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.
An Introduction to Graph Theory
Graph Theory and Applications
Graph theory and networks. Basic definitions  A graph consists of points called vertices (or nodes) and lines called edges (or arcs). Each edge joins.
Chapter 9.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 6th ed., by Kenneth H.
Graph Theory Unit: 4.
Chapter 7 Planar Graphs 大葉大學 資訊工程系 黃鈴玲  7.2 Planar Embeddings  7.3 Euler’s Formula and Consequences  7.4 Characterization of Planar Graphs.
(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.
Graphs. Representations of graphs : undirected graph An undirected graph G have five vertices and seven edges An adjacency-list representation of G The.
An Introduction to Graph Theory
Outline 1 Properties of Planar Graphs 5/4/2018.
Applied Discrete Mathematics Week 14: Trees
Chapter 9 (Part 2): Graphs
Let us switch to a new topic:
Applied Discrete Mathematics Week 13: Graphs
Special Graphs By: Sandeep Tuli Astt. Prof. CSE.
Graph Theory CSRU1400, Fall 2007 Ellen Zhang.
Representing Graphs and
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.
Matrix Representation of Graph
Graphs.
Based on slides by Y. Peng University of Maryland
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
Graph.
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
CS100: Discrete structures
Connectivity Section 10.4.
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
Representing Graphs Wade Trappe.
MAT 2720 Discrete Mathematics
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 8th ed., by Kenneth H.
N(S) ={vV|uS,{u,v}E(G)}
Gaph Theory Planar Graphs
Discrete Mathematics for Computer Science
Applied Discrete Mathematics Week 13: Graphs
GRAPH THEORY Properties of Planar Graphs Ch9-1.
Based on slides by Y. Peng University of Maryland
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
Planarity.
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
GRAPH THEORY Properties of Planar Graphs Ch9-1.
Presentation transcript:

Agenda Review Lecture Content: Shortest Path Algorithm Representations of Graphs Isomorphism of Graphs Planar Graphs Quiz

Paths Definition Let v0 and vn be vertices in a graph. A path from v0 to vn of length n is an alternating sequence of n+1 vertices and n edges beginning with vertex v0 and ending with vertex vn, (v0,e1,v1,e2,v2,...,vn-1,en,vn) , in which edge ei is incident on vertices vi-1and vi for i = 1, ..., n. Path allows repetitions of vertices or edges or both If there are no parallel edges, path is simply a sequence of vertices.

Simple Paths and Cycles Definition Let v and w be vertices in a graph G. A simple path from v to w is a path from v to w with no repeated vertices. A cycle(or circuit) is a path of nonzero length from v to v with no repeated edges. A simple cycle is a cycle from v to v in which, except for the beginning and ending vertices that are both equal to v, there are no repeated vertices. Euler Cycle: A cycle in a graph G that includes all of the edges, and only visits each edge once Hamiltonian Cycle: A cycle in a graph G that contains each vertex in G exactly once, except for the starting and ending vertex that appears twice.

Shortest Path Algorithm

 Dijkstra’s Shortest Path Algorithm. Find the shortest path (a path having minimum length) between two given vertices.  Dijkstra’s Shortest Path Algorithm.

Dijkstra’s Shortest Path Algorithm

Dijkstra’s Shortest Path Algorithm: Example 1

Dijkstra’s Shortest Path Algorithm: Example 1 Continue labelling until z Shortest_Path = (a, b, c, z)

Dijkstra’s Shortest Path Algorithm: Example 2

Dijkstra’s Shortest Path Algorithm: Example 2

Representation of Graphs

Graph Representation Two type of matrices for graph representation: Based on the adjacency of vertices adjacency matrices Based on incidence of vertices and edges  incidence matrices

Adjacency Matrices A = [aij] Definition Suppose that G = (V, E) is a simple graph where |V| = n. Suppose that the vertices of G are v1, v2, …, vn The adjacency matrix A of G (or AG) is the n x n zero-one matrix with 1 as its (i, j)th entry when vi and vj, are adjacent and 0 as its (i, j)th entry when they are not adjacent . A = [aij] aij = 1 if {vi, vj} is an edge of G = 0 otherwise

Example

Example

Example: Graph with parallel edge & loop

Adjacency Matrices Theorem If A is the adjacency matrix of a simple graph, the ijth entry of An is equal to the number of paths of length n from vertex i to vertex j, n= 1, 2, ... . Example: Fig. 8.5.2 (Johnsonbaugh) Show the adjacency matrix A Compute A2 How many paths of length 2?

Incidence Matrices M = [mij], where: Definition Suppose that G = (V, E) is a graph where |V| = n. Suppose that the vertices of G are v1, v2, …, vn and the edges of G are e1, e2, …, em. The incidence matrix is the n x m matrix M = [mij], where: mij = 1 when edge ej is incidence with vi = 0 otherwise

Example

Example: Graph with parallel edges and loops

Isomorphisms of Graphs

Isomorphisme of Graphs Definition: The simple graphs G1 = (V1, E1) and G2 = (V2, E2) are isomorphic if there is a one-to-one and onto function f from V1 to V2 with the property that a and b are adjacent in G1 if and only if f(a) and f(b) are adjacent in G2, for all a and b in V1. Such a function f is called an isomorphism.

Show that G = (V, E) and H = (W, F) are isomorphic Example Show that G = (V, E) and H = (W, F) are isomorphic The function f with f(u1) = v1, f(u2) = v4, f(u3) = v3 and f(u4) = v2 is a one-to-one correspondence between G and H. For every adjacent vertices in G, there is also corresponding adjacent vertices in H.

Testing for isomorphism Testing isomorphic is difficult, since there are n! possible one-to-one correspondence for two graphs with n vertices, and further complication in testing adjacency.  Not practical for large n. It is easier to test that two graphs are not isomorphic, i.e. check: Have the same number of vertices. Have the same number of edges have the same number of vertices of each degree If any of quantities above differ, then the two graphs cannot be isomorphic But, if any of quantities above the same, it does not necessarily mean the two graphs are isomorphic

Example Are G and H isomorphic?

Example Are G and H isomorphic?

Check for isomorphism: using adjacency matrices Show the adjacency matrix of G is the same as the adjacency matric of H, when rows and columns are labeled to correspond to images under f of the vertices of G Example: Are G and H isomorphic?

Planar Graph

Planar Graphs Definition: A graph is called planar if it can be drawn in the plane without any edges crossing (where a crossing of edges is the intersection of the lines or arcs representing them at a point other than their common endpoint). Such a drawing is called a planar representation of the graph

Example: Planar Graph

Example: Non-Planar Graph

Euler’s Formula A planar representation of a graph splits the plane into regions or faces, including an unbounded region Euler’s Formula: Let G be a connected planar simple graph with e edges and v vertices. Let r be the number of regions in a planar representation of G, then r = e – v + 2 Boundary is formed by cycle

Some inequalities for planar graphs Euler’s formula can be used to establish some inequalities that must be satisfied by planar graphs, i.e:

K3,3 dan K5 Show that K3,3 and K5 are not planar (using inequality) If a graph contains K3,3 or K5 as a subgraph, then it cannot be planar The converse of statement above is not true Use concept of homeomorphic graph

Homeomorphic Graph Definition If a graph G has a vertex v of degree 2 and edges (v,v1) and (v,v2) with v1≠ v2 ,  edges (v,v1) and (v,v2) are in series A series reduction consists of deleting vertex v from G and replacing edges (v,v1) and (v,v2) by the edge (v1,v2). The graph G’ is said to be obtained from G by a series of reduction or elementary subdivision Graphs G1 and G2 are homeomorphic if G1 and G2 can be reduced to isomorphic graphs by performing a sequence of series reduction Any graph is homeomorphic to itself Graphs G1 and G2 are homeomorphic if G1 can be reduced to a graph isomorphic to G2 or if G2 can be reduced to a graph isomorphic to G1

Example

Kuratowski’s Theorem Theorem: A graph is nonplanar if and only if it contains a subgraph homeomorphic to K3,3 or K5 Example: Determine whether G is planar or nonplanar?