graphs and isomorphisms discrete structures (cs 173) madhusudan parthasarathy, university of...

26
Graphs and Isomorphisms Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois Backyards of Old House s in Antwerp in the Snow Van Gogh 1

Upload: jeffrey-hampton

Post on 13-Dec-2015

216 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Graphs and Isomorphisms Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois Backyards of Old Houses in Antwerp in the Snow Van

Graphs and Isomorphisms

Discrete Structures (CS 173)Madhusudan Parthasarathy, University of Illinois

Backyards of Old Houses in Antwerp in the SnowVan Gogh

1

Page 2: Graphs and Isomorphisms Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois Backyards of Old Houses in Antwerp in the Snow Van

Administrative

• How was the exam?

• Midterm graded by Friday next week (hopefully)

• Remember: homework this week and discussions this week continue…

2

Page 3: Graphs and Isomorphisms Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois Backyards of Old Houses in Antwerp in the Snow Van

Proof with one-to-one

3

Let A, B be subsets of reals.Claim: Any strictly increasing function from A to B is one-to-one.Definition: is one-to-one iff Definition: is strictly increasing iff

overhead

Page 4: Graphs and Isomorphisms Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois Backyards of Old Houses in Antwerp in the Snow Van

PermutationsOrdered selection Suppose I have 6 gems, and you get to choose 1. How many different combinations of gems can you choose?

Suppose I have gems and want to put them in a row from left to right. How many different ways can I arrange them?

Suppose I have 6 gems and want to put three of them in a row from left to right. How many different ways can I arrange them?

Unordered selectionSuppose I have 6 gems, and you get to choose 2. How many different combinations of gems can you choose?

Suppose I have gems, and you choose . How many combinations?

4

Page 5: Graphs and Isomorphisms Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois Backyards of Old Houses in Antwerp in the Snow Van

Permutations

Suppose with and . How many different one-to-one functions can I create?

How many ways can I rearrange the letters in “nan”?

How many ways can I rearrange the letters in “yellowbelly”?

5

Page 6: Graphs and Isomorphisms Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois Backyards of Old Houses in Antwerp in the Snow Van

Graphs

• How to represent graphs?

• What are the properties of a graph?– Degrees, special types

• When are two graphs isomorphic, having the same structure?

6

Page 7: Graphs and Isomorphisms Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois Backyards of Old Houses in Antwerp in the Snow Van

Fastest path from Chicago to Bloomington?

Page 8: Graphs and Isomorphisms Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois Backyards of Old Houses in Antwerp in the Snow Van

Fastest path from Chicago to Bloomington?

Page 9: Graphs and Isomorphisms Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois Backyards of Old Houses in Antwerp in the Snow Van

Fastest path from Chicago to Bloomington?

start

end

231

4

Page 10: Graphs and Isomorphisms Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois Backyards of Old Houses in Antwerp in the Snow Van

Fastest path from Chicago to Bloomington?

start

end

241

3

C

B

1 2

3 4

20 30

15

120

110

35

9060

Page 11: Graphs and Isomorphisms Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois Backyards of Old Houses in Antwerp in the Snow Van

Other applications of graphs• Modeling the flow of a network

– Traffic, water in pipes, bandwidth in computer networks, etc.

11

Page 12: Graphs and Isomorphisms Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois Backyards of Old Houses in Antwerp in the Snow Van

Basics of graphsGraph = (V, E)Terminology: vertex/node, edge, neighbor/adjacent, directed vs. undirected, simple graph, degree of a node

12overhead

Page 13: Graphs and Isomorphisms Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois Backyards of Old Houses in Antwerp in the Snow Van

13

Page 14: Graphs and Isomorphisms Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois Backyards of Old Houses in Antwerp in the Snow Van

Degrees and handshaking theorem

14overhead

Loops count twice

Page 15: Graphs and Isomorphisms Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois Backyards of Old Houses in Antwerp in the Snow Van

Types of graphs: complete graph with nodes

15

overhead

How many edges does each type have?

Page 16: Graphs and Isomorphisms Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois Backyards of Old Houses in Antwerp in the Snow Van

Types of graphs: cycle graph with nodes

: wheel graph with nodes

16

overhead

How many edges does each type have?

Page 17: Graphs and Isomorphisms Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois Backyards of Old Houses in Antwerp in the Snow Van

IsomorphismAn isomorphism from to is a bijection such that any pair of nodes and are joined by an edge iff and are joined by an edge

Two graphs are isomorphic if there is an isomorphism between them

17overhead

Page 18: Graphs and Isomorphisms Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois Backyards of Old Houses in Antwerp in the Snow Van

Isomorphism examplesAn isomorphism from to is a bijection such that any pair of nodes and are joined by an edge iff and are joined by an edge

18overhead

Page 19: Graphs and Isomorphisms Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois Backyards of Old Houses in Antwerp in the Snow Van

Isomorphism examples

19overhead

An isomorphism from to is a bijection such that any pair of nodes and are joined by an edge iff and are joined by an edge

Page 20: Graphs and Isomorphisms Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois Backyards of Old Houses in Antwerp in the Snow Van

Requirements for graphs to be isomorphic

20overhead

Page 21: Graphs and Isomorphisms Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois Backyards of Old Houses in Antwerp in the Snow Van

Requirements for two graphs to be isomorphic

• Same number of nodes and edges

• Same number of nodes of degree

• Every subgraph in the first must have a matching subgraph in the second

21

Page 22: Graphs and Isomorphisms Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois Backyards of Old Houses in Antwerp in the Snow Van

Automorphism: an isomorphism from a graph to itself

• Automorphisms identify symmetries in the graph

• How many different automorphisms?

22

𝐶 4

𝐶 6

overhead

Page 23: Graphs and Isomorphisms Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois Backyards of Old Houses in Antwerp in the Snow Van

Small graphs without non-trivial automorphism?

23

overhead

Page 24: Graphs and Isomorphisms Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois Backyards of Old Houses in Antwerp in the Snow Van

Isomorphism is an equivalence relation: reflexive, symmetric, and transitive

24

Page 25: Graphs and Isomorphisms Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois Backyards of Old Houses in Antwerp in the Snow Van

Things to remember

• A graph is defined by a set of nodes and a set of edges that connect them

• Be able to identify types of graphs and degrees of nodes

• Be able to identify isomorphisms (or lack thereof) between graphs

25

Page 26: Graphs and Isomorphisms Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois Backyards of Old Houses in Antwerp in the Snow Van

Next week: more graphs and induction

26