0% found this document useful (0 votes)
112 views

Graph Terminology and Special Types of Graphs

The document defines key graph terminology including vertices, edges, adjacency, degrees, neighborhoods, isolated and pendant vertices. It also discusses special types of graphs such as complete graphs, bipartite graphs, and representing graphs using adjacency lists. Key concepts covered include undirected vs. directed graphs, in-degrees and out-degrees of vertices in directed graphs, and the conditions for graphs to be bipartite.

Uploaded by

maligaya evelyn
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
112 views

Graph Terminology and Special Types of Graphs

The document defines key graph terminology including vertices, edges, adjacency, degrees, neighborhoods, isolated and pendant vertices. It also discusses special types of graphs such as complete graphs, bipartite graphs, and representing graphs using adjacency lists. Key concepts covered include undirected vs. directed graphs, in-degrees and out-degrees of vertices in directed graphs, and the conditions for graphs to be bipartite.

Uploaded by

maligaya evelyn
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

Graph Terminology

and Special Types of


Graphs
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.
2
The set of all neighbors of a vertex
v of G = (V ,E), denoted by N(v), is
called the neighborhood 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) = v∈A N(v).
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).
4
What are the degrees and what are the
neighborhoods of the vertices in the
graphs G and H displayed in Figure 1?

5
Solution: In G, deg(a) = 2, deg(b) = deg(c) = deg(f ) = 4, deg(d ) = 1,
deg(e) = 3, and deg(g) = 0. The neighborhoods of these vertices are
N(a) = {b, f }, N(b) = {a, c, e, f }, N(c) = {b, d, e, f }, N(d) = {c},
N(e) = {b, c, f }, N(f ) = {a, b, c, e}, and N(g) = ∅. In H, deg(a) = 4,
deg(b) = deg(e) = 6, deg(c) = 1, and deg(d ) = 5. The neighborhoods
of these vertices are N(a) = {b, d, e}, N(b) = {a, b, c, d, e}, N(c) =
{b}, N(d) = {a, b, e}, and N(e) = {a, b, d}.

6
A vertex of degree zero is called isolated. It
follows that an isolated vertex is not adjacent
to any vertex. Vertex g in graph G in
Example 1 is isolated.

7
A vertex is pendant if and only if it has
degree one. Consequently, a pendant vertex is
adjacent to exactly one other vertex.
Vertex d in graph G in Example 1 is pendant.

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

(Note that this applies even if multiple


edges and loops are present.)
9
How many edges are there in a graph
with 10 vertices each of degree six?
Solution: Because the sum of the
degrees of the vertices is 6 ・ 10 =
60, it follows that 2m = 60 where m
is the number of edges.
Therefore, m = 30. 10
An undirected graph
has an even
number of vertices
of odd degree.
11
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.
12
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.)
13
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.)
14
Find the in-degree and out-degree of each
vertex in the graph G with directed edges
shown in Figure.

15
Solution:
The in-degrees in G are deg−(a) = 2, deg−(b) = 2, deg−(c)
= 3, deg−(d) = 2,deg−(e) = 3, and deg−(f ) = 0. The out-
degrees are deg+(a) = 4, deg+(b) = 1, deg+(c) = 2,deg+(d)
= 2, deg+(e) = 3, and deg+(f ) = 0.

16
The undirected graph that results
from ignoring directions of edges
is called the underlying
undirected graph. A graph with
directed edges and its underlying
undirected graph have the same
number of edges. 17
Some Special
Simple Graphs
A complete graph on n
vertices, denoted by Kn, is a
simple graph that contains
exactly one edge between
each pair of distinct vertices.
19
A simple graph for which
there is at least one pair of
distinct vertex not
connected by an edge is
called noncomplete.
20
The graphs Kn, for n = 1, 2, 3, 4,
5, 6, are displayed in the given
Figure

21
Bipartite
Graphs
Sometimes a graph has the
property that its vertex set can be
divided into two disjoint subsets
such that each edge connects a
vertex in one of these subsets to
a vertex in the other subset.
23
A simple graph G is called bipartite if its vertex
set V can be partitioned into two disjoint sets
V1 and V2 such that every edge in the graph
connects a vertex in V1 and a vertex in V2 (so
that no edge in G connects either two vertices
in V1 or two vertices in V2). When this
condition holds, we call the pair (V1, V2) a
bipartition of the vertex set V of G.
24
Representing
Graphs and Graph
Isomorphism
Sometimes, two graphs have
exactly the same form, in the
sense that there is a one-to-one
correspondence between their
vertex sets that preserves edges.
In such a case, we say that the
two graphs are isomorphic.
26
Representing Graphs
One way to represent a graph without
multiple edges is to list all the edges of
this graph. Another way to represent a
graph with no multiple edges is to use
adjacency lists, which specify the
vertices that are adjacent to each vertex
of the graph.
27
Use adjacency lists
An Adjacency List for a
to describe the Simple Graph
simple graph given
in Figure 1

28
Represent the directed
graph shown in by listing
An Adjacency List for a
all the vertices that are
the terminal vertices of
Directed Graph
edges starting at each
vertex of the graph.

29

You might also like