Discrete-Chapter 11 Graphs Part II

8
8 มหาวิทยาลัยราชภัฏสวนสุนันทา (ภาคการศึกษาที2/2555) เรียบเรียงโดย .วงศ์ยศ เกิดศรี CSC1001 Discrete Mathematics 11 - Graphs Example 6 (8 points) Find the in-degree and out-degree of each vertex in the graph G with directed edges shown in Figure. Example 7 (12 points) Find the in-degree and out-degree of each vertex in the graph G with directed edges shown in Figure. 2. Some Special Simple Graphs Let G = (V ,E) be a graph with directed edges. Then E ) v ( deg ) v ( deg V v V v = = + Definition 7 A complete graph on n vertices, denoted by K n , is a simple graph that contains exactly one edge between each pair of distinct vertices. Definition 8 A cycle graph on n vertices (n 3), denoted by C n , consists of n vertices v 1 , v 2 , . . . , v n and edges {v 1 , v 2 }, {v 2 , v 3 }, . . . , {v n -1 , v n }, and {v n , v 1 }. Definition 9

description

 

Transcript of Discrete-Chapter 11 Graphs Part II

Page 1: Discrete-Chapter 11 Graphs Part II

8

มหาวิทยาลยัราชภฏัสวนสนุนัทา (ภาคการศึกษาท่ี 2/2555) เรยีบเรยีงโดย อ.วงศย์ศ เกิดศร ี

CSC1001 Discrete Mathematics 11 - Graphs

Example 6 (8 points) Find the in-degree and out-degree of each vertex in the graph G with directed edges shown in Figure.

Example 7 (12 points) Find the in-degree and out-degree of each vertex in the graph G with directed edges shown in Figure.

2. Some Special Simple Graphs

Let G = (V ,E) be a graph with directed edges. ThenE)v(deg)v(deg

VvVv== ∑∑

+

Definition 7

A complete graph on n vertices, denoted by Kn, is a simple graph that contains exactly one edge between each pair of distinct vertices.

Definition 8

A cycle graph on n vertices (n≥ 3), denoted by Cn, consists of n vertices v1, v2, . . . , vn and edges {v1, v2}, {v2, v3}, . . . , {vn-1, vn}, and {vn, v1}.

Definition 9

Page 2: Discrete-Chapter 11 Graphs Part II

9

มหาวิทยาลยัราชภฏัสวนสนุนัทา (ภาคการศึกษาท่ี 2/2555) เรยีบเรยีงโดย อ.วงศย์ศ เกิดศร ี

CSC1001 Discrete Mathematics Graphs - 11

3. Bipartite Graphs

Showing that C6 is bipartite.

A wheel graph on n vertices (n≥ 3), denoted by Wn, when we add an additional vertex to a cycle Cn and connect this new vertex to each of the n vertices in Cn, by new edges.

Definition 10

An n-dimensional hypercube, or n-cube, denoted by Qn, is a graph that has vertices representing the 2n bit strings of length n.

Definition 11

A simple graph G is called bipartite if its vertex set V can be partitioned into two disjoint sets V1 and V2

such that every edge in the graph connects a vertex in V1 and a vertex in V2 (so that no edge in G connects either two vertices in V1 or two vertices in V2). When this condition holds, we call the pair (V1, V2) a bipartition of the vertex set V of G.

Definition 12

Page 3: Discrete-Chapter 11 Graphs Part II

10

มหาวิทยาลยัราชภฏัสวนสนุนัทา (ภาคการศึกษาท่ี 2/2555) เรยีบเรยีงโดย อ.วงศย์ศ เกิดศร ี

CSC1001 Discrete Mathematics 11 - Graphs

Example 8 (4 points) Are the graphs G and H displayed in Figure bipartite?

Example 9 (2 points) Is the graphs displayed in Figure bipartite?

Example 10 (2 points) Is the graphs displayed in Figure bipartite?

A complete bipartite graph Km,n is a graph that has its vertex set partitioned into two subsets of m and n vertices, respectively with an edge between two vertices if and only if one vertex is in the first subset and the other vertex is in the second subset.

Definition 13

Page 4: Discrete-Chapter 11 Graphs Part II

11

มหาวิทยาลยัราชภฏัสวนสนุนัทา (ภาคการศึกษาท่ี 2/2555) เรยีบเรยีงโดย อ.วงศย์ศ เกิดศร ี

CSC1001 Discrete Mathematics Graphs - 11

4. New Graphs from Old

Example 11 (6 points) Draw all subgraphs of this graph.

Example 12 (4 points) Find the union of the given pair of simple graphs. (Assume edges with the same end-points are the same.)

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

Definition 14

The union of two simple graphs G1 = (V1,E1) and G2 = (V2,E2) is the simple graph with vertex set V1 ∪ V2

and edge set E1 ∪ E2. The union of G1 and G2 is denoted by G1 ∪ G2.

Definition 15

Page 5: Discrete-Chapter 11 Graphs Part II

12

มหาวิทยาลยัราชภฏัสวนสนุนัทา (ภาคการศึกษาท่ี 2/2555) เรยีบเรยีงโดย อ.วงศย์ศ เกิดศร ี

CSC1001 Discrete Mathematics 11 - Graphs

Example 13 (4 points) Find the union of the given pair of simple graphs. (Assume edges with the same end-points are the same.)

1. Representing Graphs

Example 14 (4 points) Use an adjacency list to represent the pseudograph

Representing Graphs and Graph Isomorphism 3

One way to represent a graph without multiple edges is to list all the edges of this graph using adjacency lists, which specify the vertices that are adjacent to each vertex of the graph.

Definition 1

Page 6: Discrete-Chapter 11 Graphs Part II

13

มหาวิทยาลยัราชภฏัสวนสนุนัทา (ภาคการศึกษาท่ี 2/2555) เรยีบเรยีงโดย อ.วงศย์ศ เกิดศร ี

CSC1001 Discrete Mathematics Graphs - 11

Example 15 (4 points) Use an adjacency matrix to represent the graph in adjacency list example.

Example 16 (4 points) Draw a graph with the adjacency matrix

Example 17 (4 points) Draw a graph with the adjacency matrix

Example 18 (4 points) Use an adjacency matrix to represent the graph.

Suppose that G = (V ,E) is a simple graph where |V| = n. Suppose that the vertices of G are listed arbitrarily as v1, v2, . . . , vn. The adjacency matrix A (or AG) of G, with respect to this listing of the vertices, 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.

Definition 2

⎥⎥⎥⎥

⎢⎢⎢⎢

0110101100001010

⎥⎥⎥⎥

⎢⎢⎢⎢

1111100110101101

Page 7: Discrete-Chapter 11 Graphs Part II

14

มหาวิทยาลยัราชภฏัสวนสนุนัทา (ภาคการศึกษาท่ี 2/2555) เรยีบเรยีงโดย อ.วงศย์ศ เกิดศร ี

CSC1001 Discrete Mathematics 11 - Graphs

Example 19 (4 points) Draw a graph with the adjacency matrix

Example 20 (4 points) Represent the pseudograph shown in Figure using an incidence matrix

Example 21 (4 points) Represent the pseudograph shown in Figure using an incidence matrix

2. Isomorphism of Graphs

⎥⎥⎥

⎢⎢⎢

232130321

Another common way to represent graphs is to use 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.

Definition 3

The simple graphs G1 = (V1,E1) and G2 = (V2,E2) are isomorphic if there exists 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. Two simple graphs that are not isomorphic are called nonisomorphic.

Definition 4

Page 8: Discrete-Chapter 11 Graphs Part II

15

มหาวิทยาลยัราชภฏัสวนสนุนัทา (ภาคการศึกษาท่ี 2/2555) เรยีบเรยีงโดย อ.วงศย์ศ เกิดศร ี

CSC1001 Discrete Mathematics Graphs - 11

G and H are not isomorphic G and H are isomorphic

Example 22 (8 points) Determine whether the given pair of graphs is isomorphic. 1) Graph A

2) Graph B

3) Graph C

4) Graph D