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

 CHAPTER
                                                          กราฟ
   11                                                    (Graphs)

  1       Introduction to Graphs and Graph Models
1. Deffinition of Graphs
  Definition 1

 A graph G = (V,E) consists of V , a nonempty set of vertices (or nodes) and E, a set of edges. Each edge
 has either one or two vertices associated with it, called its endpoints. An edge is said to connect its
 endpoints.

Types of Graphs
1) A graph in which each edge connects two different vertices and where no two edges connect the same
   pair of vertices is called a simple graph.




2) A graphs that may have multiple edges connecting the same vertices are called multigraphs.




3) A graphs that may include loops, and possibly multiple edges connecting the same pair of vertices or a
   vertex to itself, are sometimes called pseudographs.




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


4) From types of graphs in type 1-3 are undirected graphs. However, to construct a graph model, we may
   find it necessary to assign directions to the edges of a graph. This is called a directed graph (or digraph).
   We directed graph
       A directed graph which has no loops and has no multiple directed edges is called a simple directed
       graph.
       A directed graph that may have multiple directed edges from a vertex to a second (possibly the same)
       vertex is called directed multigraphs.




5) A graph with both directed and undirected edges is called a mixed graph.




Example 1 (6 points) Identify the properties of graph terminology in the blank from the table.
                                                                           Multiple Edges          Loops
 No.                 Type                              Edges
                                                                              Allowed?            Allowed?
  1. Simple graph
  2. Multigraph
  3. Pseudograph
  4. Simple directed graph
  5. Directed multigraph
  6. Mixed graph

2. Graph Models
   Graphs are used in a wide variety of models. Can you find a subject to which graph theory has been or
has not been applied?
1) Social Networks Graphs are extensively used to model social structures based on different kinds of
   relationships between people or groups of people. In these graph models, individuals or organizations are
   represented by vertices; relationships between individuals or organizations are represented by edges.

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




       Influence Graphs




2) Communication Network We can model different communications networks using vertices to represent
   devices and edges to represent the particular type of communications links of interest.
       Call Graphs




3) Information Network Graphs can be used to model various networks that link particular types of infor-
   mation. We can describe how to model the WorldWideWeb using a graph and we can also describe how
   to use a graph to model the citations in different types of documents.
       Web Graph WorldWideWeb can be modeled as a directed graph where each Web page is represented
       by a vertex and where an edge starts at the Web page a and ends at the Web page b if there is a link
       on a pointing to b.
       Citation Graphs Graphs can be used to represent citations in different types of documents, including
       academic papers, patents, and legal opinions. In such graphs, each document is represented by a

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


       vertex, and there is an edge from one document to a second document if the first document cites the
       second in its citation list.
4) Software Design Applications Graph models are useful tools in the design of software.
      Module Dependency Graphs




       Precedence Graphs




5) Transportation Network We can use graphs to model many different types of transportation networks,
   including road, air, and rail networks, as well shipping networks
6) Biological Networks Many aspects of the biological sciences can be modeled using graphs.
       Niche Overlap Graphs in Ecology




       Protein Interaction Graphs

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




7) Tournaments We now give some examples that show how graphs can also be used to model different
   kinds of tournaments.
       Round-Robin Tournaments




       Single-EliminationTournaments




Example 2 (12 points) Determine whether the graph shown has directed or undirected edges, whether it has
multiple edges, and whether it has one or more loops. Use your answers from the type of graph in Example 1.
1) Graph No.1                                             2) Graph No.2




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


3) Graph No.3                                                  5) Graph No.5




                                                               6) Graph No.6
4) Graph No.4




     2      Graph Terminology and Special Types of Graphs
1. Deffinition of Graphs
    Definition 1
    Two vertices u and v in an undirected graph G are called adjacent (or neighbors) in G if u and v are
    endpoints of an edge e of G. Such an edge e is called incident with the vertices u and v and e is said to
    connect u and v.

    Definition 2
    The set of all neighbors of a vertex v of G = (V,E), denoted by N(v), is called the neighbourhood of v. If A is
    a subset of V, we denote by N(A) the set of all vertices in G that are adjacent to at least one vertex in A.
    So, N(A) = Uv∈A N(v) .

    Definition 3
    The degree of a vertex in an undirected graph is the number of edges incident with it, except that a loop at
    a vertex contributes twice to the degree of that vertex. The degree of the vertex v is denoted by deg(v).

    Definition 4

    THE HANDSHAKING THEOREM Let G = (V ,E) be an undirected graph with m edges. Then
    3m = ∑ deg( v) .
          v∈V

    (Note that this applies even if multiple edges and loops are present.)


มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                                    เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
Graphs - 11                                                                 CSC1001 Discrete Mathematics               7
Example 3 (5 points) What are the degrees and what are the neighborhoods of the vertices in the graphs G
and H displayed in Figure?




Example 4 (2 points) How many edges are there in a graph with 10 vertices each of degree six?




Example 5 (2 points) How many edges are there in a graph with 12 vertices each of degree four?




  Definition 5
 When (u, v) is an edge of the graph G with directed edges, u is said to be adjacent to v and v is said to be
 adjacent from u. The vertex u is called the initial vertex of (u, v), and v is called the terminal or end vertex of
 (u, v). The initial vertex and terminal vertex of a loop are the same.

  Definition 6
 In a graph with directed edges the in-degree of a vertex v, denoted by deg−(v), is the number of edges with
 v as their terminal vertex. The out-degree of v, denoted by deg+(v), is the number of edges with v as their
 initial vertex. (Note that a loop at a vertex contributes 1 to both the in-degree and the out-degree of this
 vertex.)

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

Weitere ähnliche Inhalte

Was ist angesagt?

How to design a learning module: A STRUCTURED APPROACH
How to design a learning module:  A STRUCTURED APPROACHHow to design a learning module:  A STRUCTURED APPROACH
How to design a learning module: A STRUCTURED APPROACHDanny Castro
 
Introduction to Graph Theory
Introduction to Graph TheoryIntroduction to Graph Theory
Introduction to Graph TheoryYosuke Mizutani
 
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.pptxmiki304759
 
Ppt of graph theory
Ppt of graph theoryPpt of graph theory
Ppt of graph theoryArvindBorge
 
Hypothesis testing lectures
Hypothesis testing lectures Hypothesis testing lectures
Hypothesis testing lectures Sanjaya Sahoo
 
Research literature review dr majdi
Research literature review dr majdiResearch literature review dr majdi
Research literature review dr majdiDr. Majdi Al Jasim
 
Learning frameworks final project
Learning frameworks final projectLearning frameworks final project
Learning frameworks final projectRAJEIRJONES
 
Real life application
Real life applicationReal life application
Real life applicationumadeviR3
 
到底有沒有神(85)
到底有沒有神(85)到底有沒有神(85)
到底有沒有神(85)rlamtw
 
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكروDiscrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكروDr. Khaled Bakro
 
Graph theory introduction - Samy
Graph theory  introduction - SamyGraph theory  introduction - Samy
Graph theory introduction - SamyMark Arokiasamy
 
Chi squared test
Chi squared testChi squared test
Chi squared testvikas232190
 
Digital Tools for Educational Research (ICT Applications in Research)
Digital Tools for Educational Research (ICT Applications in Research)Digital Tools for Educational Research (ICT Applications in Research)
Digital Tools for Educational Research (ICT Applications in Research)Thiyagu K
 
How to Use Bibliometric Study for Writing a Paper: A Starter Guide
How to Use Bibliometric Study for Writing a Paper: A Starter GuideHow to Use Bibliometric Study for Writing a Paper: A Starter Guide
How to Use Bibliometric Study for Writing a Paper: A Starter GuideNader Ale Ebrahim
 

Was ist angesagt? (20)

Graph theory
Graph theory Graph theory
Graph theory
 
How to design a learning module: A STRUCTURED APPROACH
How to design a learning module:  A STRUCTURED APPROACHHow to design a learning module:  A STRUCTURED APPROACH
How to design a learning module: A STRUCTURED APPROACH
 
Introduction to Graph Theory
Introduction to Graph TheoryIntroduction to Graph Theory
Introduction to Graph Theory
 
Graph theory
Graph theoryGraph theory
Graph theory
 
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
 
Truth table
Truth tableTruth table
Truth table
 
Q-Q Plot | Statistics
Q-Q Plot | StatisticsQ-Q Plot | Statistics
Q-Q Plot | Statistics
 
Ppt of graph theory
Ppt of graph theoryPpt of graph theory
Ppt of graph theory
 
graph theory
graph theory graph theory
graph theory
 
Hypothesis testing lectures
Hypothesis testing lectures Hypothesis testing lectures
Hypothesis testing lectures
 
Research literature review dr majdi
Research literature review dr majdiResearch literature review dr majdi
Research literature review dr majdi
 
Learning frameworks final project
Learning frameworks final projectLearning frameworks final project
Learning frameworks final project
 
Real life application
Real life applicationReal life application
Real life application
 
到底有沒有神(85)
到底有沒有神(85)到底有沒有神(85)
到底有沒有神(85)
 
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكروDiscrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
 
Chi square
Chi squareChi square
Chi square
 
Graph theory introduction - Samy
Graph theory  introduction - SamyGraph theory  introduction - Samy
Graph theory introduction - Samy
 
Chi squared test
Chi squared testChi squared test
Chi squared test
 
Digital Tools for Educational Research (ICT Applications in Research)
Digital Tools for Educational Research (ICT Applications in Research)Digital Tools for Educational Research (ICT Applications in Research)
Digital Tools for Educational Research (ICT Applications in Research)
 
How to Use Bibliometric Study for Writing a Paper: A Starter Guide
How to Use Bibliometric Study for Writing a Paper: A Starter GuideHow to Use Bibliometric Study for Writing a Paper: A Starter Guide
How to Use Bibliometric Study for Writing a Paper: A Starter Guide
 

Ähnlich wie Discrete-Chapter 11 Graphs Part I

Slides Chapter10.1 10.2
Slides Chapter10.1 10.2Slides Chapter10.1 10.2
Slides Chapter10.1 10.2showslidedump
 
FREQUENT SUBGRAPH MINING ALGORITHMS - A SURVEY AND FRAMEWORK FOR CLASSIFICATION
FREQUENT SUBGRAPH MINING ALGORITHMS - A SURVEY AND FRAMEWORK FOR CLASSIFICATIONFREQUENT SUBGRAPH MINING ALGORITHMS - A SURVEY AND FRAMEWORK FOR CLASSIFICATION
FREQUENT SUBGRAPH MINING ALGORITHMS - A SURVEY AND FRAMEWORK FOR CLASSIFICATIONcscpconf
 
Map Coloring and Some of Its Applications
Map Coloring and Some of Its Applications Map Coloring and Some of Its Applications
Map Coloring and Some of Its Applications MD SHAH ALAM
 
Lecture 5b graphs and hashing
Lecture 5b graphs and hashingLecture 5b graphs and hashing
Lecture 5b graphs and hashingVictor Palmar
 
ON ALGORITHMIC PROBLEMS CONCERNING GRAPHS OF HIGHER DEGREE OF SYMMETRY
ON ALGORITHMIC PROBLEMS CONCERNING GRAPHS OF HIGHER DEGREE OF SYMMETRYON ALGORITHMIC PROBLEMS CONCERNING GRAPHS OF HIGHER DEGREE OF SYMMETRY
ON ALGORITHMIC PROBLEMS CONCERNING GRAPHS OF HIGHER DEGREE OF SYMMETRYFransiskeran
 
Chapter9 graph data structure
Chapter9  graph data structureChapter9  graph data structure
Chapter9 graph data structureMahmoud Alfarra
 
On algorithmic problems concerning graphs of higher degree of symmetry
On algorithmic problems concerning graphs of higher degree of symmetryOn algorithmic problems concerning graphs of higher degree of symmetry
On algorithmic problems concerning graphs of higher degree of symmetrygraphhoc
 
Skiena algorithm 2007 lecture10 graph data strctures
Skiena algorithm 2007 lecture10 graph data strcturesSkiena algorithm 2007 lecture10 graph data strctures
Skiena algorithm 2007 lecture10 graph data strctureszukun
 
Graph Introduction.ppt
Graph Introduction.pptGraph Introduction.ppt
Graph Introduction.pptFaruk Hossen
 
1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptx1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptxswapnilbs2728
 
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 ColouringSaurabh Kaushik
 
