Top Banner
TABLE 1: Graph Terminology Type Edges Multiple Edges Allowed? Loops Allowed? Simple graph Undirected No No Multigraph Undirected Yes No Pseudograph Undirected Yes Yes Simple directed graph Directed No No Directed multigraph Directed Yes Yes Mixed Graph Directed and Undirected Yes Yes 9.1 Introduction to Graphs
19

TABLE 1: Graph Terminology TypeEdgesMultiple Edges Allowed? Loops Allowed? Simple graphUndirectedNo MultigraphUndirectedYesNo PseudographUndirectedYes.

Jan 03, 2016

Download

Documents

Jemimah Lewis
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: TABLE 1: Graph Terminology TypeEdgesMultiple Edges Allowed? Loops Allowed? Simple graphUndirectedNo MultigraphUndirectedYesNo PseudographUndirectedYes.

TABLE 1: Graph Terminology

Type Edges Multiple Edges Allowed?

Loops Allowed?

Simple graph Undirected No No

Multigraph Undirected Yes No

Pseudograph Undirected Yes Yes

Simple directed graph Directed No No

Directed multigraph Directed Yes Yes

Mixed Graph Directed and Undirected Yes Yes

9.1 Introduction to Graphs

Page 2: TABLE 1: Graph Terminology TypeEdgesMultiple Edges Allowed? Loops Allowed? Simple graphUndirectedNo MultigraphUndirectedYesNo PseudographUndirectedYes.

Graph Models

• Graphs are used extensively for modeling real-world phenomena

• Example: – Vertices are states of the US. Edge between

v and w if v shares a border with w.

Page 3: TABLE 1: Graph Terminology TypeEdgesMultiple Edges Allowed? Loops Allowed? Simple graphUndirectedNo MultigraphUndirectedYesNo PseudographUndirectedYes.

More Examples• “Friend” graph for Facebook connections• Computer networks• Cities and highway routes• Cities and airline flights• Round robin tournaments, “defeated”• Statements in a program, “must be

executed before”• Telephone calls made in a network (“Call”

graph)

Page 4: TABLE 1: Graph Terminology TypeEdgesMultiple Edges Allowed? Loops Allowed? Simple graphUndirectedNo MultigraphUndirectedYesNo PseudographUndirectedYes.

Precedence Graphs Elaborated

S1 a:=0

S2 b:=1

S3 c:=a+1

S4 d:=b+a

S5 e:=d+1

S6 e:=c+d

Page 5: TABLE 1: Graph Terminology TypeEdgesMultiple Edges Allowed? Loops Allowed? Simple graphUndirectedNo MultigraphUndirectedYesNo PseudographUndirectedYes.

9.2 Graph Terminology• Terms

– Adjacent:

– Incident:

− Degree:

– Isolated:

– Pendant:

Page 6: TABLE 1: Graph Terminology TypeEdgesMultiple Edges Allowed? Loops Allowed? Simple graphUndirectedNo MultigraphUndirectedYesNo PseudographUndirectedYes.

Example:

1. A is adjacent to

2. The degree of vertex b is

3. The pendant vertices of the graph are

Page 7: TABLE 1: Graph Terminology TypeEdgesMultiple Edges Allowed? Loops Allowed? Simple graphUndirectedNo MultigraphUndirectedYesNo PseudographUndirectedYes.

The Handshaking Theorem

Let G be a pseudograph with vertex set V and edge set E. Suppose there are e edges, i.e. |E| = e. Then

In other words, “the sum of the degrees of the vertices is twice the number of edges.”

Vv

ev 2deg

Page 8: TABLE 1: Graph Terminology TypeEdgesMultiple Edges Allowed? Loops Allowed? Simple graphUndirectedNo MultigraphUndirectedYesNo PseudographUndirectedYes.

Corollary: An undirected graph has an even number of vertices of odd degree.

Page 9: TABLE 1: Graph Terminology TypeEdgesMultiple Edges Allowed? Loops Allowed? Simple graphUndirectedNo MultigraphUndirectedYesNo PseudographUndirectedYes.

Directed Graph Terminology

• Initial vertex, terminal vertex

• Indegree

• Outdegree

Page 10: TABLE 1: Graph Terminology TypeEdgesMultiple Edges Allowed? Loops Allowed? Simple graphUndirectedNo MultigraphUndirectedYesNo PseudographUndirectedYes.

Example:

Page 11: TABLE 1: Graph Terminology TypeEdgesMultiple Edges Allowed? Loops Allowed? Simple graphUndirectedNo MultigraphUndirectedYesNo PseudographUndirectedYes.

“Handshaking Theorem” for Directed Graphs

Let G be a directed multigraph with vertex set V and edge set E. Suppose there are e edges, i.e. |E| = e. Then

In other words, “the sum of the indegrees of the vertices is equal to the sum of the outdegrees of the vertices, and both are equal to the number of edges.”

VvVv

evv degdeg

Page 12: TABLE 1: Graph Terminology TypeEdgesMultiple Edges Allowed? Loops Allowed? Simple graphUndirectedNo MultigraphUndirectedYesNo PseudographUndirectedYes.

The “Underlying Undirected Graph”

Page 13: TABLE 1: Graph Terminology TypeEdgesMultiple Edges Allowed? Loops Allowed? Simple graphUndirectedNo MultigraphUndirectedYesNo PseudographUndirectedYes.

Complete Graphs

A simple undirected graph is a complete graph if all possible edges are present.

Page 14: TABLE 1: Graph Terminology TypeEdgesMultiple Edges Allowed? Loops Allowed? Simple graphUndirectedNo MultigraphUndirectedYesNo PseudographUndirectedYes.

Other Specialized Graphs

• The Cycle Cn

• The Wheel Wn

• The n-Cube Qn

Page 15: TABLE 1: Graph Terminology TypeEdgesMultiple Edges Allowed? Loops Allowed? Simple graphUndirectedNo MultigraphUndirectedYesNo PseudographUndirectedYes.

Bipartite Graphs

• A graph G = (V,E) is said to be bipartite if and only if there is a two set partition {V1, V2} of V such that every edge e in E has one of its endpoints in V1 and the other in V2.

Page 16: TABLE 1: Graph Terminology TypeEdgesMultiple Edges Allowed? Loops Allowed? Simple graphUndirectedNo MultigraphUndirectedYesNo PseudographUndirectedYes.

The Complete Bipartite Graph Kmn

𝐾 2,3 𝐾 2,1

Page 17: TABLE 1: Graph Terminology TypeEdgesMultiple Edges Allowed? Loops Allowed? Simple graphUndirectedNo MultigraphUndirectedYesNo PseudographUndirectedYes.

Bipartite Graphs

• Theorem: A simple graph is bipartite if and only if it is possible to assign one of two different colors to each vertex of the graph so that no two adjacent vertices are assigned the same color

Page 18: TABLE 1: Graph Terminology TypeEdgesMultiple Edges Allowed? Loops Allowed? Simple graphUndirectedNo MultigraphUndirectedYesNo PseudographUndirectedYes.

Subgraphs, Unions, Intersections, and Complements

• A graph G = (V′, E′) is a subgraph of graph H= (V,E) if and only if V′ V and E′ E.

• The union of two graphs is formed using the union of the two vertex sets and the union of the two edge sets.

• The intersection Is defined similarly.• The complement of a graph is the graph

which is formed using the same vertex set as the original graph , but which has an edge between two vertices if and only if the original graph does not have such an edge.

Page 19: TABLE 1: Graph Terminology TypeEdgesMultiple Edges Allowed? Loops Allowed? Simple graphUndirectedNo MultigraphUndirectedYesNo PseudographUndirectedYes.

Examples: