Section 10.4 Connectivity (up to paths and isomorphism, not including)

Similar documents
Paths. Connectivity. Euler and Hamilton Paths. Planar graphs.

Graphs. CSC 1300 Discrete Structures Villanova University. Villanova CSC Dr Papalaskari

Graphs. Graphs. Graphs: Basic Terminology. Directed Graphs. Dr Papalaskari 1

V={A,B,C,D,E} E={ (A,D),(A,E),(B,D), (B,E),(C,D),(C,E)}

12/3/12. Outline. Part 10. Graphs. Circuits. Euler paths/circuits. Euler s bridge problem (Bridges of Konigsberg Problem)

5/9/13. Part 10. Graphs. Outline. Circuits. Introduction Terminology Implementing Graphs

V={A,B,C,D,E} E={ (A,D),(A,E),(B,D), (B,E),(C,D),(C,E)}

An undirected graph G = (V, E) V a set of vertices E a set of unordered edges (v,w) where v, w in V

CS200: Graphs. Graphs. Directed Graphs. Graphs/Networks Around Us. What can this represent? Sometimes we want to represent directionality:

CSE 373: More on graphs; DFS and BFS. Michael Lee Wednesday, Feb 14, 2018

Graph Isomorphism. Graphs - II. Cayley s Formula. Planar Graphs. Outline. Is K 5 planar? The number of labeled trees on n nodes is n n-2

Math 61 : Discrete Structures Final Exam Instructor: Ciprian Manolescu. You have 180 minutes.

CS 241 Analysis of Algorithms

Outline. Circuits. Euler paths/circuits 4/25/12. Part 10. Graphs. Euler s bridge problem (Bridges of Konigsberg Problem)

Module graph.py. 1 Introduction. 2 Graph basics. 3 Module graph.py. 3.1 Objects. CS 231 Naomi Nishimura

CS 461, Lecture 17. Today s Outline. Example Run

The University of Sydney MATH2969/2069. Graph Theory Tutorial 5 (Week 12) Solutions 2008

1. Determine whether or not the following binary relations are equivalence relations. Be sure to justify your answers.

CSC Design and Analysis of Algorithms. Example: Change-Making Problem

b. How many ternary words of length 23 with eight 0 s, nine 1 s and six 2 s?

CSE 373. Graphs 1: Concepts, Depth/Breadth-First Search reading: Weiss Ch. 9. slides created by Marty Stepp

Garnir Polynomial and their Properties

CS61B Lecture #33. Administrivia: Autograder will run this evening. Today s Readings: Graph Structures: DSIJ, Chapter 12

Why the Junction Tree Algorithm? The Junction Tree Algorithm. Clique Potential Representation. Overview. Chris Williams 1.

Algorithmic and NP-Completeness Aspects of a Total Lict Domination Number of a Graph

Numbering Boundary Nodes

Chapter 9. Graphs. 9.1 Graphs

Planar Upward Drawings

Cycles and Simple Cycles. Paths and Simple Paths. Trees. Problem: There is No Completely Standard Terminology!

Outline. 1 Introduction. 2 Min-Cost Spanning Trees. 4 Example

Constructive Geometric Constraint Solving

0.1. Exercise 1: the distances between four points in a graph

1 Introduction to Modulo 7 Arithmetic

Graph Theory. Vertices. Vertices are also known as nodes, points and (in social networks) as actors, agents or players.

Exam 1 Solution. CS 542 Advanced Data Structures and Algorithms 2/14/2013

(2) If we multiplied a row of B by λ, then the value is also multiplied by λ(here lambda could be 0). namely

Weighted graphs -- reminder. Data Structures LECTURE 15. Shortest paths algorithms. Example: weighted graph. Two basic properties of shortest paths

, each of which is a tree, and whose roots r 1. , respectively, are children of r. Data Structures & File Management

N=4 L=4. Our first non-linear data structure! A graph G consists of two sets G = {V, E} A set of V vertices, or nodes f

Present state Next state Q + M N

Outline. Computer Science 331. Computation of Min-Cost Spanning Trees. Costs of Spanning Trees in Weighted Graphs

12. Traffic engineering

5/7/13. Part 10. Graphs. Theorem Theorem Graphs Describing Precedence. Outline. Theorem 10-1: The Handshaking Theorem

More Foundations. Undirected Graphs. Degree. A Theorem. Graphs, Products, & Relations

COMP108 Algorithmic Foundations

Solutions for HW11. Exercise 34. (a) Use the recurrence relation t(g) = t(g e) + t(g/e) to count the number of spanning trees of v 1

COMPLEXITY OF COUNTING PLANAR TILINGS BY TWO BARS

Trees as operads. Lecture A formalism of trees

CSE 373: AVL trees. Warmup: Warmup. Interlude: Exploring the balance invariant. AVL Trees: Invariants. AVL tree invariants review

This chapter covers special properties of planar graphs.

QUESTIONS BEGIN HERE!

Announcements. Not graphs. These are Graphs. Applications of Graphs. Graph Definitions. Graphs & Graph Algorithms. A6 released today: Risk

ECE COMBINATIONAL BUILDING BLOCKS - INVEST 13 DECODERS AND ENCODERS

CS September 2018

ECE 407 Computer Aided Design for Electronic Systems. Circuit Modeling and Basic Graph Concepts/Algorithms. Instructor: Maria K. Michael.

Counting Paths Between Vertices. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs

MAT3707. Tutorial letter 201/1/2017 DISCRETE MATHEMATICS: COMBINATORICS. Semester 1. Department of Mathematical Sciences MAT3707/201/1/2017

Register Allocation. Register Allocation. Principle Phases. Principle Phases. Example: Build. Spills 11/14/2012

learning objectives learn what graphs are in mathematical terms learn how to represent graphs in computers learn about typical graph algorithms

QUESTIONS BEGIN HERE!

Solutions to Homework 5

Solutions for HW9. Bipartite: put the red vertices in V 1 and the black in V 2. Not bipartite!

Graph Contraction and Connectivity

NP-Completeness. CS3230 (Algorithm) Traveling Salesperson Problem. What s the Big Deal? Given a Problem. What s the Big Deal? What s the Big Deal?

Seven-Segment Display Driver

Page 1. Question 19.1b Electric Charge II Question 19.2a Conductors I. ConcepTest Clicker Questions Chapter 19. Physics, 4 th Edition James S.

CSE303 - Introduction to the Theory of Computing Sample Solutions for Exercises on Finite Automata

Grade 7/8 Math Circles March 4/5, Graph Theory I- Solutions

Problem solving by search

Walk Like a Mathematician Learning Task:

Similarity Search. The Binary Branch Distance. Nikolaus Augsten.

EE1000 Project 4 Digital Volt Meter

# 1 ' 10 ' 100. Decimal point = 4 hundred. = 6 tens (or sixty) = 5 ones (or five) = 2 tenths. = 7 hundredths.

Announcements. These are Graphs. This is not a Graph. Graph Definitions. Applications of Graphs. Graphs & Graph Algorithms

Chapter 18. Minimum Spanning Trees Minimum Spanning Trees. a d. a d. a d. f c

CMSC 451: Lecture 2 Graph Basics Thursday, Aug 31, 2017

Complete Solutions for MATH 3012 Quiz 2, October 25, 2011, WTT

Integration Continued. Integration by Parts Solving Definite Integrals: Area Under a Curve Improper Integrals

Register Allocation. How to assign variables to finitely many registers? What to do when it can t be done? How to do so efficiently?

Plan. I Gale-Shapley Running Time. I Graphs. I Motivation and definitions I Graph traversal: BFS and DFS

Using the Printable Sticker Function. Using the Edit Screen. Computer. Tablet. ScanNCutCanvas

Computational Biology, Phylogenetic Trees. Consensus methods

Scientific Programming. Graphs

(a) v 1. v a. v i. v s. (b)

Graph Theory. Simple Graph G = (V, E). V={a,b,c,d,e,f,g,h,k} E={(a,b),(a,g),( a,h),(a,k),(b,c),(b,k),...,(h,k)}

a b c cat CAT A B C Aa Bb Cc cat cat Lesson 1 (Part 1) Verbal lesson: Capital Letters Make The Same Sound Lesson 1 (Part 1) continued...

Section 3: Antiderivatives of Formulas

Quartets and unrooted level-k networks

Analysis for Balloon Modeling Structure based on Graph Theory

Minimum Spanning Trees

MULTIPLE-LEVEL LOGIC OPTIMIZATION II

Greedy Algorithms, Activity Selection, Minimum Spanning Trees Scribes: Logan Short (2015), Virginia Date: May 18, 2016

Last time: introduced our first computational model the DFA.

A Simple Code Generator. Code generation Algorithm. Register and Address Descriptors. Example 3/31/2008. Code Generation

Discovering Pairwise Compatibility Graphs

S i m p l i f y i n g A l g e b r a SIMPLIFYING ALGEBRA.

CIT 596 Theory of Computation 1. Graphs and Digraphs

Discovering Frequent Graph Patterns Using Disjoint Paths

Round 7: Graphs (part I)

The University of Sydney MATH 2009

Transcription:

Toy w will isuss two stions: Stion 10.3 Rprsnting Grphs n Grph Isomorphism Stion 10.4 Conntivity (up to pths n isomorphism, not inluing) 1

10.3 Rprsnting Grphs n Grph Isomorphism Whn w r working on n lgorithm for grphs, it is inonvnint to gt th grphs s piturs. Thrfor, thr r svrl wys to rprsnt grphs so tht thy oul sily pross. 2

10.3 Rprsnting Grphs n Grph Isomorphism Anothr issu: th sm grph n rwn iffrntly. G 1 = (V 1,E 1 ) G 2 = (V 2,E 2 ) grphs G 1 n G 2 hv th sm vrtis n th sm gs: V 1 = V 2, E 1 = E 2 In suh s w sy tht th grphs r isomorphi. Grph rprsnttion(s) n hlp us with it. 3

10.3 Rprsnting Grphs n Grph Isomorphism Ajny list rprsnttion: - spify vrtis tht r jnt to h vrtx in th grph G = (V,E) An jny list for simpl grph G Vrtx Ajnt vrtis 4

10.3 Rprsnting Grphs n Grph Isomorphism Ajny list rprsnttion: - spify vrtis tht r jnt to h vrtx in th grph G = (V,E) An jny list for simpl grph G Vrtx, Ajnt vrtis 5

10.3 Rprsnting Grphs n Grph Isomorphism Ajny list rprsnttion: - spify vrtis tht r jnt to h vrtx in th grph G = (V,E) An jny list for simpl grph G Vrtx,,, Ajnt vrtis 6

10.3 Rprsnting Grphs n Grph Isomorphism Ajny list rprsnttion: - spify vrtis tht r jnt to h vrtx in th grph G = (V,E) An jny list for simpl grph G Vrtx,,,, Ajnt vrtis 7

10.3 Rprsnting Grphs n Grph Isomorphism Ajny list rprsnttion: - spify vrtis tht r jnt to h vrtx in th grph G = (V,E) An jny list for simpl grph G Vrtx,,,,,,, Ajnt vrtis 8

10.3 Rprsnting Grphs n Grph Isomorphism Ajny list rprsnttion: - spify vrtis tht r jnt to h vrtx in th grph G = (V,E) An jny list for simpl grph G Vrtx,,,,,,,,, Ajnt vrtis 9

10.3 Rprsnting Grphs n Grph Isomorphism Ajny list rprsnttion: - spify vrtis tht r jnt to h vrtx in th grph G = (V,E) An jny list for simpl grph G Vrtx,,,,,,,,, Ajnt vrtis An jny list for simpl grph G 10

10.3 Rprsnting Grphs n Grph Isomorphism Ajny list rprsnttion: - spify vrtis tht r jnt to h vrtx in th grph G = (V,E) Lt's tlk out tim it tks to rt th jny list n to lot n lmnt in it. An jny list for simpl grph G 11

10.3 Rprsnting Grphs n Grph Isomorphism Ajny list rprsnttion: - spify vrtis tht r jnt to h vrtx in th grph G = (V,E) th tim rquir to list th nighors of vrtx v is proportionl to g(v), th numr of vrtis to list. Thrfor, th totl tim will proportionl to g(v) v V An jny list for simpl grph G 12

10.3 Rprsnting Grphs n Grph Isomorphism Ajny list rprsnttion: - spify vrtis tht r jnt to h vrtx in th grph G = (V,E) th tim rquir to list th nighors of vrtx v is proportionl to g(v), th numr of vrtis to list. g(v) v V to trmin if {, } is n g, it is nough to sn th list of 's nighors or th list of 's nighors. In th worst s, th tim rquir is proportionl to th min( g(),g()). An jny list for simpl grph G 13

10.3 Rprsnting Grphs n Grph Isomorphism Ajny list rprsnttion: For irt grphs it is similr An jny list for irt grph G Vrtx Ajnt vrtis G = (V,E) 14

10.3 Rprsnting Grphs n Grph Isomorphism Ajny list rprsnttion: For irt grphs it is similr An jny list for irt grph G Vrtx,,,,,, Ajnt vrtis G = (V,E) 15

10.3 Rprsnting Grphs n Grph Isomorphism Ajny list rprsnttion: For irt grphs it is similr An jny list for irt grph G Vrtx,,,,,, Ajnt vrtis G = (V,E) An jny list for simpl grph G 16

10.3 Rprsnting Grphs n Grph Isomorphism Ajny mtrix rprsnttion: - using zro-on mtris 1, if {v - ij = i,v j } E 0, othrwis - vrtis shoul orr - ij = 1, if (v i,v j ) E 0, othrwis 17

10.3 Rprsnting Grphs n Grph Isomorphism Ajny mtrix rprsnttion: - using zro-on mtris 1, if {v - ij = i,v j } E 0, othrwis - ij = 1, if (v i,v j ) E 0, othrwis - vrtis shoul orr 0 1 0 1 0 1 1 0 1 1 0 0 0 0 1 1 0 1 0 1 0 1 0 0 0 G = (V,E) jny mtrix rprsnttion of th grph G 18

10.3 Rprsnting Grphs n Grph Isomorphism pg 676 / 25 Prti Is vry zro-on squr mtrix tht is symmtri n hs zros on th igonl h jny mtrix of simpl grph? 19

10.3 Rprsnting Grphs n Grph Isomorphism Grphs with multipl gs: - using zro-on mtris #of gs {v - ij = i,v j }, if {v i,v j } E 0, othrwis similrly for irt grphs - vrtis shoul orr 0 2 0 1 0 1 1 0 1 1 0 0 0 0 1 1 0 3 0 3 0 1 0 0 0 G = (V,E) jny mtrix rprsnttion of th grph G 20

10.3 Rprsnting Grphs n Grph Isomorphism Whn to us jny lists/mtris? 21

10.3 Rprsnting Grphs n Grph Isomorphism Whn to us jny lists/mtris? For sprs grphs, tht ontin rltivly fw gs, jny lists r prfrr. For ns grphs, tht ontin mor thn hlf of ll possil gs, jny mtris r prfrr. 22

10.3 Rprsnting Grphs n Grph Isomorphism Whn to us jny lists/mtris? For sprs grphs, tht ontin rltivly fw gs, jny lists r prfrr. For ns grphs, tht ontin mor thn hlf of ll possil gs, jny mtris r prfrr. Som things to onsir: mtris ontin V 2 ntris (for ny typ of grph) jny lists us lss sp (for sprs grphs) 23

10.3 Rprsnting Grphs n Grph Isomorphism Whn to us jny lists/mtris? For sprs grphs, tht ontin rltivly fw gs, jny lists r prfrr. For ns grphs, tht ontin mor thn hlf of ll possil gs, jny mtris r prfrr. Som things to onsir: mtris ontin V 2 ntris (for ny typ of grph) jny lists us lss sp (for sprs grphs) To trmin whthr vrtx v i is jnt to v j : Mtris: just xmin ij ntry Lists: n rquir up to C V, C Z+ omprisons 24

10.3 Rprsnting Grphs n Grph Isomorphism Inin mtris is nothr ommon wy to rprsnt unirt grphs. Inin mtris n us to rprsnt unirt grphs with multipl gs. For vrtis v 1,...v n n gs 1,..., m, th inin mtrix with rspt of orring V n E is n m mtrix M = [m ij ], whr m ij = 1 whn g j is inint with v i, 0 othrwis 25

10.3 Rprsnting Grphs n Grph Isomorphism Inin mtris Exmpl:rprsnt th givn grph with inint mtrix 26

10.3 Rprsnting Grphs n Grph Isomorphism Inin mtris Exmpl:rprsnt th givn grph with inint mtrix vrtis orr: 1 5 9 4 10,,,, 2 6 7 3 8 1 2 3 4 5 6 7 8 9 10 27

10.3 Rprsnting Grphs n Grph Isomorphism Inin mtris Exmpl:rprsnt th givn grph with inint mtrix vrtis orr: 1 5 9 4 10,,,, 2 6 7 3 8 1 2 3 4 5 6 7 8 9 10 1 1 1 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 0 0 0 1 0 0 0 0 1 1 1 0 0 0 1 1 1 1 1 0 0 28

10.3 Rprsnting Grphs n Grph Isomorphism Inin mtris Exmpl:rprsnt th givn grph with inint mtrix vrtis orr: 1 5 9 4 10,,,, 2 6 7 3 8 1 2 3 4 5 6 7 8 9 10 1 1 1 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 0 0 0 1 0 0 0 0 1 1 1 0 0 0 1 1 1 1 1 0 0 loops r olumns with xtly on ntry qul to 1 29

10.3 Rprsnting Grphs n Grph Isomorphism Inin mtris Exmpl:rprsnt th givn grph with inint mtrix vrtis orr: 1 5 9 4 10,,,, 2 6 7 3 8 1 2 3 4 5 6 7 8 9 10 1 1 1 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 0 0 0 1 0 0 0 0 1 1 1 0 0 0 1 1 1 1 1 0 0 multipl gs r olumns with intil ntris 30

10.3 Rprsnting Grphs n Grph Isomorphism Pg 676 / 30 Prti Wht is th sum of th ntris in row of th inin mtrix for n unirt grph? 31

10.3 Rprsnting Grphs n Grph Isomorphism Isomorphism of Grphs Lt G = (V, E) n G'=(V',E') simpl grphs. G n G' r isomorphi if thr is ijtion f: V V' suh tht for vry pir of vrtis x, y V, {x, y} E if n only if {f(x), f(y)} E'. Th funtion f is ll n isomorphism from G to G'. Two simpl grphs tht r not isomorphi r ll nonisomorphi. 32

10.3 Rprsnting Grphs n Grph Isomorphism Isomorphism of Grphs Lt G = (V, E) n G'=(V',E') simpl grphs. G n G' r isomorphi if thr is ijtion f: V V' suh tht for vry pir of vrtis x, y V, {x, y} E if n only if {f(x), f(y)} E'. Th funtion f is ll n isomorphism from G to G'. Two simpl grphs tht r not isomorphi r ll nonisomorphi. 3 4 1 2 G 1 = (V 1,E 1 ) G 2 = (V 2,E 2 ) 33

10.3 Rprsnting Grphs n Grph Isomorphism Isomorphism of Grphs Lt G = (V, E) n G'=(V',E') simpl grphs. G n G' r isomorphi if thr is ijtion f: V V' suh tht for vry pir of vrtis x, y V, {x, y} E if n only if {f(x), f(y)} E'. Th funtion f is ll n isomorphism from G to G'. Two simpl grphs tht r not isomorphi r ll nonisomorphi. f: V 1 V 2 3 4 2 1 1 4 2 G 1 = (V 1,E 1 ) 3 G 2 = (V 2,E 2 ) 34

10.3 Rprsnting Grphs n Grph Isomorphism Isomorphism of Grphs Lt G = (V, E) n G'=(V',E') simpl grphs. G n G' r isomorphi if thr is ijtion f: V V' suh tht for vry pir of vrtis x, y V, {x, y} E if n only if {f(x), f(y)} E'. Th funtion f is ll n isomorphism from G to G'. Two simpl grphs tht r not isomorphi r ll nonisomorphi. f: V 1 V 2 3 4 2 1 1 4 2 G 1 = (V 1,E 1 ) 3 G 2 = (V 2,E 2 ) 35

10.3 Rprsnting Grphs n Grph Isomorphism Isomorphism of Grphs Lt G = (V, E) n G'=(V',E') simpl grphs. G n G' r isomorphi if thr is ijtion f: V V' suh tht for vry pir of vrtis x, y V, {x, y} E if n only if {f(x), f(y)} E'. Th funtion f is ll n isomorphism from G to G'. Two simpl grphs tht r not isomorphi r ll nonisomorphi. f: V 1 V 2 3 4 2 1 1 4 2 G 1 = (V 1,E 1 ) 3 G 2 = (V 2,E 2 ) G 1 n G 2 r isomorphi 36

10.3 Rprsnting Grphs n Grph Isomorphism How to hk tht two grphs r isomorphi? To show tht funtion f :V 1 V 2 is n isomorphism w n to show tht f prsrvs th prsn n th sn of gs. On wy to o it: jny mtris 37

10.3 Rprsnting Grphs n Grph Isomorphism How to hk tht two grphs r isomorphi? To show tht funtion f :V 1 V 2 is n isomorphism w n to show tht f prsrvs th prsn n th sn of gs. On wy to o it: jny mtris G 1 = (V 1,E 1 ) f: V 1 V 2 2 1 4 3 1 3 4 2 G 2 = (V 2,E 2 ) 38

10.3 Rprsnting Grphs n Grph Isomorphism How to hk tht two grphs r isomorphi? To show tht funtion f :V 1 V 2 is n isomorphism w n to show tht f prsrvs th prsn n th sn of gs. On wy to o it: jny mtris G 1 = (V 1,E 1 ) 0 1 1 0 1 0 0 1 1 0 0 0 0 1 0 0 f: V 1 V 2 2 1 4 3 1 3 4 2 G 2 = (V 2,E 2 ) 39

10.3 Rprsnting Grphs n Grph Isomorphism How to hk tht two grphs r isomorphi? To show tht funtion f :V 1 V 2 is n isomorphism w n to show tht f prsrvs th prsn n th sn of gs. On wy to o it: jny mtris G 1 = (V 1,E 1 ) 0 1 1 0 1 0 0 1 1 0 0 0 0 1 0 0 f: V 1 V 2 2 1 4 3 Mtris r qul 1 3 4 2 G 2 = (V 2,E 2 ) 2 1 4 3 0 1 1 0 1 0 0 1 1 0 0 0 0 1 0 0 40

10.3 Rprsnting Grphs n Grph Isomorphism How to hk tht two grphs r isomorphi? To show tht funtion f :V 1 V 2 is n isomorphism w n to show tht f prsrvs th prsn n th sn of gs. On wy to o it: jny mtris G 1 = (V 1,E 1 ) 0 1 1 0 1 0 0 1 1 0 0 0 0 1 0 0 f: V 1 V 2 2 1 4 3 1 3 4 2 G 2 = (V 2,E 2 ) 2 1 4 3 0 1 1 0 1 0 0 1 1 0 0 0 0 1 0 0 41

10.3 Rprsnting Grphs n Grph Isomorphism How to hk tht two grphs r isomorphi? To show tht funtion f :V 1 V 2 is n isomorphism w n to show tht f prsrvs th prsn n th sn of gs. On wy to o it: jny mtris Drwk: if th givn funtion is not n isomorphism, it osn't gurnt tht two grphs r not isomorphi. Thr might nothr orrsponn of th vrtis in grphs tht is n isomorphism. 42

10.3 Rprsnting Grphs n Grph Isomorphism How to hk tht two grphs r isomorphi? To show tht funtion f :V 1 V 2 is n isomorphism w n to show tht f prsrvs th prsn n th sn of gs. On wy to o it: jny mtris Drwk: if th givn funtion is not n isomorphism, it osn't gurnt tht two grphs r not isomorphi. Thr might nothr orrsponn of th vrtis in grphs tht is n isomorphism. Th st lgorithms known for trmining whthr two grphs r isomorphi hv xponntil worst-s tim omplxity (in V ). W wnt polynomil on. 43

10.3 Rprsnting Grphs n Grph Isomorphism How to hk tht two grphs r isomorphi? If w r not givn orrsponn (funtion f) to hk, thn thr r V! possil ijtions (on-toon orrsponns) to hk, whih is imprtil for lrg V. Lt V = n v 1 n options v 2 (n-1) options v n 1 option Thrfor, w gt n (n-1) (n-2)... 1 = n! 44

