SlideShare ist ein Scribd-Unternehmen logo
1 von 8
Downloaden Sie, um offline zu lesen
8         CSC1001 Discrete Mathematics                                                                     11 - Graphs


    Definition 7
    Let G = (V ,E) be a graph with directed edges. Then
    ∑ deg
    v∈V
            −
                ( v) = ∑ deg + ( v) = E
                      v∈V




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
    Definition 8
    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 9
    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}.

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




 Definition 10
 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 11
 An n-dimensional hypercube, or n-cube, denoted by Qn, is a graph that has vertices representing the 2n
 bit strings of length n.




3. Bipartite Graphs
 Definition 12
 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.




                                      Showing that C6 is bipartite.

มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                                 เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
10      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?




 Definition 13
 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.




มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                               เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
Graphs - 11                                                           CSC1001 Discrete Mathematics         11
4. New Graphs from Old
 Definition 14
 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 15
 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.




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.)




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




  3      Representing Graphs and Graph Isomorphism
1. Representing Graphs
 Definition 1

 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.




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




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

 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.




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
 ⎡0   1   0      1⎤
 ⎢0   0   0      0⎥
 ⎢                ⎥
 ⎢1   1   0      1⎥
 ⎢                ⎥
 ⎣0   1   1      0⎦


Example 17 (4 points) Draw a graph with the adjacency matrix
 ⎡1   0   1      1⎤
 ⎢0   1   0      1⎥
 ⎢                ⎥
 ⎢1   0   0      1⎥
 ⎢                ⎥
 ⎣1   1   1      1⎦


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




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


Example 19 (4 points) Draw a graph with the adjacency matrix
  ⎡1 2 3 ⎤
  ⎢0 3 1 ⎥
  ⎢      ⎥
  ⎢ 2 3 2⎥
  ⎣      ⎦




 Definition 3

 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.




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
 Definition 4
 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.

มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                               เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
Graphs - 11                                                           CSC1001 Discrete Mathematics          15
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




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

Weitere ähnliche Inhalte

Was ist angesagt?

1st Test - If then, converse, inverse and contrapositive
1st Test - If then, converse, inverse and contrapositive1st Test - If then, converse, inverse and contrapositive
1st Test - If then, converse, inverse and contrapositive
Brandeis High School
 
Direct variation power point
Direct variation power pointDirect variation power point
Direct variation power point
toni dimella
 
Linear equations lesson plan
Linear equations lesson planLinear equations lesson plan
Linear equations lesson plan
Caleb Thaxton
 
Matrix transformation
Matrix transformationMatrix transformation
Matrix transformation
mstf mstf
 
Презентація:"Додавання і віднімання дробів з однаковими знаменниками"
Презентація:"Додавання і віднімання дробів з однаковими знаменниками"Презентація:"Додавання і віднімання дробів з однаковими знаменниками"
Презентація:"Додавання і віднімання дробів з однаковими знаменниками"
sveta7940
 
cartesian plane by : joe olivare
cartesian plane by : joe olivarecartesian plane by : joe olivare
cartesian plane by : joe olivare
Joe Olivare
 
Geometry lesson13sss postulate
Geometry lesson13sss postulateGeometry lesson13sss postulate
Geometry lesson13sss postulate
kjackson5
 

Was ist angesagt? (20)

Differential geometry three dimensional space
Differential geometry   three dimensional spaceDifferential geometry   three dimensional space
Differential geometry three dimensional space
 
21 monotone sequences x
21 monotone sequences x21 monotone sequences x
21 monotone sequences x
 
1st Test - If then, converse, inverse and contrapositive
1st Test - If then, converse, inverse and contrapositive1st Test - If then, converse, inverse and contrapositive
1st Test - If then, converse, inverse and contrapositive
 
Direct variation power point
Direct variation power pointDirect variation power point
Direct variation power point
 
Line and its slope
Line and its slopeLine and its slope
Line and its slope
 
Electric-Flux.pptx
Electric-Flux.pptxElectric-Flux.pptx
Electric-Flux.pptx
 
Line integral.ppt
Line integral.pptLine integral.ppt
Line integral.ppt
 
Застосування інтеграла (11 клас)
Застосування інтеграла (11 клас)Застосування інтеграла (11 клас)
Застосування інтеграла (11 клас)
 
Solenoids
Solenoids  Solenoids
Solenoids
 
Linear equations lesson plan
Linear equations lesson planLinear equations lesson plan
Linear equations lesson plan
 
2.7.4 Conditions for Parallelograms
2.7.4 Conditions for Parallelograms2.7.4 Conditions for Parallelograms
2.7.4 Conditions for Parallelograms
 
Matrix transformation
Matrix transformationMatrix transformation
Matrix transformation
 
Trigonometric Function of General Angles Lecture
Trigonometric Function of General Angles LectureTrigonometric Function of General Angles Lecture
Trigonometric Function of General Angles Lecture
 
Презентація:"Додавання і віднімання дробів з однаковими знаменниками"
Презентація:"Додавання і віднімання дробів з однаковими знаменниками"Презентація:"Додавання і віднімання дробів з однаковими знаменниками"
Презентація:"Додавання і віднімання дробів з однаковими знаменниками"
 
«Математика» підручник для 5 класу закладів загальної середньої освіти (авт. ...
«Математика» підручник для 5 класу закладів загальної середньої освіти (авт. ...«Математика» підручник для 5 класу закладів загальної середньої освіти (авт. ...
«Математика» підручник для 5 класу закладів загальної середньої освіти (авт. ...
 
cartesian plane by : joe olivare
cartesian plane by : joe olivarecartesian plane by : joe olivare
cartesian plane by : joe olivare
 
Slope of Line
Slope of LineSlope of Line
Slope of Line
 
Вектори у просторі
Вектори у просторіВектори у просторі
Вектори у просторі
 
Geometry lesson13sss postulate
Geometry lesson13sss postulateGeometry lesson13sss postulate
Geometry lesson13sss postulate
 
З.І.Медвідь. «Пряма та обернена пропорційність» (6 клас)
З.І.Медвідь. «Пряма та обернена пропорційність» (6 клас)З.І.Медвідь. «Пряма та обернена пропорційність» (6 клас)
З.І.Медвідь. «Пряма та обернена пропорційність» (6 клас)
 

Andere mochten auch (17)

Avltrees
AvltreesAvltrees
Avltrees
 
Trees
Trees Trees
Trees
 
Trees and graphs
Trees and graphsTrees and graphs
Trees and graphs
 
Trees
TreesTrees
Trees
 
Discrete-Chapter 10 Trees
Discrete-Chapter 10 TreesDiscrete-Chapter 10 Trees
Discrete-Chapter 10 Trees
 
Cinterviews Binarysearch Tree
Cinterviews Binarysearch TreeCinterviews Binarysearch Tree
Cinterviews Binarysearch Tree
 
Discrete Mathematics & Its Applications (Graphs)
Discrete Mathematics & Its Applications (Graphs)Discrete Mathematics & Its Applications (Graphs)
Discrete Mathematics & Its Applications (Graphs)
 
Discrete-Chapter 11 Graphs Part I
Discrete-Chapter 11 Graphs Part IDiscrete-Chapter 11 Graphs Part I
Discrete-Chapter 11 Graphs Part I
 
17 Trees and graphs
17 Trees and graphs17 Trees and graphs
17 Trees and graphs
 
Discrete Mathematics Tree
Discrete Mathematics  TreeDiscrete Mathematics  Tree
Discrete Mathematics Tree
 
Relations digraphs
Relations  digraphsRelations  digraphs
Relations digraphs
 
Graph Theory,Graph Terminologies,Planar Graph & Graph Colouring
Graph Theory,Graph Terminologies,Planar Graph & Graph ColouringGraph Theory,Graph Terminologies,Planar Graph & Graph Colouring
Graph Theory,Graph Terminologies,Planar Graph & Graph Colouring
 
Applications of graphs
Applications of graphsApplications of graphs
Applications of graphs
 
introduction to graph theory
introduction to graph theoryintroduction to graph theory
introduction to graph theory
 
Communication Networks
Communication NetworksCommunication Networks
Communication Networks
 
Ad-Hoc Networks
Ad-Hoc NetworksAd-Hoc Networks
Ad-Hoc Networks
 
Trees data structure
Trees data structureTrees data structure
Trees data structure
 

Ähnlich wie Discrete-Chapter 11 Graphs Part II

1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptx1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptx
swapnilbs2728
 
Discrete-Chapter 11 Graphs Part III
Discrete-Chapter 11 Graphs Part IIIDiscrete-Chapter 11 Graphs Part III
Discrete-Chapter 11 Graphs Part III
Wongyos Keardsri
 

Ähnlich wie Discrete-Chapter 11 Graphs Part II (20)

ch8.3-8.4.ppt
ch8.3-8.4.pptch8.3-8.4.ppt
ch8.3-8.4.ppt
 
1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptx1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptx
 
Graphs.pdf
Graphs.pdfGraphs.pdf
Graphs.pdf
 
Elements of Graph Theory for IS.pptx
Elements of Graph Theory for IS.pptxElements of Graph Theory for IS.pptx
Elements of Graph Theory for IS.pptx
 
Discrete-Chapter 11 Graphs Part III
Discrete-Chapter 11 Graphs Part IIIDiscrete-Chapter 11 Graphs Part III
Discrete-Chapter 11 Graphs Part III
 
graph theory
graph theorygraph theory
graph theory
 
graph-theory-Slides.pdf
graph-theory-Slides.pdfgraph-theory-Slides.pdf
graph-theory-Slides.pdf
 
graph.ppt
graph.pptgraph.ppt
graph.ppt
 
Ppt of graph theory
Ppt of graph theoryPpt of graph theory
Ppt of graph theory
 
E-Cordial Labeling of Some Mirror Graphs
E-Cordial Labeling of Some Mirror GraphsE-Cordial Labeling of Some Mirror Graphs
E-Cordial Labeling of Some Mirror Graphs
 
Graph Theory
Graph TheoryGraph Theory
Graph Theory
 
Graphs
GraphsGraphs
Graphs
 
Graph theory
Graph theoryGraph theory
Graph theory
 
Graph terminologies & special type graphs
Graph terminologies & special type graphsGraph terminologies & special type graphs
Graph terminologies & special type graphs
 
graph.ppt
graph.pptgraph.ppt
graph.ppt
 
Chapter 5 Graphs (1).ppt
Chapter 5 Graphs (1).pptChapter 5 Graphs (1).ppt
Chapter 5 Graphs (1).ppt
 
Graph-theory.ppt
Graph-theory.pptGraph-theory.ppt
Graph-theory.ppt
 
Graph.ppt
Graph.pptGraph.ppt
Graph.ppt
 
Data structure - Graph
Data structure - GraphData structure - Graph
Data structure - Graph
 
graph ASS (1).ppt
graph ASS (1).pptgraph ASS (1).ppt
graph ASS (1).ppt
 

Mehr von Wongyos Keardsri

SysProg-Tutor 03 Unix Shell Script Programming
SysProg-Tutor 03 Unix Shell Script ProgrammingSysProg-Tutor 03 Unix Shell Script Programming
SysProg-Tutor 03 Unix Shell Script Programming
Wongyos Keardsri
 
SysProg-Tutor 02 Introduction to Unix Operating System
SysProg-Tutor 02 Introduction to Unix Operating SystemSysProg-Tutor 02 Introduction to Unix Operating System
SysProg-Tutor 02 Introduction to Unix Operating System
Wongyos Keardsri
 
SysProg-Tutor 01 Introduction to C Programming Language
SysProg-Tutor 01 Introduction to C Programming LanguageSysProg-Tutor 01 Introduction to C Programming Language
SysProg-Tutor 01 Introduction to C Programming Language
Wongyos Keardsri
 
Discrete-Chapter 09 Algorithms
Discrete-Chapter 09 AlgorithmsDiscrete-Chapter 09 Algorithms
Discrete-Chapter 09 Algorithms
Wongyos Keardsri
 
Discrete-Chapter 08 Relations
Discrete-Chapter 08 RelationsDiscrete-Chapter 08 Relations
Discrete-Chapter 08 Relations
Wongyos Keardsri
 
Discrete-Chapter 07 Probability
Discrete-Chapter 07 ProbabilityDiscrete-Chapter 07 Probability
Discrete-Chapter 07 Probability
Wongyos Keardsri
 
Discrete-Chapter 06 Counting
Discrete-Chapter 06 CountingDiscrete-Chapter 06 Counting
Discrete-Chapter 06 Counting
Wongyos Keardsri
 
Discrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and ProofsDiscrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and Proofs
Wongyos Keardsri
 
Discrete-Chapter 04 Logic Part II
Discrete-Chapter 04 Logic Part IIDiscrete-Chapter 04 Logic Part II
Discrete-Chapter 04 Logic Part II
Wongyos Keardsri
 
Discrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part IDiscrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part I
Wongyos Keardsri
 
Discrete-Chapter 03 Matrices
Discrete-Chapter 03 MatricesDiscrete-Chapter 03 Matrices
Discrete-Chapter 03 Matrices
Wongyos Keardsri
 
Discrete-Chapter 02 Functions and Sequences
Discrete-Chapter 02 Functions and SequencesDiscrete-Chapter 02 Functions and Sequences
Discrete-Chapter 02 Functions and Sequences
Wongyos Keardsri
 
Discrete-Chapter 12 Modeling Computation
Discrete-Chapter 12 Modeling ComputationDiscrete-Chapter 12 Modeling Computation
Discrete-Chapter 12 Modeling Computation
Wongyos Keardsri
 

Mehr von Wongyos Keardsri (20)

How to Study and Research in Computer-related Master Program
How to Study and Research in Computer-related Master ProgramHow to Study and Research in Computer-related Master Program
How to Study and Research in Computer-related Master Program
 
The next generation intelligent transport systems: standards and applications
The next generation intelligent transport systems: standards and applicationsThe next generation intelligent transport systems: standards and applications
The next generation intelligent transport systems: standards and applications
 
IP address anonymization
IP address anonymizationIP address anonymization
IP address anonymization
 
SysProg-Tutor 03 Unix Shell Script Programming
SysProg-Tutor 03 Unix Shell Script ProgrammingSysProg-Tutor 03 Unix Shell Script Programming
SysProg-Tutor 03 Unix Shell Script Programming
 
SysProg-Tutor 02 Introduction to Unix Operating System
SysProg-Tutor 02 Introduction to Unix Operating SystemSysProg-Tutor 02 Introduction to Unix Operating System
SysProg-Tutor 02 Introduction to Unix Operating System
 
SysProg-Tutor 01 Introduction to C Programming Language
SysProg-Tutor 01 Introduction to C Programming LanguageSysProg-Tutor 01 Introduction to C Programming Language
SysProg-Tutor 01 Introduction to C Programming Language
 
Discrete-Chapter 09 Algorithms
Discrete-Chapter 09 AlgorithmsDiscrete-Chapter 09 Algorithms
Discrete-Chapter 09 Algorithms
 
Discrete-Chapter 08 Relations
Discrete-Chapter 08 RelationsDiscrete-Chapter 08 Relations
Discrete-Chapter 08 Relations
 
Discrete-Chapter 07 Probability
Discrete-Chapter 07 ProbabilityDiscrete-Chapter 07 Probability
Discrete-Chapter 07 Probability
 
Discrete-Chapter 06 Counting
Discrete-Chapter 06 CountingDiscrete-Chapter 06 Counting
Discrete-Chapter 06 Counting
 
Discrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and ProofsDiscrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and Proofs
 
Discrete-Chapter 04 Logic Part II
Discrete-Chapter 04 Logic Part IIDiscrete-Chapter 04 Logic Part II
Discrete-Chapter 04 Logic Part II
 
Discrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part IDiscrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part I
 
Discrete-Chapter 03 Matrices
Discrete-Chapter 03 MatricesDiscrete-Chapter 03 Matrices
Discrete-Chapter 03 Matrices
 
Discrete-Chapter 02 Functions and Sequences
Discrete-Chapter 02 Functions and SequencesDiscrete-Chapter 02 Functions and Sequences
Discrete-Chapter 02 Functions and Sequences
 
Discrete-Chapter 01 Sets
Discrete-Chapter 01 SetsDiscrete-Chapter 01 Sets
Discrete-Chapter 01 Sets
 
Discrete-Chapter 12 Modeling Computation
Discrete-Chapter 12 Modeling ComputationDiscrete-Chapter 12 Modeling Computation
Discrete-Chapter 12 Modeling Computation
 
Java-Chapter 14 Creating Graphics with DWindow
Java-Chapter 14 Creating Graphics with DWindowJava-Chapter 14 Creating Graphics with DWindow
Java-Chapter 14 Creating Graphics with DWindow
 
Java-Chapter 13 Advanced Classes and Objects
Java-Chapter 13 Advanced Classes and ObjectsJava-Chapter 13 Advanced Classes and Objects
Java-Chapter 13 Advanced Classes and Objects
 
Java-Chapter 11 Recursions
Java-Chapter 11 RecursionsJava-Chapter 11 Recursions
Java-Chapter 11 Recursions
 

Discrete-Chapter 11 Graphs Part II

  • 1. 8 CSC1001 Discrete Mathematics 11 - Graphs Definition 7 Let G = (V ,E) be a graph with directed edges. Then ∑ deg v∈V − ( v) = ∑ deg + ( v) = E v∈V 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 Definition 8 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 9 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}. มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 2. Graphs - 11 CSC1001 Discrete Mathematics 9 Definition 10 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 11 An n-dimensional hypercube, or n-cube, denoted by Qn, is a graph that has vertices representing the 2n bit strings of length n. 3. Bipartite Graphs Definition 12 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. Showing that C6 is bipartite. มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 3. 10 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? Definition 13 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. มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 4. Graphs - 11 CSC1001 Discrete Mathematics 11 4. New Graphs from Old Definition 14 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 15 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. 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.) มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 5. 12 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.) 3 Representing Graphs and Graph Isomorphism 1. Representing Graphs Definition 1 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. Example 14 (4 points) Use an adjacency list to represent the pseudograph มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 6. Graphs - 11 CSC1001 Discrete Mathematics 13 Definition 2 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. 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 ⎡0 1 0 1⎤ ⎢0 0 0 0⎥ ⎢ ⎥ ⎢1 1 0 1⎥ ⎢ ⎥ ⎣0 1 1 0⎦ Example 17 (4 points) Draw a graph with the adjacency matrix ⎡1 0 1 1⎤ ⎢0 1 0 1⎥ ⎢ ⎥ ⎢1 0 0 1⎥ ⎢ ⎥ ⎣1 1 1 1⎦ Example 18 (4 points) Use an adjacency matrix to represent the graph. มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 7. 14 CSC1001 Discrete Mathematics 11 - Graphs Example 19 (4 points) Draw a graph with the adjacency matrix ⎡1 2 3 ⎤ ⎢0 3 1 ⎥ ⎢ ⎥ ⎢ 2 3 2⎥ ⎣ ⎦ Definition 3 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. 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 Definition 4 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. มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 8. Graphs - 11 CSC1001 Discrete Mathematics 15 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 มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี