s9.1 Graphs and Models
s9.1 Graphs and Models
s9.1 Graphs and Models
Definition
Let V be a set and u and v be two elements belonging to this set.
A pair in V is a set of two elements of V . In other words, a pair in
V is a set {u, v } such as u, v ∈ V .
Remarks:
The two pairs {u, v } and {v , u} are identical; the order of the
elements in the set has no significance.
The pair {u, v } implies that u 6= v .
The pair {u, u} is written like a singleton {u}.
Definition
The ordered pair (u, v ) is the ordered collection that has u as its
first element and v as its second element.
V × V = {(u, v ) | u ∈ V ∧ v ∈ V }.
Remarks:
Two ordered pairs are equal only if the corresponding
elements are equal.
There is an order: (u, v ) 6= (v , u).
The ordered pair (u, u) is an element of the set V × V .
Definition
A simple graph G = (V , E ) consists of a non empty set V of
vertices and a set E of edges made of pairs of distinct elements of
V.
Remarks:
E = {{u, v } | u, v ∈ V ∧ u 6= v }.
Edges are not directed.
A simple graph is also a undirected graph.
There can not be more than one edge between two vertices.
There can not be a loop.
Definition
A multigraph G = (V , E ) consists of a non empty set V of
vertices, a set E of edges made of pairs of distinct elements of V ,
and a function f from E to {{u, v } | u, v ∈ V ∧ u 6= v }. Edges e1
and e2 are called multiple edges (or parallel edges) if
f (e1 ) = f (e2 ).
Remarks:
Edges are not directed.
There can be more than one edge between two vertices.
When there are m different edges associated to the same pair
of vertices {u, v }, we also say that {u, v } is an edge of
multiplicity m.
There can not be a loop.
Definition
A pseudograph G = (V , E ) consists of a non empty set V of
vertices, a set E of edges made of pairs of elements of V , and a
function f from E to {{u, v } | u, v ∈ V ∧ u 6= v }. An edge is a
loop if f (e) = {u, u} = {u} for a u ∈ V .
Remarks:
Edges are not directed.
There can be more than one edge between two vertices.
There can be a loop.
Definition
A simple directed graph (or digraph) G = (V , E ) consists of a
non empty set of vertices V and a set of directed edges (or arcs)
E . Each directed 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 .
Remarks:
E = {(u, v ) | u, v ∈ V } ⊆ V × V .
The edges are directed.
There can not be multiple edges in the same direction
between two vertices.
There can not be loops.
Definition
A directed multigraph G = (V , E ) consists of a non empty set of
vertices V and a set of directed edges (or arcs) E , and a
function f from E to {(u, v ) | u, v ∈ V }. Edges e1 and e2 are
called multiple directed edges if f (e1 ) = f (e2 ).
Remarks:
The edges are directed.
There can be multiple edges in the same direction between
two vertices.
There can be loops.