0% found this document useful (0 votes)
40 views22 pages

By Rajanikanth B

This document defines basic graph terminology: - Graphs consist of vertices and edges connecting pairs of vertices. Edges can be directed or undirected. - Adjacent vertices are connected by an edge. Incident edges connect to a vertex. - The degree of a vertex is the number of incident edges. In-degree and out-degree refer to directed graphs. - Parallel edges connect the same pair of vertices, while self-loops connect a vertex to itself. Simple graphs have no parallel edges or self-loops. - A path through a graph is a sequence of alternating vertices and edges that starts and ends at vertices.

Uploaded by

Danish Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views22 pages

By Rajanikanth B

This document defines basic graph terminology: - Graphs consist of vertices and edges connecting pairs of vertices. Edges can be directed or undirected. - Adjacent vertices are connected by an edge. Incident edges connect to a vertex. - The degree of a vertex is the number of incident edges. In-degree and out-degree refer to directed graphs. - Parallel edges connect the same pair of vertices, while self-loops connect a vertex to itself. Simple graphs have no parallel edges or self-loops. - A path through a graph is a sequence of alternating vertices and edges that starts and ends at vertices.

Uploaded by

Danish Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPSX, PDF, TXT or read online on Scribd
You are on page 1/ 22

By

Rajanikanth B
Introduction
• A graph G is simply a set V of vertices and a
collection E of pairs of vertices from V, called
edges.
• Some books use different terminology for
graphs and refer to what we call vertices as
nodes and what we call edges as arcs.
• Edges in a graph are either directed or undirected.
• An edge (u,v) is said to be directed from u to v if
the pair (u,v) is ordered, with u preceding v.
• An edge (u,v) is said to be undirected if the pair
(u,v) is not ordered.
• Undirected edges are sometimes denoted with set
notation, as {u,v}, but for simplicity we use the pair
notation (u,v), noting that in the undirected case
(u,v) is the same as (v,u).
• If all the edges in a graph are undirected, then
we say the graph is an undirected graph.

• a directed graph, also called a digraph, is a


graph whose edges are all directed.

• A graph that has both directed and undirected


edges is often called a mixed graph.
vertices

Edges

Directed
Edge
• The two vertices joined by an edge are called
the end vertices (or endpoints) of the edge.
• If an edge is directed, its first endpoint is its
origin and the other is the destination of the
edge.
• Two vertices u and v are said to be adjacent if
there is an edge whose end vertices are u and v.
• An edge is said to be incident on a vertex if the
vertex is one of the edge’s endpoints.
• The outgoing edges of a vertex are the directed
edges whose origin is that vertex. The incoming
edges of a vertex are the directed edges whose
destination is that vertex.
adjacent

Incoming
Edges 2

Incident 3

Outgoing
Edges 2
• The degree of a vertex v, denoted deg(v), is
the number of incident edges of v. The in-
degree and out-degree of a vertex v are the
number of the incoming and outgoing edges
of v, and are denoted indeg(v) and outdeg(v),
respectively.
Allowing for two undirected edges to have the same end
vertices, and for two directed edges to have the same origin
and the same destination. Such edges are called parallel
edges or multiple edges.

A B

D C
An edge (undirected or directed) is a self-loop if its
two endpoints coincide

A graphs do not have parallel edges or self-loops such


graphs are said to be simple.

A path is a sequence of alternating vertices and edges


that starts at a vertex and ends at a vertex such that
each edge is incident to its predecessor and successor
vertex.
self-loop A B

D C

A B
simple

D C
A B

D C
A B

D C
A B

D C
A B

D C
A B

C D
A B

C D
A B C

D E F

G H I

A D E B G C F H I
A B C

D E F

G H I
A B C

D E F I
HE
G H I G
CF
D
B
A

You might also like