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

More Related Content

PDF
Introduction to Graph Theory
PPTX
Interesting applications of graph theory
PPTX
Applications of graph theory
PPT
Graph theory
PDF
Graph Theory: Cut-Set and Cut-Vertices
PPT
Graph theory presentation
PDF
introduction to graph theory
PDF
Graph theory in network system
Introduction to Graph Theory
Interesting applications of graph theory
Applications of graph theory
Graph theory
Graph Theory: Cut-Set and Cut-Vertices
Graph theory presentation
introduction to graph theory
Graph theory in network system

What's hot (20)

PPTX
Graph theory
PDF
Graph theory and its applications
PPT
Engineering Mathematics - Total derivatives, chain rule and derivative of imp...
PPTX
Graph terminologies & special type graphs
PPTX
Graph theory
PPTX
Applied Calculus Chapter 3 partial derivatives
 
PPTX
Gaussian Quadrature Formula
PPTX
Graph Theory
PPT
Applications of graphs
PPT
Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
PPTX
Application Of Graph Data Structure
PDF
graph-theory-Slides.pdf
PPT
SINGLE-SOURCE SHORTEST PATHS
PDF
Inner product spaces
PPT
Integration and its basic rules and function.
PPTX
Implicit function and Total derivative
PPTX
Graph Theory
PDF
Number theory
PPT
graph.ppt
PDF
Map Coloring and Some of Its Applications
Graph theory
Graph theory and its applications
Engineering Mathematics - Total derivatives, chain rule and derivative of imp...
Graph terminologies & special type graphs
Graph theory
Applied Calculus Chapter 3 partial derivatives
 
Gaussian Quadrature Formula
Graph Theory
Applications of graphs
Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
Application Of Graph Data Structure
graph-theory-Slides.pdf
SINGLE-SOURCE SHORTEST PATHS
Inner product spaces
Integration and its basic rules and function.
Implicit function and Total derivative
Graph Theory
Number theory
graph.ppt
Map Coloring and Some of Its Applications
Ad

Similar to Discrete-Chapter 11 Graphs Part I (20)

PPTX
Slides Chapter10.1 10.2
PDF
FREQUENT SUBGRAPH MINING ALGORITHMS - A SURVEY AND FRAMEWORK FOR CLASSIFICATION
PDF
unit-3-dsa-graph introduction to grapgh and graph type
PPTX
Chapter10.pptx jtuffuryrufhrhrurrufudurhrhr
PPT
Graph theory concepts complex networks presents-rouhollah nabati
PPTX
Graphs.pptx
PPT
Lecture 5b graphs and hashing
PDF
ON ALGORITHMIC PROBLEMS CONCERNING GRAPHS OF HIGHER DEGREE OF SYMMETRY
PPT
Chapter9 graph data structure
PDF
On algorithmic problems concerning graphs of higher degree of symmetry
PPTX
Data Structures and Agorithm: DS 21 Graph Theory.pptx
PDF
Skiena algorithm 2007 lecture10 graph data strctures
PDF
On Algorithmic Problems Concerning Graphs of Higher Degree of Symmetry
PPT
Graph Introduction.ppt
PPTX
1. Graph and Graph Terminologiesimp.pptx
PPTX
Graph Theory,Graph Terminologies,Planar Graph & Graph Colouring
PPTX
Graph Theory in Theoretical computer science
DOCX
PDF
graph_theory_1-11.pdf___________________
PPTX
Spanningtreesppt
Slides Chapter10.1 10.2
FREQUENT SUBGRAPH MINING ALGORITHMS - A SURVEY AND FRAMEWORK FOR CLASSIFICATION
unit-3-dsa-graph introduction to grapgh and graph type
Chapter10.pptx jtuffuryrufhrhrurrufudurhrhr
Graph theory concepts complex networks presents-rouhollah nabati
Graphs.pptx
Lecture 5b graphs and hashing
ON ALGORITHMIC PROBLEMS CONCERNING GRAPHS OF HIGHER DEGREE OF SYMMETRY
Chapter9 graph data structure
On algorithmic problems concerning graphs of higher degree of symmetry
Data Structures and Agorithm: DS 21 Graph Theory.pptx
Skiena algorithm 2007 lecture10 graph data strctures
On Algorithmic Problems Concerning Graphs of Higher Degree of Symmetry
Graph Introduction.ppt
1. Graph and Graph Terminologiesimp.pptx
Graph Theory,Graph Terminologies,Planar Graph & Graph Colouring
Graph Theory in Theoretical computer science
graph_theory_1-11.pdf___________________
Spanningtreesppt
Ad

More from Wongyos Keardsri (20)

PDF
How to Study and Research in Computer-related Master Program
PPT
The next generation intelligent transport systems: standards and applications
PPT
IP address anonymization
PDF
SysProg-Tutor 03 Unix Shell Script Programming
PDF
SysProg-Tutor 02 Introduction to Unix Operating System
PDF
SysProg-Tutor 01 Introduction to C Programming Language
PDF
Discrete-Chapter 11 Graphs Part III
PDF
Discrete-Chapter 11 Graphs Part II
PDF
Discrete-Chapter 10 Trees
PDF
Discrete-Chapter 09 Algorithms
PDF
Discrete-Chapter 08 Relations
PDF
Discrete-Chapter 07 Probability
PDF
Discrete-Chapter 06 Counting
PDF
Discrete-Chapter 05 Inference and Proofs
PDF
Discrete-Chapter 04 Logic Part II
PDF
Discrete-Chapter 04 Logic Part I
PDF
Discrete-Chapter 03 Matrices
PDF
Discrete-Chapter 02 Functions and Sequences
PDF
Discrete-Chapter 01 Sets
PDF
Discrete-Chapter 12 Modeling Computation
How to Study and Research in Computer-related Master Program
The next generation intelligent transport systems: standards and applications
IP address anonymization
SysProg-Tutor 03 Unix Shell Script Programming
SysProg-Tutor 02 Introduction to Unix Operating System
SysProg-Tutor 01 Introduction to C Programming Language
Discrete-Chapter 11 Graphs Part III
Discrete-Chapter 11 Graphs Part II
Discrete-Chapter 10 Trees
Discrete-Chapter 09 Algorithms
Discrete-Chapter 08 Relations
Discrete-Chapter 07 Probability
Discrete-Chapter 06 Counting
Discrete-Chapter 05 Inference and Proofs
Discrete-Chapter 04 Logic Part II
Discrete-Chapter 04 Logic Part I
Discrete-Chapter 03 Matrices
Discrete-Chapter 02 Functions and Sequences
Discrete-Chapter 01 Sets
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) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี