Graph Theory Introduction L 1 PDF
Graph Theory Introduction L 1 PDF
Graphs
Definition: A graph G = (V, E) consists of a
nonempty set V of vertices (or nodes) and a set
E of edges. Each edge has either one or two
vertices associated with it, called its endpoints.
An edge is said to connect its endpoints.
Example: This is a graph with four vertices and five edges.
a b
d c
Remarks:
We have a lot of freedom when we draw a picture of a
graph. All that matters is the connections made by the
edges, not the particular geometry depicted. For example,
the lengths of edges, whether edges cross, how vertices are
depicted, and so on, do not matter
A graph with an infinite vertex set is called an infinite
graph. A graph with a finite vertex set is called a finite
graph. We restrict our attention to finite graphs.
Some Terminology
• In a simple graph each edge connects two
different vertices and no two edges connect
the same pair of vertices.
• Multigraphs may have multiple edges
connecting the same two vertices. When m
different edges connect the vertices u and v,
we say that {u,v} is an edge of multiplicity m.
Some Terminology
• An edge that connects a vertex to itself is
called a loop.
• A pseudo graph may include loops, as well as
multiple edges connecting the same pair of
vertices.
Example:
c
Directed Graphs
Definition: An directed graph (or digraph) G = (V, E)
consists of a nonempty set V of vertices (or
nodes) and a set E of directed edges (or arcs).
Each edge is associated with an ordered pair of
vertices. The directed edge associated with the
ordered pair (u,v) is said to start at u and end at
v.
Remark:
– Graphs where the end points of an edge are not
ordered are said to be undirected graphs.
Let (u,v) be an edge in G. Then u is the initial
vertex of this edge and is adjacent to v and v is
the terminal (or end) vertex of this edge and is
adjacent from u. The initial and terminal vertices
of a loop are the same.
Some Terminology (continued)
A simple directed graph has no loops and no
multiple edges.
b
a
c
Example:
Example:
a b
Proof:
Each edge contributes twice to the degree
count of all vertices. Hence, both the left-hand
and right-hand sides of this equation equal
twice the number of edges.
Handshaking Theorem
Example: How many edges are there in a graph with
10 vertices of degree six?
Solution: Because the sum of the degrees of the
vertices is 6 10 = 60, the handshaking
theorem tells us that 2m = 60. So the number of
edges m = 30.