In
mathematics, and more specifically in
graph theory
In mathematics, graph theory is the study of ''graphs'', which are mathematical structures used to model pairwise relations between objects. A graph in this context is made up of '' vertices'' (also called ''nodes'' or ''points'') which are conn ...
, a directed graph (or digraph) is a
graph
Graph may refer to:
Mathematics
*Graph (discrete mathematics), a structure made of vertices and edges
**Graph theory, the study of such graphs and their properties
*Graph (topology), a topological space resembling a graph in the sense of discre ...
that is made up of a set of
vertices connected by directed
edges, often called arcs.
Definition
In formal terms, a directed graph is an ordered pair where
* ''V'' is a
set
Set, The Set, SET or SETS may refer to:
Science, technology, and mathematics Mathematics
*Set (mathematics), a collection of elements
*Category of sets, the category whose objects and morphisms are sets and total functions, respectively
Electro ...
whose
elements are called ''
vertices'', ''nodes'', or ''points'';
* ''A'' is a set of
ordered pairs of vertices, called ''arcs'', ''directed edges'' (sometimes simply ''edges'' with the corresponding set named ''E'' instead of ''A''), ''arrows'', or ''directed lines''.
It differs from an ordinary or
undirected graph
In discrete mathematics, and more specifically in graph theory, a graph is a structure amounting to a set of objects in which some pairs of the objects are in some sense "related". The objects correspond to mathematical abstractions called '' ve ...
, in that the latter is defined in terms of
unordered pair In mathematics, an unordered pair or pair set is a set of the form , i.e. a set having two elements ''a'' and ''b'' with no particular relation between them, where = . In contrast, an ordered pair (''a'', ''b'') has ''a'' as its first ...
s of vertices, which are usually called ''edges'', ''links'' or ''lines''.
The aforementioned definition does not allow a directed graph to have multiple arrows with the same source and target nodes, but some authors consider a broader definition that allows directed graphs to have such multiple arcs (namely, they allow the arc set to be a
multiset
In mathematics, a multiset (or bag, or mset) is a modification of the concept of a set that, unlike a set, allows for multiple instances for each of its elements. The number of instances given for each element is called the multiplicity of that e ...
). Sometimes these entities are called
directed multigraph
In mathematics, and more specifically in graph theory, a multigraph is a graph which is permitted to have multiple edges (also called ''parallel edges''), that is, edges that have the same end nodes. Thus two vertices may be connected by mor ...
s (or multidigraphs).
On the other hand, the aforementioned definition allows a directed graph to have
loops (that is, arcs that directly connect nodes with themselves), but some authors consider a narrower definition that does not allow directed graphs to have loops.
Directed graphs without loops may be called simple directed graphs, while directed graphs with loops may be called ''loop-digraphs'' (see section
Types of directed graph).
Types of directed graphs
Subclasses
* Symmetric directed graphs are directed graphs where all edges appear twice, one in each direction (that is, for every arrow that belongs to the digraph, the corresponding inverse arrow also belongs to it). (Such an edge is sometimes called "bidirected" and such graphs are sometimes called "bidirected", but this conflicts with the meaning for
bidirected graph
In the mathematical domain of graph theory, a bidirected graph (introduced by ). Reprinted in ''Combinatorial Optimization — Eureka, You Shrink!'', Springer-Verlag, Lecture Notes in Computer Science 2570, 2003, pp. 27–30, .
is a graph in whic ...
s.)
* Simple directed graphs are directed graphs that have no
loops (arrows that directly connect vertices to themselves) and no multiple arrows with same source and target nodes. As already introduced, in case of multiple arrows the entity is usually addressed as ''
directed multigraph
In mathematics, and more specifically in graph theory, a multigraph is a graph which is permitted to have multiple edges (also called ''parallel edges''), that is, edges that have the same end nodes. Thus two vertices may be connected by mor ...
''. Some authors describe digraphs with loops as ''loop-digraphs''.
** Complete directed graphs are simple directed graphs where each pair of vertices is joined by a symmetric pair of directed arcs (it is equivalent to an undirected
complete graph
In the mathematical field of graph theory, a complete graph is a simple undirected graph in which every pair of distinct vertices is connected by a unique edge. A complete digraph is a directed graph in which every pair of distinct vertices is ...
with the edges replaced by pairs of inverse arcs). It follows that a complete digraph is symmetric.
** Semicomplete multipartite digraphs are simple digraphs in which the vertex set is partitioned into sets such that for every pair of vertices ''x'' and ''y'' in different sets, there is an arc between ''x'' and ''y''. Note that there can be one arc between ''x'' and ''y'' or two arcs in opposite directions.
** Semicomplete digraphs are simple digraphs where there is an arc between each pair of vertices. Every semicomplete digraph is a semicomplete multipartite digraph in a trivial way, with each vertex constituting a set of the partition.
** Quasi-transitive digraphs are simple digraphs where for every triple ''x'', ''y'', ''z'' of distinct vertices with arcs from ''x'' to ''y'' and from ''y'' to ''z'', there is an arc between ''x'' and ''z''. Note that there can be just one arc between ''x'' and ''z'' or two arcs in opposite directions. A semicomplete digraph is a quasi-transitive digraph. There are extensions of quasi-transitive digraphs called ''k''-quasi-transitive digraphs.
**
Oriented graph
In graph theory, an orientation of an undirected graph is an assignment of a direction to each edge, turning the initial graph into a directed graph.
Oriented graphs
A directed graph is called an oriented graph if none of its pairs of vertices i ...
s are directed graphs having no opposite pairs of directed edges (i.e. at most one of and may be arrows of the graph). It follows that a directed graph is an oriented graph if and only if it has no
2-cycle
A two-stroke (or two-stroke cycle) engine is a type of internal combustion engine that completes a power cycle with two strokes (up and down movements) of the piston during one power cycle, this power cycle being completed in one revolution of ...
. (This is not the only meaning of "oriented graph"; see
Orientation (graph theory)
In graph theory, an orientation of an undirected graph is an assignment of a direction to each edge, turning the initial graph into a directed graph.
Oriented graphs
A directed graph is called an oriented graph if none of its pairs of vertices is ...
.)
***
Tournaments
A tournament is a competition involving at least three competitors, all participating in a sport or game. More specifically, the term may be used in either of two overlapping senses:
# One or more competitions held at a single venue and concentr ...
are oriented graphs obtained by choosing a direction for each edge in undirected
complete graph
In the mathematical field of graph theory, a complete graph is a simple undirected graph in which every pair of distinct vertices is connected by a unique edge. A complete digraph is a directed graph in which every pair of distinct vertices is ...
s. Note that a tournament is a semicomplete digraph.
*** A directed graph is acyclic if it has no
directed cycle
Director may refer to:
Literature
* ''Director'' (magazine), a British magazine
* ''The Director'' (novel), a 1971 novel by Henry Denker
* ''The Director'' (play), a 2000 play by Nancy Hasty
Music
* Director (band), an Irish rock band
* ''D ...
s. The usual name for such a digraph is
directed acyclic graph
In mathematics, particularly graph theory, and computer science, a directed acyclic graph (DAG) is a directed graph with no directed cycles. That is, it consists of vertices and edges (also called ''arcs''), with each edge directed from one v ...
(DAG).
**** ''
Multitree
In combinatorics and order-theoretic mathematics, a multitree may describe either of two equivalent structures: a directed acyclic graph (DAG) in which there is at most one directed path between any two vertices, or equivalently in which the ...
s'' are DAGs in which there are no two distinct directed paths from the same starting vertex to the same ending vertex.
**** ''
Oriented tree
In mathematics, and more specifically in graph theory, a polytree (also called directed tree, oriented tree; . or singly connected network.) is a directed acyclic graph whose underlying undirected graph is a tree. In other words, if we replace its ...
s'' or ''polytrees'' are DAGs formed by orienting the edges of trees (connected, acyclic undirected graphs).
***** ''
Rooted tree
In graph theory, a tree is an undirected graph in which any two vertices are connected by ''exactly one'' path, or equivalently a connected acyclic undirected graph. A forest is an undirected graph in which any two vertices are connected by ''a ...
s'' are oriented trees in which all edges of the underlying undirected tree are directed either away from or towards the root (they are called, respectively, arborescences or out-trees, and in-trees.
Digraphs with supplementary properties
* Weighted directed graphs (also known as directed networks) are (simple) directed graphs with ''weights'' assigned to their arrows, similarly to
weighted graph
This is a glossary of graph theory. Graph theory is the study of graphs, systems of nodes or vertices connected in pairs by lines or edges.
Symbols
A
B
...
s (which are also known as undirected networks or
weighted network A weighted network is a network where the ties among nodes have weights assigned to them. A network is a system whose elements are somehow connected. The elements of a system are represented as nodes (also known as actors or vertices) and the connec ...
s).
**
Flow network
In graph theory, a flow network (also known as a transportation network) is a directed graph where each edge has a capacity and each edge receives a flow. The amount of flow on an edge cannot exceed the capacity of the edge. Often in operations re ...
s are weighted directed graphs where two nodes are distinguished, a ''source'' and a ''sink''.
*
Rooted directed graphs (also known as flow graphs) are digraphs in which a vertex has been distinguished as the root.
** ''
Control-flow graph
In computer science, a control-flow graph (CFG) is a representation, using graph notation, of all paths that might be traversed through a program during its execution. The control-flow graph was discovered by Frances E. Allen, who noted that ...
s'' are rooted digraphs used in computer science as a representation of the paths that might be traversed through a program during its execution.
*
Signal-flow graph
A signal-flow graph or signal-flowgraph (SFG), invented by Claude Shannon, but often called a Mason graph after Samuel Jefferson Mason who coined the term, is a specialized flow graph, a directed graph in which nodes represent system variables, ...
s are directed graphs in which nodes represent system variables and branches (edges, arcs, or arrows) represent functional connections between pairs of nodes.
*
Flow graphs are digraphs associated with a set of linear algebraic or differential equations.
*
State diagram
A state diagram is a type of diagram used in computer science and related fields to describe the behavior of systems. State diagrams require that the system described is composed of a finite number of states; sometimes, this is indeed the case, ...
s are
directed multigraph
In mathematics, and more specifically in graph theory, a multigraph is a graph which is permitted to have multiple edges (also called ''parallel edges''), that is, edges that have the same end nodes. Thus two vertices may be connected by mor ...
s that represent
finite state machine
A finite-state machine (FSM) or finite-state automaton (FSA, plural: ''automata''), finite automaton, or simply a state machine, is a mathematical model of computation. It is an abstract machine that can be in exactly one of a finite number o ...
s.
*
Commutative diagrams are digraphs used in
category theory, where the vertices represent (mathematical) objects and the arrows represent morphisms, with the property that all directed paths with the same start and endpoints lead to the same result by composition.
* In the theory of
Lie groups, a
quiver
A quiver is a container for holding arrows, bolts, ammo, projectiles, darts, or javelins. It can be carried on an archer's body, the bow, or the ground, depending on the type of shooting and the archer's personal preference. Quivers were trad ...
''Q'' is a directed graph serving as the domain of, and thus characterizing the shape of, a ''representation'' ''V'' defined as a
functor
In mathematics, specifically category theory, a functor is a mapping between categories. Functors were first considered in algebraic topology, where algebraic objects (such as the fundamental group) are associated to topological spaces, and m ...
, specifically an object of the
functor category In category theory, a branch of mathematics, a functor category D^C is a category where the objects are the functors F: C \to D and the morphisms are natural transformations \eta: F \to G between the functors (here, G: C \to D is another object in t ...
FinVct
''K''''F''(''Q'') where ''F''(''Q'') is the
free category In mathematics, the free category or path category generated by a directed graph or quiver is the category that results from freely concatenating arrows together, whenever the target of one arrow is the source of the next.
More precisely, the objec ...
on ''Q'' consisting of paths in ''Q'' and FinVct
''K'' is the category of finite-dimensional
vector space
In mathematics and physics, a vector space (also called a linear space) is a set whose elements, often called '' vectors'', may be added together and multiplied ("scaled") by numbers called ''scalars''. Scalars are often real numbers, but can ...
s over a
field
Field may refer to:
Expanses of open ground
* Field (agriculture), an area of land used for agricultural purposes
* Airfield, an aerodrome that lacks the infrastructure of an airport
* Battlefield
* Lawn, an area of mowed grass
* Meadow, a grass ...
''K''. Representations of a quiver label its vertices with vector spaces and its edges (and hence paths) compatibly with
linear transformations
In mathematics, and more specifically in linear algebra, a linear map (also called a linear mapping, linear transformation, vector space homomorphism, or in some contexts linear function) is a mapping V \to W between two vector spaces that pre ...
between them, and transform via
natural transformation
In category theory, a branch of mathematics, a natural transformation provides a way of transforming one functor into another while respecting the internal structure (i.e., the composition of morphisms) of the categories involved. Hence, a natur ...
s.
Basic terminology
An arc is considered to be directed ''from'' ''x'' ''to'' ''y''; ''y'' is called the ''head'' and ''x'' is called the ''tail'' of the arc; ''y'' is said to be a ''direct successor'' of ''x'' and ''x'' is said to be a ''direct predecessor'' of ''y''. If a
path
A path is a route for physical travel – see Trail.
Path or PATH may also refer to:
Physical paths of different types
* Bicycle path
* Bridle path, used by people on horseback
* Course (navigation), the intended path of a vehicle
* Desire p ...
leads from ''x'' to ''y'', then ''y'' is said to be a ''successor'' of ''x'' and ''reachable'' from ''x'', and ''x'' is said to be a ''predecessor'' of ''y''. The arc is called the ''reversed arc'' of .
The
adjacency matrix
In graph theory and computer science, an adjacency matrix is a square matrix used to represent a finite graph. The elements of the matrix indicate whether pairs of vertices are adjacent or not in the graph.
In the special case of a finite simp ...
of a multidigraph with loops is the integer-valued
matrix
Matrix most commonly refers to:
* ''The Matrix'' (franchise), an American media franchise
** ''The Matrix'', a 1999 science-fiction action film
** "The Matrix", a fictional setting, a virtual reality environment, within ''The Matrix'' (franchis ...
with rows and columns corresponding to the vertices, where a nondiagonal entry ''a''
''ij'' is the number of arcs from vertex ''i'' to vertex ''j'', and the diagonal entry ''a''
''ii'' is the number of loops at vertex ''i''. The adjacency matrix of a directed graph is a
logical matrix
A logical matrix, binary matrix, relation matrix, Boolean matrix, or (0, 1) matrix is a matrix with entries from the Boolean domain Such a matrix can be used to represent a binary relation between a pair of finite sets.
Matrix representation ...
, and is
unique up to permutation of rows and columns.
Another matrix representation for a directed graph is its
incidence matrix
In mathematics, an incidence matrix is a logical matrix that shows the relationship between two classes of objects, usually called an incidence relation. If the first class is ''X'' and the second is ''Y'', the matrix has one row for each element ...
.
See
direction for more definitions.
Indegree and outdegree
For a vertex, the number of head ends adjacent to a vertex is called the ''indegree'' of the vertex and the number of tail ends adjacent to a vertex is its ''outdegree'' (called ''
branching factor
In computing, tree data structures, and game theory, the branching factor is the number of children at each node, the outdegree. If this value is not uniform, an ''average branching factor'' can be calculated.
For example, in chess, if a "no ...
'' in trees).
Let and . The indegree of ''v'' is denoted deg
−(''v'') and its outdegree is denoted deg
+(''v'').
A vertex with is called a ''source'', as it is the origin of each of its outcoming arcs. Similarly, a vertex with is called a ''sink'', since it is the end of each of its incoming arcs.
The ''degree sum formula'' states that, for a directed graph,
:
If for every vertex , , the graph is called a ''balanced directed graph''.
Degree sequence
The degree sequence of a directed graph is the list of its indegree and outdegree pairs; for the above example we have degree sequence ((2, 0), (2, 2), (0, 2), (1, 1)). The degree sequence is a directed graph invariant so isomorphic directed graphs have the same degree sequence. However, the degree sequence does not, in general, uniquely identify a directed graph; in some cases, non-isomorphic digraphs have the same degree sequence.
The
directed graph realization problem is the problem of finding a directed graph with the degree sequence a given sequence of positive
integer
An integer is the number zero (), a positive natural number (, , , etc.) or a negative integer with a minus sign ( −1, −2, −3, etc.). The negative numbers are the additive inverses of the corresponding positive numbers. In the languag ...
pairs. (Trailing pairs of zeros may be ignored since they are trivially realized by adding an appropriate number of isolated vertices to the directed graph.) A sequence which is the degree sequence of some directed graph, i.e. for which the directed graph realization problem has a solution, is called a directed graphic or directed graphical sequence. This problem can either be solved by the
Kleitman–Wang algorithm or by the
Fulkerson–Chen–Anstee theorem The Fulkerson–Chen–Anstee theorem is a result in graph theory, a branch of combinatorics. It provides one of two known approaches solving the digraph realization problem, i.e. it gives a necessary and sufficient condition for pairs of nonnegat ...
.
Directed graph connectivity
A directed graph is ''weakly connected'' (or just ''connected''
[ p. 19 in the 2007 edition; p. 20 in the 2nd edition (2009).]) if the undirected ''underlying graph'' obtained by replacing all directed edges of the graph with undirected edges is a
connected graph
In mathematics and computer science, connectivity is one of the basic concepts of graph theory: it asks for the minimum number of elements (nodes or edges) that need to be removed to separate the remaining nodes into two or more isolated subgrap ...
.
A directed graph is ''
strongly connected
In the mathematical theory of directed graphs, a graph is said to be strongly connected if every vertex is reachable from every other vertex. The strongly connected components of an arbitrary directed graph form a partition into subgraphs that ...
'' or ''strong'' if it contains a directed path from ''x'' to ''y'' (and from ''y'' to ''x'') for every pair of vertices . The ''strong components'' are the maximal strongly connected subgraphs.
A connected
rooted graph In mathematics, and, in particular, in graph theory, a rooted graph is a graph in which one vertex has been distinguished as the root. Both directed and undirected versions of rooted graphs have been studied, and there are also variant definition ...
(or ''flow graph'') is one where there exists a directed path to every vertex from a distinguished ''root vertex''.
See also
Notes
References
*
(the corrected 1st edition of 2007 is now freely available on the authors' site; the 2nd edition appeared in 2009 ).
* .
* .
* (the electronic 3rd edition is freely available on author's site).
* .
Number of directed graphs (or directed graphs) with n nodesfrom
On-Line Encyclopedia of Integer Sequences
The On-Line Encyclopedia of Integer Sequences (OEIS) is an online database of integer sequences. It was created and maintained by Neil Sloane while researching at AT&T Labs. He transferred the intellectual property and hosting of the OEIS to t ...
External links
{{DEFAULTSORT:Directed Graph
Directed graphs
Graph theory
Graph data structures