Graphs, representation, isomorphism, connectivity

Slides:



Advertisements
Similar presentations
Numbers Treasure Hunt Following each question, click on the answer. If correct, the next page will load with a graphic first – these can be used to check.
Advertisements

1 A B C
Scenario: EOT/EOT-R/COT Resident admitted March 10th Admitted for PT and OT following knee replacement for patient with CHF, COPD, shortness of breath.
Mathematical Preliminaries
Variations of the Turing Machine
Angstrom Care 培苗社 Quadratic Equation II
AP STUDY SESSION 2.
1
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
Properties Use, share, or modify this drill on mathematic properties. There is too much material for a single class, so you’ll have to select for your.
David Burdett May 11, 2004 Package Binding for WS CDL.
CSE 211 Discrete Mathematics
Properties of Real Numbers CommutativeAssociativeDistributive Identity + × Inverse + ×
Local Customization Chapter 2. Local Customization 2-2 Objectives Customization Considerations Types of Data Elements Location for Locally Defined Data.
Custom Statutory Programs Chapter 3. Customary Statutory Programs and Titles 3-2 Objectives Add Local Statutory Programs Create Customer Application For.
CALENDAR.
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt BlendsDigraphsShort.
Agents & Intelligent Systems Dr Liz Black
1 Click here to End Presentation Software: Installation and Updates Internet Download CD release NACIS Updates.
The 5S numbers game..
Break Time Remaining 10:00.
Turing Machines.
Table 12.1: Cash Flows to a Cash and Carry Trading Strategy.
PP Test Review Sections 6-1 to 6-6
1 The Blue Café by Chris Rea My world is miles of endless roads.
Bright Futures Guidelines Priorities and Screening Tables
EIS Bridge Tool and Staging Tables September 1, 2009 Instructor: Way Poteat Slide: 1.
Outline Minimum Spanning Tree Maximal Flow Algorithm LP formulation 1.
Bellwork Do the following problem on a ½ sheet of paper and turn in.
Exarte Bezoek aan de Mediacampus Bachelor in de grafische en digitale media April 2014.
TESOL International Convention Presentation- ESL Instruction: Developing Your Skills to Become a Master Conductor by Beth Clifton Crumpler by.
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
Discrete Mathematics University of Jazeera College of Information Technology & Design Khulood Ghazal Connectivity Lecture _13.
1 RA III - Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Buenos Aires, Argentina, 25 – 27 October 2006 Status of observing programmes in RA.
Basel-ICU-Journal Challenge18/20/ Basel-ICU-Journal Challenge8/20/2014.
1..
Graphs, Planar graphs Graph coloring
Adding Up In Chunks.
Discrete Mathematics Dr.-Ing. Erwin Sitompul
MaK_Full ahead loaded 1 Alarm Page Directory (F11)
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt Synthetic.
: 3 00.
5 minutes.
1 hi at no doifpi me be go we of at be do go hi if me no of pi we Inorder Traversal Inorder traversal. n Visit the left subtree. n Visit the node. n Visit.
1 Let’s Recapitulate. 2 Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
Abdollah Khodkar Department of Mathematics University of West Georgia Joint work with Arezoo N. Ghameshlou, University of Tehran.
Speak Up for Safety Dr. Susan Strauss Harassment & Bullying Consultant November 9, 2012.
Essential Cell Biology
Converting a Fraction to %
Clock will move after 1 minute
PSSA Preparation.
Immunobiology: The Immune System in Health & Disease Sixth Edition
Physics for Scientists & Engineers, 3rd Edition
Energy Generation in Mitochondria and Chlorplasts
Select a time to count down from the clock above
Completing the Square Topic
Copyright Tim Morris/St Stephen's School
9. Two Functions of Two Random Variables
1 Decidability continued…. 2 Theorem: For a recursively enumerable language it is undecidable to determine whether is finite Proof: We will reduce the.
Based on slides by Y. Peng University of Maryland
Bioinformatics Programming 1 EE, NCKU Tien-Hao Chang (Darby Chang)
Graph-02.
1 Section 8.4 Connectivity. 2 Paths In an undirected graph, a path of length n from u to v, where n is a positive integer, is a sequence of edges e 1,
Based on slides by Y. Peng University of Maryland
رياضيات متقطعة لعلوم الحاسب MATH 226. Chapter 10.
Applied Discrete Mathematics Week 13: Graphs
Based on slides by Y. Peng University of Maryland
Presentation transcript:

Graphs, representation, isomorphism, connectivity Discrete Math Graphs, representation, isomorphism, connectivity 1

Adjacent The vertices u and v in a undirected graph are adjacent when there are endpoints of an edge of G represented by the un ordered pair (u,v) When the initial vertex u and final vertex v in a directed graph are endpoints of the edge represented by the ordered pair (u,v), then u is adjacent to v and v is adjacent from u

Representation Consider a graph with no multiple edges. (NOTE: For directed graphs the pairs (u,v) and (v,u) are not multiple edges) The graph can be represented by a list of all the edges that are part of the graph The graph can be represented by an adjacency list The graph can be represented by an adjacency matrix.

Adjacency List: undirected vertex Adjacent vertices a c b a, b, d d c, e, f e d, e, f f d, e a c e c d d b f f e

Adjacency Matrix The Adjacency matrix A of a graph G=(V,E), with respect to the set of edges V, where V does not include multiple edges is The graph has at most one edge If the graph is not directed is an unordered pair If the graph is directed is a ordered pair

Adjacency Matrix a c e d b f Adjacency matrix element amk is 1 if there is an edge between node number m and number k, and 0 otherwise

Adjacency List: directed Initial vertex Terminal vertices a b, c, g b c d, e d e, g e c, e, g, f f - g d, f a c e c d d b f f e g d

Adjacency Matrix a c e d b f g Adjacency matrix element amk is 1 if there is an edge from node number m to node number k, and 0 otherwise

Observations The adjacency matrix of an undirected graph is symmetric The adjacency list will be more useful in a sparse graph with few edges The adjacency matrix will be most useful in a dense graph with many edges

What about multiple edges? How do we generalize these representations to include graphs with multiple edges between the same vertices Multiple edges for an undirected graph means two or more edges between the same pair of nodes Multiple edges for a directed graph means two or more edges between the same ordered pair of nodes. That is multiple edges in the same direction between the same pair of nodes

Adjacency Matrix The Adjacency matrix A of a graph G=(V,E), with respect to the set of edges V, where V does include multiple edges is

Adjacency Matrix a c e d b f Adjacency matrix element amk is 1 if there is an edge between node number m and number k, and 0 otherwise

Adjacency Matrix a c e d b f g Adjacency matrix element amk is 1 if there is an edge from node number m to node number k, and 0 otherwise

Incidence matrices Let G=(V,E) be an undirected graph, an incidence matrix representing G has one row for each vertex v1, v2, … , vn in V and one column for each edge e1, e2, …, em in E.

Incidence Matrix e1, e2 a c e10 e e11 e4 e9 d e3 b e5,e6 e7, e8 f Incidence matrix element amk is 1 if there is an edge ek is incident with node number m and node number k, and 0 otherwise

Incidence matrices Let G=(V,E) be an directed graph, an incidence matrix representing G has one row for each vertex v1, v2, … , vn in V and one column for each edge e1, e2, …, em in E.

Incidence Matrix a c e8 e e1 e7 e9, d e4 e10 e11 e5, e6 e2, e3 f b Adjacency matrix element amk is 1 if there is an edge from node number m to node number k, and 0 otherwise

Isomorphism Two simple graphs G1=(V,E) and G2=(W,F) are isomorphic if there is a oneto one and onto function f from V to W with the property that if a and b are adjacent in G1 iff f(a) and f(b) are adjacent in G2, for all a and b in V. Such a function f is called an isomorphism

Isomorphic graphs When two graphs are isomorphic then they have the same number of vertices the same number of edges the same number of vertices or any degree n These properties are called graph invariants and are identical for two graphs that are isomorphic. If any of these invariants changes between the two graphs, the two graphs are not isomorphic. However, if these graph invariants are all identical it does not imply the graphs are isomorphic

Graphs A and B b1 b2 b3 a1 a2 a3 b4 b5 a4 a5

Are A and B isomorphic? They both have the same number of vertices They both have the same number of edges They both have 3 vertices of degree 2, and 2 vertices of degree 3 The graphs may be isomorphic, to prove they are we need to find an isomorphism However, in graph a there are no two nodes of degree 2 that are adjacent to each other, in graph b there are two nodes of degree 2 that are adjacent. Therefore, the two graphs are not isomorphic

Graphs A and B b1 b2 b3 a1 a2 a3 b4 b5 a4 a5

Are A and B isomorphic? They both have the same number of vertices They both have the same number of edges They both have two vertices of degree 2, two vertices of degree 3 and 1 vertex of degree 4 The graphs may be isomorphic, to prove they are we need to find an isomorphism

Isomorphism Since an isomorphism preserves adjacency, If n vertices are adjacent to a given vertex in a graph, then the images of those n vertices must be adjacent to the image of the vertex in the isomorphic graph. Therefore, the order of the nodes should be preserved by the isomorphism.

Graphs A and B b1 b2 b3 a1 a2 a3 b4 b5 a4 a5

Isomorphism (2) There is only one node that is adjacent to 4 other nodes ( degree 4) so the image of that node must be the node in graph B which has degree 4. So F(a1) = b2 a1 is adjacent to 2 nodes of degree 3 (a2 and a3). The images of these nodes must be the nodes in B which have degree 3 (b4 and b5). Both are adjacent to b2

Isomorphism (3) We have two possible ways to choose to assign the isomorphism between these points. Since both ways preserve adjacency a2 and a3 are adjacent, b4 and b5 are adjacent a2 and a3 are both adjacent to a1, b4 and b5 are both adjacent to b2 a2 and a3 are both adjacent to a node of degree 2, that is adjacent to a1, b4 and b5 are both adjacent to a node of degree 2 that is adjacent to b2

Isomorphism (4) we will randomly choose one, if it does not work we will return and try the other. F(a2) = b5 F(a3) = b4

Graphs A and B b1 b2 b3 a1 a2 a3 b4 b5 a4 a5

Isomorphism (5) F(a1)= b2 F(a2) = b5 F(a3) = b4 A4 is adjacent to both a3 and a1, so its image must be adjacent to b4 and b2. A5 is adjacent to both a2 and a1 so its image must be adjacent to b5 and b4 F(a4) = b1, F(a5) = b3

Isomorphic Graphs A and B

Paths: undirected graphs Let n be a nonnegative integer and G an undirected graph. A path of length n from u to v in G is a sequence of n edges e1, e2, … , en of G such that e1 is (u, x1), e2 is (x1,x2), and en is (xn-1, v). When the graph is simple we denote the path by the vertex sequence u, x1, x2, … , xn-1, v. A circuit is a path with n>0 which starts and ends at the same vertex The path or circuit passes through these vertices and traverses the edges A path or circuit is simple if it does not traverse the same edge more than once

Paths: directed graphs Let n be a nonnegative integer and G a directed graph. A path of length n from u to v in G is a sequence of n edges e1, e2, … , en of G such that e1 is (u, x1), e2 is (x1,x2), and en is (xn-1, v). When there are no multiple edges we denote the path by the vertex sequence u, x1, x2, … , xn-1, v. A circuit is a path with n>0 which starts and ends at the same vertex The path or circuit passes through these vertices and traverses the edges A path or circuit is simple if it does not traverse the same edge more than once

Alternate terms A walk is an alternating sequence of vertices and edges starting at vertex u and ending at vertex v A circuit may be called a closed walk S simple circuit may be called a trail If a reference is using walk, closed walk and trail, it may use path do describe a trail with no repeated vertices

Connected An undirected graph is called connected if there is a path between every pair of distinct vertices of the graph.

Connectedness: directed graphs A directed graph is strongly connected if there is a path from a to b and from b to a whenever a and b are nodes in the directed graph A directed graph is weakly connected if there is a path between each of the vertices in the underlying undirected graph

Connected? Is this undirected graph connected? NO

Connected? Is this undirected graph connected? The green vertex is an isolated vertex. There is no path connecting it to any other vertex. The graph cannot be connected. The red vertex is a pendant vertex. It is connected to the graph by only a single edge

Connected? Is this undirected graph connected? YES

Strongly Connected? Is this undirected graph strongly connected? NO

Weakly Connected? Is this undirected graph strongly connected?

Underlying undirected graph Is this underlying undirected graph connected? YES: so the digraph is weakly connected

Strongly Connected? Is this undirected graph connected? YES

Subgraph Recall A subgraph of a graph G=(V,E) is a graph H=(W,F) when W⊆V and F⊆E. A subgraph H of G is a proper subgraph of G if H=G

Connected component A maximal connected subgraph is a subgraph such that there are no nodes and edges in the original graph that could be added to the subgraph and still leave it connected. A connected component of a graph G is a connected subgraph of G that is not a proper subgraph of another connected subgraph of G. That is, it is a maximal connected subgraph of G

Connected components?

Cut Edges When removing a vertex, increases the number of connected components in the graph then the vertex (that was removed) is called a cut vertex or articulation point Let v be a vertex in a graph G=(V,E). The subgraph of G denoted G-v has the vertex set V1=V-v and the edges E1⊆E where E1 contains all edges in E except for those that are incident with (out from, in to) the vertex v

Find a cut vertex

With cut vertex removed

Cut Edges When removing a edge, increases the number of connected components in the graph then the edge (that was removed) is called a cut edge or bridge Let e be an edge in a graph G=(V,E). The subgraph of G denoted G-e has the same vertex set V and the edges E1=E-e

Find a cut edge

With a cut edge removed

Paths and Isomorphism The existance of a circuit of a particular length within a graph is an isomorphic invariant. If a graph G has a circuit of length n from node v to node v then any graph that is isomorphic to G must also have a circuit of length n from F(v) to F(v)