Home

selfloops

Selfloops, or loops, are edges that connect a vertex to itself in a graph. In undirected graphs the loop has both endpoints at the same vertex, while in directed graphs the loop is an edge from the vertex to itself. Graphs that allow loops are often called pseudographs; when multiple edges between vertices are also allowed, the term multigraph is used, though conventions vary.

In an undirected graph a loop contributes two to the degree of its vertex; in a directed

Loops affect algorithms and properties. Some definitions of a simple graph disallow loops; many algorithms can

In modeling, loops capture self-influence or persistence. In automata, a state with a self-loop means the machine

Examples help illustrate their use. A social network might include a self-loop if a node represents a

graph
a
loop
increases
both
in-degree
and
out-degree
by
one.
In
adjacency
matrices,
a
loop
is
represented
by
a
nonzero
diagonal
entry
(usually
1)
to
indicate
the
presence
of
the
edge.
be
adapted
by
ignoring
loops
or
removing
them
before
processing.
can
stay
in
that
state
after
reading
a
particular
symbol;
in
Markov
chains,
a
loop
represents
staying
in
the
same
state
with
a
given
probability.
person
who
is
considered
connected
to
themselves
in
the
model.
In
practice,
whether
loops
are
included
often
depends
on
the
modeling
goals
and
the
specific
computational
framework
being
used.