10.3 Rprsnting Grphs n Grph Isomorphism How to hk tht two grphs r isomorphi? Somtims, it is sy to s tht two grphs r not isomorphi: hk th numr of vrtis n th numr of gs, thy shoul qul oringly. V 1 = V 2 E 1 = E 2 Also, th grs of vrtis in isomorphi grphs must th sm. grph invrint is proprty prsrv y isomorphism. Proprtis ov r grph invrints. 45

10.3 Rprsnting Grphs n Grph Isomorphism How to hk tht two grphs r isomorphi? Somtims, it is sy to s tht two grphs r not isomorphi: hk th numr of vrtis n th numr of gs, thy shoul qul oringly. V 1 = V 2 E 1 = E 2 th grs of vrtis in isomorphi grphs must th sm. 5 4 1 2 G 1 = (V 1,E 1 ) G 2 = (V 2,E 2 ) 3 46

10.3 Rprsnting Grphs n Grph Isomorphism How to hk tht two grphs r isomorphi? Somtims, it is sy to s tht two grphs r not isomorphi: hk th numr of vrtis n th numr of gs, thy shoul qul oringly. V 1 = V 2 E 1 = E 2 th grs of vrtis in isomorphi grphs must th sm. 5 4 1 2 G 1 = (V 1,E 1 ) G 2 = (V 2,E 2 ) 3 grphs r not isomorphi, us E 1 = 6, E 2 = 7 47

10.3 Rprsnting Grphs n Grph Isomorphism pg 677 / 57() Prti Ar th simpl grphs with th following jny mtris isomorphi? 0 1 1 0 1 0 0 1 1 0 0 1 0 1 1 0 0 1 0 1 1 0 0 0 0 0 0 1 1 0 1 0 48

10.3 Rprsnting Grphs n Grph Isomorphism pg 677 / 45 Prti Show tht isomorphism of simpl grphs is n quivln rltionship. (rll tht quivln rltion if it is rflxiv, symmtri n trnsitiv.) 49

10.3 Rprsnting Grphs n Grph Isomorphism Applitions of grph isomorphisms Chmistry: To mol hmil ompouns hmists us multigrphs, known s molulr grphs. vrtis: toms gs: hmil ouns twn th toms Two struturl isomrs, moluls with intil molulr formuls ut with toms on iffrntly, hv nonisomorphi molulr grphs. Whn potntilly nw hmil ompoun is synthsiz, ts of molulr grphs is hk to s whthr th molulr grph of th ompoun is th sm s on lry known. 50

10.3 Rprsnting Grphs n Grph Isomorphism Applitions of grph isomorphisms Eltril nginring: Eltroni iruits r mol using grphs whih vrtis: omponnts gs: onntions twn omponnts Morn intgrt iruits (hips) r minituriz ltroni iruits, oftn with millions of trnsistors n onntions twn thm. Automtion tools r us to sign hips us of th omplxity. Grph isomorphism is th sis for th vrifition tht prtiulr lyout of iruit prou y n utomt 51 tools orrspons to th originl shmtis of th sign.

10.3 Rprsnting Grphs n Grph Isomorphism Applitions of grph isomorphisms Eltril nginring: Eltroni iruits r mol using grphs whih vrtis: omponnts gs: onntions twn omponnts Morn intgrt iruits (hips) r minituriz ltroni iruits, oftn with millions of trnsistors n onntions twn thm. Automtion tools r us to sign hips us of th omplxity. Grph isomorphism n lso us to trmin whthr hip from on ompny inlus intlltul proprty from iffrnt vnor y looking for lrg isomorphi sugrphs in th grphs moling ths hips. 52

10.4 Conntivity A pth from u to v in n unirt grph G is squn of gs of G tht strts t vrtx u n ns t vrtx v: {u,v 1 }, {v 1,v 2 },..., {v n-1,v} A pth n lso not y th squn of vrtis u, v1,..., v whn th grph is simpl. 53

10.4 Conntivity A pth from u to v in n unirt grph G is squn of gs of G tht strts t vrtx u n ns t vrtx v: {u,v 1 }, {v 1,v 2 },..., {v n-1,v} A pth n lso not y th squn of vrtis u, v1,..., v whn th grph is simpl. Th lngth of pth is th numr of gs in th wlk. 54

10.4 Conntivity A pth from u to v in n unirt grph G is squn of gs of G tht strts t vrtx u n ns t vrtx v: {u,v 1 }, {v 1,v 2 },..., {v n-1,v} A pth n lso not y th squn of vrtis u, v1,..., v whn th grph is simpl. Th lngth of pth is th numr of gs in th wlk. Th pth is iruit if it gins n ns t th sm vrtx, i.. u = v, n hs lngth grtr thn zro. 55

10.4 Conntivity A pth from u to v in n unirt grph G is squn of gs of G tht strts t vrtx u n ns t vrtx v: {u,v 1 }, {v 1,v 2 },..., {v n-1,v} A pth n lso not y th squn of vrtis u, v1,..., v whn th grph is simpl. Th lngth of pth is th numr of gs in th wlk. Th pth is iruit if it gins n ns t th sm vrtx, i.. u = v, n hs lngth grtr thn zro. A pth / iruit is si to pss through th vrtis u, v 1, v 2,..., v n-1, v or trvrs th gs 1,, n. 56

10.4 Conntivity A pth from u to v in n unirt grph G is squn of gs of G tht strts t vrtx u n ns t vrtx v: {u,v 1 }, {v 1,v 2 },..., {v n-1,v} A pth n lso not y th squn of vrtis u, v1,..., v whn th grph is simpl. Th lngth of pth is th numr of gs in th wlk. Th pth is iruit if it gins n ns t th sm vrtx, i.. u = v, n hs lngth grtr thn zro. A pth / iruit is si to pss through th vrtis u, v 1, v 2,..., v n-1, v or trvrs th gs 1,, n. A pth or iruit is simpl if it osn't ontin th sm g mor thn on. 57

10.4 Conntivity A pth of lngth zro onsists of singl vrtx. Whn w o not istinguish twn multipl gs: w will not pth 1, 2,, n, whr i is ssoit with { x i-1,x i } for i = 1, 2,, n y its vrtx squn x 1, x 2,, x n not tht it is not uniqu pth pth:,,, pth:,,, 58

10.4 Conntivity A pth from u to v in irt grph G is squn of gs of G tht strts t vrtx u n ns t vrtx v: (u,v 1 ), (v 1,v 2 ),..., (v n-1,v) A pth n lso not y th squn of vrtis u, v1,..., v whn thr is no multipl gs. Th lngth of pth is th numr of gs in th wlk. f pth: (,f), (f,), (,), (,) or pth:, f,,, lngth of th pth: 4 59

10.4 Conntivity Th pth is iruit / yl if it gins n ns t th sm vrtx, i.. u = v, n hs lngth grtr thn zro. A pth / iruit is si to pss through th vrtis u, v 1, v 2,..., v n-1, v or trvrs th gs 1,, n. A pth or iruit is simpl if it osn't ontin th sm g mor thn on. f pth: (,f), (f,), (,), (,), (,), (,), (,) or pth:, f,,,,,, lngth of th pth: 7 60

10.4 Conntivity A pth of lngth zro onsists of singl vrtx. Whn w o not istinguish twn multipl gs: w will not pth 1, 2,, n, whr i is ssoit with { x i-1,x i } for i = 1, 2,, n y its vrtx squn x 1, x 2,, x n not tht it is not uniqu pth f pth:, f,,, f pth:, f,,, 61

10.4 Conntivity Mny prolms n mol with pths form y trvling long th gs of th grphs. Exmpls: - mssg xhng twn two omputrs - plnning ffiiny routs for livris, grg pikup, n so forth. 62

10.4 Conntivity Mor xmpls: Pths in quintnship grphs: Thr is pth twn two popl if thr is hin of popl linking thm. Mny soil sintists hv onjtur tht lmost vry pir of popl in th worl r link y smll hin of popl, prhps ontining just 5 or fwr popl. Th ply Six Dgrs of Sprtion, writtn y Amrin plywright John Gur tht prmir in 1990, xplors th xistntil prmis tht vryon in th worl is onnt to vryon ls in th worl y hin of no mor thn six quintns, thus, "six grs of 63 sprtion".

10.4 Conntivity Conntnss in unirt grphs: [Df] n unirt grph is onnt if thr is pth twn vry pir of istint vrtis of th grph. 64

10.4 Conntivity Conntnss in unirt grphs: [Df] n unirt grph is onnt if thr is pth twn vry pir of istint vrtis of th grph. An unirt grph whih is not onnt is ll isonnt. 65

10.4 Conntivity Conntnss in unirt grphs: [Df] n unirt grph is onnt if thr is pth twn vry pir of istint vrtis of th grph. An unirt grph whih is not onnt is ll isonnt. To isonnt grph: rmov vrtis or gs, or oth, to prou isonnt grph. 66

10.4 Conntivity Conntnss in unirt grphs: [Df] n unirt grph is onnt if thr is pth twn vry pir of istint vrtis of th grph. An unirt grph whih is not onnt is ll isonnt. To isonnt grph: rmov vrtis or gs, or oth, to prou isonnt grph. Exmpl: ny two omputrs in ntwork n ommunit if n only if th grph of this ntwork is onnt. 67

10.4 Conntivity Conntnss in unirt grphs: Exmpls: f onnt grph f isonnt grph 68

10.4 Conntivity Conntnss in unirt grphs: [Thorm] thr is simpl pth twn ny pir of istint vrtis of n unirt onnt grph. 69

10.4 Conntivity Conntnss in unirt grphs: [Thorm] thr is simpl pth twn ny pir of istint vrtis of n unirt onnt grph. Proof: Lt G = (V,E) unirt onnt grph,n lt u,v V. 70

10.4 Conntivity Conntnss in unirt grphs: [Thorm] thr is simpl pth twn ny pir of istint vrtis of n unirt onnt grph. Proof: Lt G = (V,E) unirt onnt grph,n lt u,v V. G is onnt, thrfor thr is t lst on pth twn u n v. Lt x 0 = u, x 1,, x n = v pth twn vrtis u n v of lst lngth. 71

10.4 Conntivity Conntnss in unirt grphs: [Thorm] thr is simpl pth twn ny pir of istint vrtis of n unirt onnt grph. Proof: Lt G = (V,E) unirt onnt grph,n lt u,v V. G is onnt, thrfor thr is t lst on pth twn u n v. Lt x 0 = u, x 1,, x n = v pth twn vrtis u n v of lst lngth. This pth must simpl. 72

10.4 Conntivity Conntnss in unirt grphs: [Thorm] thr is simpl pth twn ny pir of istint vrtis of n unirt onnt grph. Proof: Lt G = (V,E) unirt onnt grph,n lt u,v V. G is onnt, thrfor thr is t lst on pth twn u n v. Lt x 0 = u, x 1,, x n = v pth twn vrtis u n v of lst lngth. This pth must simpl. Assum it is not so. 73

10.4 Conntivity Conntnss in unirt grphs: [Thorm] thr is simpl pth twn ny pir of istint vrtis of n unirt onnt grph. Proof: Lt G = (V,E) unirt onnt grph,n lt u,v V. G is onnt, thrfor thr is t lst on pth twn u n v. Lt x 0 = u, x 1,, x n = v pth twn vrtis u n v of lst lngth. This pth must simpl. Assum it is not so. Thn, for som i,j with 0 i <j, x i = x j. v v lt th u f gs u f 74

10.4 Conntivity Conntnss in unirt grphs: [Thorm] thr is simpl pth twn ny pir of istint vrtis of n unirt onnt grph. Proof: Lt G = (V,E) unirt onnt grph,n lt u,v V. G is onnt, thrfor thr is t lst on pth twn u n v. Lt x 0 = u, x 1,, x n = v pth twn vrtis u n v of lst lngth. This pth must simpl. Assum it is not so. Thn, for som i,j with 0 i <j, x i = x j. So lt's lt th gs orrsponing to th squn x i,...,x j-1 from th pth w will gt th pth x 1,...,x i-1,x j,...,x n of smllr lngth this ontrits our ssumption. 75 Thrfor, th pth x 0 = u, x 1,, x n = v is simpl. q...

10.4 Conntivity Connt omponnts [Df] sugrph of grph G = (V,E) is grph H=(W,F) whr W V, F E. Grph H is propr sugrph of G is H G. [Df] A onnt omponnt of grph G is onnt sugrph of G tht is not propr sugrph of nothr onnt sugrph of G. i.. mximl onnt sugrph of G. H 2 H H 1 3 G grph G n its onnt omponnts H 1, H 2, n H 3. 76

10.4 Conntivity How onnt is th grph? Imgin grph rprsnting omputr ntwork. If it is onnt, thn ny two omputrs n ommunit. Howvr, w n to know how rlil th ntwork is. If on ommunition link fils, will ll omputr still l to ommunit with h othr? 77

10.4 Conntivity How onnt is th grph? If vrtx n ll inint gs r rmov from th grph, n th prou sugrph hs mor onnt omponnts, thn suh vrtx is ll ut vrtx or rtiultion point. Th rmovl of ut vrtx from onnt grph prous unonnt sugrph. 78

10.4 Conntivity How onnt is th grph? If n g rmov from th grph prous sugrph with mor onnt omponnts thn in th originl grph, thn suh n g is ll ut g or rig. In omputr ntwork grph, ut vrtx n ut g rprsnt n ssntil routr n n ssntil link tht nnot fil for ll omputrs to l to ommunit. Not ll grphs hv ut vrtis or ut g. Suh grphs r ll nonsprl grphs. 79

10.4 Conntivity How onnt is th grph? Exmpl: Fin th ut vrtis n ut gs in th grph low. K 4 80

10.4 Conntivity How onnt is th grph? Exmpl: Fin th ut vrtis n ut gs in th grph low. onnt grph K 4 K 3 Hn K 4 osn't hv ut vrtis 81

10.4 Conntivity How onnt is th grph? Exmpl: Fin th ut vrtis n ut gs in th grph low. onnt grphs K 4 Hn K 4 osn't hv ut gs ithr 82

10.4 Conntivity How onnt is th grph? Exmpl: Fin th ut vrtis n ut gs in th grph low. K 4 nonsprl grph 83

10.4 Conntivity How onnt is th grph? Exmpl: Fin th ut vrtis n ut gs in th grph low. G 84

10.4 Conntivity How onnt is th grph? Exmpl: Fin th ut vrtis n ut gs in th grph low. ut vrtis:,,,f,g h g G f 85

10.4 Conntivity How onnt is th grph? Exmpl: Fin th ut vrtis n ut gs in th grph low. ut gs: (,), (,), (,), (f,), h g G f 86

10.4 Conntivity How onnt is th grph? Exmpl: Fin th ut vrtis n ut gs in th grph low. ut gs:..., (f,), (,g), (g,h) h g f 87