discrete-chapter 11 graphs part i

7
1 มหาวิทยาลัยราชภัฏสวนสุนันทา (ภาคการศึกษาที2/2555) เรียบเรียงโดย .วงศ์ยศ เกิดศรี CSC1001 Discrete Mathematics Graphs - 11 1. Deffinition of Graphs 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. CHAPTER 11 กราฟ (Graphs) Introduction to Graphs and Graph Models 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. Definition 1

Upload: wongyos-keardsri

Post on 25-May-2015

342 views

Category:

Documents


7 download

TRANSCRIPT

Page 1: Discrete-Chapter 11 Graphs Part I

1

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

CSC1001 Discrete Mathematics Graphs - 11

1. Deffinition of Graphs

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.

CHAPTER

11

กราฟ

(Graphs)

Introduction to Graphs and Graph Models 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.

Definition 1

Page 2: Discrete-Chapter 11 Graphs Part I

2

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

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.

No. Type Edges Multiple Edges

Allowed? Loops

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.

Page 3: Discrete-Chapter 11 Graphs Part I

3

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

CSC1001 Discrete Mathematics Graphs - 11

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

Page 4: Discrete-Chapter 11 Graphs Part I

4

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

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

Page 5: Discrete-Chapter 11 Graphs Part I

5

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

CSC1001 Discrete Mathematics Graphs - 11

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

Page 6: Discrete-Chapter 11 Graphs Part I

6

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

CSC1001 Discrete Mathematics 11 - Graphs

3) Graph No.3

4) Graph No.4

5) Graph No.5

6) Graph No.6

1. Deffinition of Graphs

Graph Terminology and Special Types of Graphs2

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 1

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, U Av

N(v))A(N∈

= .

Definition 2

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 3

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

∑∈

=Vv

)vdeg(m3 .

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

Definition 4

Page 7: Discrete-Chapter 11 Graphs Part I

7

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

CSC1001 Discrete Mathematics Graphs - 11

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?

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 5

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

Definition 6