Graph theory and its applications
Graph theory and its applicationsGraph theory and its applications
Graph theory and its applicationsManikanta satyala
 
graph_theory_1-11.pdf___________________
graph_theory_1-11.pdf___________________graph_theory_1-11.pdf___________________
graph_theory_1-11.pdf___________________ssuser1989da
 
graph.pptx
graph.pptxgraph.pptx
graph.pptxhijigaf
 
Graph theory ppt.pptx
Graph theory ppt.pptxGraph theory ppt.pptx
Graph theory ppt.pptxsaranyajey
 

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

Slides Chapter10.1 10.2
Slides Chapter10.1 10.2Slides Chapter10.1 10.2
Slides Chapter10.1 10.2
 
Graph Theory
Graph TheoryGraph Theory
Graph Theory
 
FREQUENT SUBGRAPH MINING ALGORITHMS - A SURVEY AND FRAMEWORK FOR CLASSIFICATION
FREQUENT SUBGRAPH MINING ALGORITHMS - A SURVEY AND FRAMEWORK FOR CLASSIFICATIONFREQUENT SUBGRAPH MINING ALGORITHMS - A SURVEY AND FRAMEWORK FOR CLASSIFICATION
FREQUENT SUBGRAPH MINING ALGORITHMS - A SURVEY AND FRAMEWORK FOR CLASSIFICATION
 
Map Coloring and Some of Its Applications
Map Coloring and Some of Its Applications Map Coloring and Some of Its Applications
Map Coloring and Some of Its Applications
 
Graphs.pptx
Graphs.pptxGraphs.pptx
Graphs.pptx
 
Lecture 5b graphs and hashing
Lecture 5b graphs and hashingLecture 5b graphs and hashing
Lecture 5b graphs and hashing
 
ON ALGORITHMIC PROBLEMS CONCERNING GRAPHS OF HIGHER DEGREE OF SYMMETRY
ON ALGORITHMIC PROBLEMS CONCERNING GRAPHS OF HIGHER DEGREE OF SYMMETRYON ALGORITHMIC PROBLEMS CONCERNING GRAPHS OF HIGHER DEGREE OF SYMMETRY
ON ALGORITHMIC PROBLEMS CONCERNING GRAPHS OF HIGHER DEGREE OF SYMMETRY
 
Chapter9 graph data structure
Chapter9  graph data structureChapter9  graph data structure
Chapter9 graph data structure
 
On algorithmic problems concerning graphs of higher degree of symmetry
On algorithmic problems concerning graphs of higher degree of symmetryOn algorithmic problems concerning graphs of higher degree of symmetry
On algorithmic problems concerning graphs of higher degree of symmetry
 
Skiena algorithm 2007 lecture10 graph data strctures
Skiena algorithm 2007 lecture10 graph data strcturesSkiena algorithm 2007 lecture10 graph data strctures
Skiena algorithm 2007 lecture10 graph data strctures
 
Graph Introduction.ppt
Graph Introduction.pptGraph Introduction.ppt
Graph Introduction.ppt
 
1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptx1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptx
 
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
 
Graph
GraphGraph
Graph
 
Graph theory and its applications
Graph theory and its applicationsGraph theory and its applications
Graph theory and its applications
 
graph_theory_1-11.pdf___________________
graph_theory_1-11.pdf___________________graph_theory_1-11.pdf___________________
graph_theory_1-11.pdf___________________
 
Spanningtreesppt
SpanningtreespptSpanningtreesppt
Spanningtreesppt
 
gsm nithya.pdf
gsm nithya.pdfgsm nithya.pdf
gsm nithya.pdf
 
graph.pptx
graph.pptxgraph.pptx
graph.pptx
 
Graph theory ppt.pptx
Graph theory ppt.pptxGraph theory ppt.pptx
Graph theory ppt.pptx
 

Mehr von Wongyos Keardsri

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 ProgramWongyos Keardsri
 
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 applicationsWongyos 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 ProgrammingWongyos 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 SystemWongyos 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 LanguageWongyos Keardsri
 
Discrete-Chapter 11 Graphs Part III
Discrete-Chapter 11 Graphs Part IIIDiscrete-Chapter 11 Graphs Part III
Discrete-Chapter 11 Graphs Part IIIWongyos Keardsri
 
