SlideShare uma empresa Scribd logo
1 de 7
Baixar para ler offline
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)                                    เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี

Mais conteúdo relacionado

Mais procurados

Многокутник і його елементи. Опуклі й неопуклі многокутники
Многокутник і його елементи. Опуклі й неопуклі многокутникиМногокутник і його елементи. Опуклі й неопуклі многокутники
Многокутник і його елементи. Опуклі й неопуклі многокутники
sveta7940
 
десяткові дроби
десяткові дробидесяткові дроби
десяткові дроби
InnaSkarvinko
 
презентація до уроку №3.поняття про статистику.
презентація до уроку  №3.поняття про статистику.презентація до уроку  №3.поняття про статистику.
презентація до уроку №3.поняття про статистику.
NataKvasha
 
Презентація:"Додавання і віднімання дробів з однаковими знаменниками"
Презентація:"Додавання і віднімання дробів з однаковими знаменниками"Презентація:"Додавання і віднімання дробів з однаковими знаменниками"
Презентація:"Додавання і віднімання дробів з однаковими знаменниками"
sveta7940
 
Appilation of matrices in real life
Appilation of matrices in real lifeAppilation of matrices in real life
Appilation of matrices in real life
Student
 

Mais procurados (14)

Многокутник і його елементи. Опуклі й неопуклі многокутники
Многокутник і його елементи. Опуклі й неопуклі многокутникиМногокутник і його елементи. Опуклі й неопуклі многокутники
Многокутник і його елементи. Опуклі й неопуклі многокутники
 
Правильні многогранники
Правильні многогранники Правильні многогранники
Правильні многогранники
 
Binomial
BinomialBinomial
Binomial
 
десяткові дроби
десяткові дробидесяткові дроби
десяткові дроби
 
TOPOLOGY
TOPOLOGYTOPOLOGY
TOPOLOGY
 
Graph Theory: Matrix representation of graphs
Graph Theory: Matrix representation of graphsGraph Theory: Matrix representation of graphs
Graph Theory: Matrix representation of graphs
 
презентація до уроку №3.поняття про статистику.
презентація до уроку  №3.поняття про статистику.презентація до уроку  №3.поняття про статистику.
презентація до уроку №3.поняття про статистику.
 
Matrix in software engineering
Matrix in software engineeringMatrix in software engineering
Matrix in software engineering
 
Bba i-bm-u-2- matrix -
Bba i-bm-u-2- matrix -Bba i-bm-u-2- matrix -
Bba i-bm-u-2- matrix -
 
к.р. 9 кл
к.р. 9 клк.р. 9 кл
к.р. 9 кл
 
вписані та описані чотирикутники
вписані та описані чотирикутники вписані та описані чотирикутники
вписані та описані чотирикутники
 
Презентація:"Додавання і віднімання дробів з однаковими знаменниками"
Презентація:"Додавання і віднімання дробів з однаковими знаменниками"Презентація:"Додавання і віднімання дробів з однаковими знаменниками"
Презентація:"Додавання і віднімання дробів з однаковими знаменниками"
 
Graph Theory
Graph TheoryGraph Theory
Graph Theory
 
Appilation of matrices in real life
Appilation of matrices in real lifeAppilation of matrices in real life
Appilation of matrices in real life
 

Semelhante a Discrete-Chapter 11 Graphs Part I

Slides Chapter10.1 10.2
Slides Chapter10.1 10.2Slides Chapter10.1 10.2
Slides Chapter10.1 10.2
showslidedump
 
Lecture 5b graphs and hashing
Lecture 5b graphs and hashingLecture 5b graphs and hashing
Lecture 5b graphs and hashing
Victor 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 symmetry
graphhoc
 
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
zukun
 
1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptx1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptx
swapnilbs2728
 

Semelhante a 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
 
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
 
Graph theory concepts complex networks presents-rouhollah nabati
Graph theory concepts   complex networks presents-rouhollah nabatiGraph theory concepts   complex networks presents-rouhollah nabati
Graph theory concepts complex networks presents-rouhollah nabati
 
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
 

Mais de 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 11 Graphs Part III
Discrete-Chapter 11 Graphs Part IIIDiscrete-Chapter 11 Graphs Part III
Discrete-Chapter 11 Graphs Part III
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
 

Mais de 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 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
 
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
 

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) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี