Foundations of Discrete Mathematics - Valencia...

74
Foundations of Discrete Mathematics Chapters 9 By Dr. Dalia M. Gil, Ph.D.

Transcript of Foundations of Discrete Mathematics - Valencia...

Page 1: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Foundations of Discrete Mathematics

Chapters 9

By Dr. Dalia M. Gil, Ph.D.

Page 2: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Graphs

Graphs are discrete structures consisting of vertices and edges that connect these vertices.

Page 3: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Graphs

A graph is a pair (V, E) of sets, V nonempty and each element of E a set of two distinct elements of V.

The elements of V are called vertices; the elements of E are called edges.

Page 4: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Graphs

If e is an edge, then e = {v, w}, where v and w are different elements of V called the end vertices of ends of e.

The vertices v and w are said to be incident with the edge vw. The edge vw is incident with each vertex.

Page 5: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Graphs

Two vertices are adjacent if they are the end vertices of an edge.

Two vertices are adjacent if they have a vertex in common.

The number of edges incident with a vertex v is called the degree of that vertex and is denoted deg v.

Page 6: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Graphs

If deg v is an even number, then v is said to be an even vertex.

If deg v is an odd number, then v is odd vertex.

A vertex of degree 0 is said to be isolated.

Page 7: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Subgraph

A graph G1 is a subgraph of another graph G if and only if the vertex and edge sets of G1 are, respectively, subsets of the vertex and edge sets of G.

Page 8: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Example: Subgraph

A graph G and three subgraphs G1, G2, and G3

“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire and M. Parmenter Prentice Hall, 2006. page 290

Page 9: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

A Bipartite Graph

A bipartite graph is one whose vertices can be partitioned into two (disjoint) sets V1 and V2, called bipartition sets in such a way that every edge joins a vertex in V1 and a vertex in V2.

Page 10: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

A Bipartite Graph

The complete bipartite graph on bipartition sets of m vertices and n vertices, respectively, is denoted Km,n.

Page 11: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Bipartite Graphs

Three bipartite graphs, two of which are complete.

“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire and M. Parmenter Prentice Hall, 2006. page 291

Page 12: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Bipartite Graphs

A graph and a way to show it is bipartite.

“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire and M. Parmenter Prentice Hall, 2006. page 291

Page 13: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Euler

The sum of the degrees of the vertices of a pseudograph is an even number equal to twice the number of edges. In symbols, if G(V, E) is a pseudograph , then

∑ deg v = 2 |E|v∈V

Page 14: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Example: Euler

The graph has 8 vertices of degree 3

∑ deg v = 8(3) = 24 =2|E|v∈V

it must have 12 edges.

“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire and M. Parmenter Prentice Hall, 2006. page 291

Page 15: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Graphs

There are several different types of graphs that differ with respect to the kind and number of edges that connect a pair of vertices.

Problems in almost every conceivable discipline can be solved using graph models.

Page 16: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Types of Graphs

Simple graph.

Multigraph.

Pseudograph.

Directed graph.

Direct multigraph.

Page 17: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

A Simple Graph

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.

Page 18: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Example of a Simple Graph

A computer network that represents computers (vertices) and telephone lines (undirected edges) that connect two distinct vertices.

“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. page 538

Page 19: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

A Multigraph

A multigraph G = (V, E) consists of a set V of vertices, a set E of edges, and a function f from E to {{u, v} | u, v ∈ V, u ≠ v}. The edges e1 and e2 are called multiple or parallel edges if f(e1) = f(e2).

Page 20: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Example of a Multigraph

This graph consist of vertices and undirected edges between these vertices with multiple edges between pairs of vertices allowed (two or more edges may connect the same pair of vertices).

“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. page 538

Page 21: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

A Pseudograph

A pseudograph G = (V, E) consists of a set V of vertices, a set E of edges, and a function f from E to {{u, v} | u, v ∈ V}. An edge is a loop if f (e) = {u, v} = {u}

Page 22: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Example of a Pseudograph

A computer network may contain vertices with loops, which are edges from a vertex to itself.

“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. page 539

Page 23: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

A Direct Graph

A direct graph (V, E) consists of a set of vertices V and a set of edges E that are ordered pairs of elements of V.

Page 24: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Example of a Direct Graph

A network may not operate in both directions. In this case an arrow pointing from u to v to indicate the direction of the edge (u, v) is used.

“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. page 539

Page 25: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

A Directed Multigraph

A directed multigraph G = (V, E) consists of a set V of vertices, a set E of edges, and a function f from E to {(u, v) | u, v ∈ V}. The edges e1 and e2 are multiple edges if f(e1) = f(e2).

Page 26: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Example of a Directed Multigraph

The algorithm uses a finite number of steps, since it terminates after all the integers in the sequence have been examined.

“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. page 540

Page 27: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Graph Terminology

Type Edges Multiple Edges Allowed?

Loops Allowed?

Simple Graph Undirected No No

Multigraph Undirected Yes No

Pseugograph Undirected Yes Yes

Directed Graph Directed No Yes

Directed Multigraph Directed Yes Yes

“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. page 540

Page 28: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Niche Overlap Graphs in Ecology

The competition between species in an ecosystem can be modeled using a niche overlap graph.

Each species is represented by a vertex.

Page 29: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Niche Overlap Graphs in Ecology

An undirected edge connects two vertices if the two species represented by these vertices compete.

Two species are connected if the food resources they use are the same.

“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. page 541

Page 30: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Acquaintanceship Graph

To represent whether two people know each other (whether they are acquainted)

Each person is represented by a vertex.

An undirected edge connects two people when they know each other.

“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. page 541

Page 31: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Influence Graph

In studies of group behavior it is observed that certain people can influence the thinking of others.

A directed graph can model this behavior.

Each person is represented by a vertex.

There is a directed vertex from vertex a to vertex b when person a influences person b.

Page 32: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Influence Graph (A Directed Graph)

Deborah can influence Brian, Fred, and Linda, but no one can influence her.

Yvonne and Brian can influence each other.

“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. page 542

Page 33: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Round-Robin Tournaments

A tournament where each team plays each other team exactly once is called a round-robin tournament.

In this case a directed graph is used.

Each team is represented by a vertex.

Page 34: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Round-Robin Tournaments

(a, b) is an edge if team a beats team b.

Team 1 is undefeated in this tournament

Team 3 is winless.

“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. page 542

Page 35: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Call Graphs

Graphs can be used to model telephone calls made in a network, such as a long-distance telephone network.

A directed multigraph can be used.

Each telephone is a vertex

Each telephone call is represented by a directed edge.

Page 36: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Call Graph using Directed Graph

Three calls have been made from 732-555-1234 to 732-555-9876 and

two in the other direction .

“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. page 542

Page 37: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Call Graph using Directed Graph

One call has been made from 732-555-4444 to 732-555-0011.

“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. page 542

Page 38: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Call Graph using Undirected Graph

When we care only whether there has been a call connecting two telephone numbers, an undirected graph is used.

Each edge tells us whether there has been a call between two numbers.

“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. page 542

Page 39: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Precedence Graph and Concurrent Processing

Computer programs can be executed more rapidly by executing certain statements concurrently.

It is important not to execute a statement that requires results of statement not yet executed.

Page 40: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Precedence Graph and Concurrent Processing

The dependence of statements on previous statements can be represented by a directed graph.

There is an edge from one vertex to a second vertex if the statement represented by the second vertex cannot be executed before the statement represented by the first vertex has been executed.

Page 41: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Precedence Graph and Concurrent Processing

In this section of a computer program the statement S5cannot be executed before S1, S2, and S4 are executed.

“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. page 543

Page 42: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Representing Graphs

One way to represent a graph without multiple edges is to list all the edges of this graph.

Another way to represent a graph with no multiple edges is to use adjacent list, which specify the vertices that are adjacent to each vertex of the graph.

Page 43: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Example: Representing Graphs

Use adjacent lists to describe the simple graph given in the figure.

Vertex Adjacent Vertices

a b, c, e

b a

c a, d, ed c, e

e a, c, d

“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. page 557

Page 44: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Example: Representing Graphs

Represent the directed graph shown in the figure by listing all the vertices that are the terminal vertices of edges starting at each vertex of the graph in the figure.

Initial Vertex

Terminal Vertices

a b, c, d, e

b b, d

c a, c, e

d

e b, c, d

“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. page 558

Page 45: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

The Adjacency Matrix A (AG)

If A = {aij} is the adjacency matrix A of G, then aij = 1 if {vi, vj} is an edge of G and aij = 0 otherwise.

The adjacency matrix of a simple graph is symmetric if aij = aji.

A simple graph has no loops, so each entry aii = 1, 2, …, n is 0.

Page 46: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Example: Adjacent Matrix

Use an adjacent matrix to represent the graph.

“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. page 558

Page 47: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Example: Adjacent Matrix

draw a graph with the adjacent matrix with respect to ordering of vertices a, b, c, d.

“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. page 559

Page 48: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Example: Adjacent Matrix

Use an adjacent matrix to represent the pseudograph shown in the figure.

“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. page 559

Page 49: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Incidence Matrices

Let G = (V, E) be an undirected graph. Suppose that v1,v2, …, vn are the vertices and e1, e2, …, em are the edges of G.

Then the incidence matrix with respect to this ordering of V and E is n x m matrix

M = {mij}, wheremij= 1 when edge ei is incident with vi, mij= 0 otherwise

Page 50: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Example: Incidence Matrix

Represent the graph with an incidence matrix.

“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. page 560

Page 51: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Example: Incidence Matrix

Represent the pseudograph with an incidence matrix.

“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. page 560

Page 52: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Isomorphism of Graphs

We often need to know whether it is possible to draw two graph in the same way.

In chemistry different compounds can have the same molecular formula but can differ in structure.

Such compounds will be represented by graph that cannot be drawn in the same way.

Page 53: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Isomorphism of Graphs

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.

Page 54: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Isomorphism of Graphs

Two simple graphs are isomorphic, if there is a one-to-one correspondence between vertices of the two graphs that preserves the adjacency relationship.

Isomorphism of simple graph is an equivalence relation.

Isomorphism comes from the Greek root isos for “equal” and morphe for “form.”

Page 55: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Example: Isomorphism

Show that the graphs G = (V, E) and H = (W, F) are isomorphic

The function f withf(u1)= v1, f(u2)= v4, f(u3)= v3, f(u4)= v2is a one-to-one correspondence between V and W.

“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. page 561

Page 56: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Example: Isomorphism (cont.)

Show that the graphs G = (V, E) and H = (W, F) are isomorphic

The adjacent vertices in G are u1 and u2, u1 and u3, u2 and u4,u3 and u4

“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. page 561

Page 57: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Example: Isomorphism (cont.)

Show that the graphs G = (V, E) and H = (W, F) are isomorphic

Each of the pairsf(u1)= v1 and f(u2)= v4

f(u1)= v1 and f(u3)= v3

f(u2)= v4 and f(u4)= v2

f(u3)= v3 and f(u4)= v2

are adjacent in H.“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. page 561

Page 58: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Isomorphism of Graphs

Two simple graphs are not isomorphic, if they do not share a property that isomorphic simple graphs must both have.

This property is call an invariant with respect to isomorphism of simple graph.

Page 59: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Isomorphism: Some Invariants

Isomorphic simple graphs must have the same number of vertices, since there is a one-to-one correspondence between the sets of vertices of the graphs.

Page 60: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Isomorphism of Graphs

Isomorphic simple graphs must have the same number of edges, because the one-to-one correspondence between vertices establishes a one-to-one correspondence between edges.

Page 61: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Isomorphism of Graphs

The degree of the vertices in isomorphic simple graph must be the same.

A vertex v of degree d in G must correspond to a vertex f(v) of degree d in H, since a vertex w in G is adjacent to v if and only if f(v) and f(w) are adjacent in H.

Page 62: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Examples of Graphs not Isomorphic

Show that the graphs are not isomorphic.

G and H have 5 vertices and 6 edgesH has a vertex of degree one (e).G has no vertices of degree one.G and H are not isomorphic.

“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. 561

Page 63: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Examples of Graphs not Isomorphic

Determine whether the graphs are isomorphic.

G and H have 8 vertices and 10 edges.

G and H have 4 vertices of degree 2 and 4 of degree 3.

“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. page 561

Page 64: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Examples of Graphs not Isomorphic

Determine whether the graphs are isomorphic.

In G deg(a) = 2, and a must correspond to either t, u, x , or y in H.

t, u, x, and y are adjacent to another vertex of degree 2, which is not true for a in G.

G and H are not isomorphic.

“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. page 561

Page 65: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Examples of Graphs not Isomorphic

Determine whether the graphs are isomorphic using subgraphs.

In G deg(a) = 2, and a must correspond to either t, u, x , or y in H.

t, u, x, and y are adjacent to another vertex of degree 2, which is not true for a in G.

“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. page 561

Page 66: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Examples of Graphs not Isomorphic

Determine whether the graphs are isomorphic using subgraphs.

“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. page 562

Page 67: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Examples of Graphs not Isomorphic

Determine whether the graphs are isomorphic using subgraphs.

The subgraphs of G and H made up of vertices of degree 3 and the edges connecting then must be isomorphic if these two graphs are isomorphic.

G and H are not isomorphic.

“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. page 562

Page 68: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Examples of Graphs Isomorphic

Determine whether the graphs are isomorphic using adjacency matrix.

Both G and H have 6 vertices and 7 edges.

Both have four vertices of degree 2 and 2 vertices of degree three.

“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. page 562

Page 69: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Examples of Graphs Isomorphic

Determine whether the graphs are isomorphic using adjacency matrix.

“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. pp 562-563

Page 70: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Examples of Graphs Isomorphic

Determine whether the graphs are isomorphic using adjacency matrix.

“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. pp 562-563

Page 71: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Examples of Graphs Isomorphic

Determine whether the graphs are isomorphic using adjacency matrix.

AG = AH, G and H are isomorphic.“Discrete Mathematics and its Applications.” Fifth Edition, by Kenneth H. Rosen. McGraw Hill, 2003. p 563

Page 72: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Topics covered

Graph. Definitions and basic properties.

Adjacency matrices.

Isomorphism.

Page 73: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Reference

“Discrete Mathematics with Graph Theory”, Third Edition, E. Goodaire and Michael Parmenter, Pearson Prentice Hall, 2006. pp 281-303.

Page 74: Foundations of Discrete Mathematics - Valencia …fd.valenciacollege.edu/file/dgil2/COT2104Class_Notes...“Discrete Mathematics with Graph Theory.” Third Edition, by E. G. Goodaire

Reference

“Discrete Mathematics and Its Applications”, Fifth Edition, Kenneth H. Rosen, McGraw-Hill, 2003. pp 537-567.