Discrete-Chapter 11 Graphs Part II
Discrete-Chapter 11 Graphs Part IIDiscrete-Chapter 11 Graphs Part II
Discrete-Chapter 11 Graphs Part IIWongyos Keardsri
 
Discrete-Chapter 09 Algorithms
Discrete-Chapter 09 AlgorithmsDiscrete-Chapter 09 Algorithms
Discrete-Chapter 09 AlgorithmsWongyos Keardsri
 
Discrete-Chapter 08 Relations
Discrete-Chapter 08 RelationsDiscrete-Chapter 08 Relations
Discrete-Chapter 08 RelationsWongyos Keardsri
 
Discrete-Chapter 07 Probability
Discrete-Chapter 07 ProbabilityDiscrete-Chapter 07 Probability
Discrete-Chapter 07 ProbabilityWongyos Keardsri
 
Discrete-Chapter 06 Counting
Discrete-Chapter 06 CountingDiscrete-Chapter 06 Counting
Discrete-Chapter 06 CountingWongyos Keardsri
 
Discrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and ProofsDiscrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and ProofsWongyos Keardsri
 
Discrete-Chapter 04 Logic Part II
Discrete-Chapter 04 Logic Part IIDiscrete-Chapter 04 Logic Part II
Discrete-Chapter 04 Logic Part IIWongyos Keardsri
 
Discrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part IDiscrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part IWongyos Keardsri
 
Discrete-Chapter 03 Matrices
Discrete-Chapter 03 MatricesDiscrete-Chapter 03 Matrices
Discrete-Chapter 03 MatricesWongyos Keardsri
 
Discrete-Chapter 02 Functions and Sequences
Discrete-Chapter 02 Functions and SequencesDiscrete-Chapter 02 Functions and Sequences
Discrete-Chapter 02 Functions and SequencesWongyos Keardsri
 
Discrete-Chapter 12 Modeling Computation
Discrete-Chapter 12 Modeling ComputationDiscrete-Chapter 12 Modeling Computation
Discrete-Chapter 12 Modeling ComputationWongyos 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 11 Graphs Part III
Discrete-Chapter 11 Graphs Part IIIDiscrete-Chapter 11 Graphs Part III
Discrete-Chapter 11 Graphs Part III
 
Discrete-Chapter 11 Graphs Part II
Discrete-Chapter 11 Graphs Part IIDiscrete-Chapter 11 Graphs Part II
Discrete-Chapter 11 Graphs Part II
 
Discrete-Chapter 10 Trees
Discrete-Chapter 10 TreesDiscrete-Chapter 10 Trees
Discrete-Chapter 10 Trees
 
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
 

Discrete-Chapter 11 Graphs Part I

  • 1. Graphs - 11 CSC1001 Discrete Mathematics 1 CHAPTER กราฟ 11 (Graphs) 1 Introduction to Graphs and Graph Models 1. Deffinition of Graphs Definition 1 A graph G = (V,E) consists of V , a nonempty set of vertices (or nodes) and E, a set of edges. Each edge has either one or two vertices associated with it, called its endpoints. An edge is said to connect its endpoints. Types of Graphs 1) A graph in which each edge connects two different vertices and where no two edges connect the same pair of vertices is called a simple graph. 2) A graphs that may have multiple edges connecting the same vertices are called multigraphs. 3) A graphs that may include loops, and possibly multiple edges connecting the same pair of vertices or a vertex to itself, are sometimes called pseudographs. มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 2. 2 CSC1001 Discrete Mathematics 11 - Graphs 4) From types of graphs in type 1-3 are undirected graphs. However, to construct a graph model, we may find it necessary to assign directions to the edges of a graph. This is called a directed graph (or digraph). We directed graph A directed graph which has no loops and has no multiple directed edges is called a simple directed graph. A directed graph that may have multiple directed edges from a vertex to a second (possibly the same) vertex is called directed multigraphs. 5) A graph with both directed and undirected edges is called a mixed graph. Example 1 (6 points) Identify the properties of graph terminology in the blank from the table. Multiple Edges Loops No. Type Edges Allowed? Allowed? 1. Simple graph 2. Multigraph 3. Pseudograph 4. Simple directed graph 5. Directed multigraph 6. Mixed graph 2. Graph Models Graphs are used in a wide variety of models. Can you find a subject to which graph theory has been or has not been applied? 1) Social Networks Graphs are extensively used to model social structures based on different kinds of relationships between people or groups of people. In these graph models, individuals or organizations are represented by vertices; relationships between individuals or organizations are represented by edges. มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 3. Graphs - 11 CSC1001 Discrete Mathematics 3 Acquaintanceship and Friendship Graphs Influence Graphs 2) Communication Network We can model different communications networks using vertices to represent devices and edges to represent the particular type of communications links of interest. Call Graphs 3) Information Network Graphs can be used to model various networks that link particular types of infor- mation. We can describe how to model the WorldWideWeb using a graph and we can also describe how to use a graph to model the citations in different types of documents. Web Graph WorldWideWeb can be modeled as a directed graph where each Web page is represented by a vertex and where an edge starts at the Web page a and ends at the Web page b if there is a link on a pointing to b. Citation Graphs Graphs can be used to represent citations in different types of documents, including academic papers, patents, and legal opinions. In such graphs, each document is represented by a มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 4. 4 CSC1001 Discrete Mathematics 11 - Graphs vertex, and there is an edge from one document to a second document if the first document cites the second in its citation list. 4) Software Design Applications Graph models are useful tools in the design of software. Module Dependency Graphs Precedence Graphs 5) Transportation Network We can use graphs to model many different types of transportation networks, including road, air, and rail networks, as well shipping networks 6) Biological Networks Many aspects of the biological sciences can be modeled using graphs. Niche Overlap Graphs in Ecology Protein Interaction Graphs มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 5. Graphs - 11 CSC1001 Discrete Mathematics 5 7) Tournaments We now give some examples that show how graphs can also be used to model different kinds of tournaments. Round-Robin Tournaments Single-EliminationTournaments Example 2 (12 points) Determine whether the graph shown has directed or undirected edges, whether it has multiple edges, and whether it has one or more loops. Use your answers from the type of graph in Example 1. 1) Graph No.1 2) Graph No.2 มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 6. 6 CSC1001 Discrete Mathematics 11 - Graphs 3) Graph No.3 5) Graph No.5 6) Graph No.6 4) Graph No.4 2 Graph Terminology and Special Types of Graphs 1. Deffinition of Graphs Definition 1 Two vertices u and v in an undirected graph G are called adjacent (or neighbors) in G if u and v are endpoints of an edge e of G. Such an edge e is called incident with the vertices u and v and e is said to connect u and v. Definition 2 The set of all neighbors of a vertex v of G = (V,E), denoted by N(v), is called the neighbourhood of v. If A is a subset of V, we denote by N(A) the set of all vertices in G that are adjacent to at least one vertex in A. So, N(A) = Uv∈A N(v) . Definition 3 The degree of a vertex in an undirected graph is the number of edges incident with it, except that a loop at a vertex contributes twice to the degree of that vertex. The degree of the vertex v is denoted by deg(v). Definition 4 THE HANDSHAKING THEOREM Let G = (V ,E) be an undirected graph with m edges. Then 3m = ∑ deg( v) . v∈V (Note that this applies even if multiple edges and loops are present.) มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 7. Graphs - 11 CSC1001 Discrete Mathematics 7 Example 3 (5 points) What are the degrees and what are the neighborhoods of the vertices in the graphs G and H displayed in Figure? Example 4 (2 points) How many edges are there in a graph with 10 vertices each of degree six? Example 5 (2 points) How many edges are there in a graph with 12 vertices each of degree four? Definition 5 When (u, v) is an edge of the graph G with directed edges, u is said to be adjacent to v and v is said to be adjacent from u. The vertex u is called the initial vertex of (u, v), and v is called the terminal or end vertex of (u, v). The initial vertex and terminal vertex of a loop are the same. Definition 6 In a graph with directed edges the in-degree of a vertex v, denoted by deg−(v), is the number of edges with v as their terminal vertex. The out-degree of v, denoted by deg+(v), is the number of edges with v as their initial vertex. (Note that a loop at a vertex contributes 1 to both the in-degree and the out-degree of this vertex.) มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี