# Directed graph

In mathematics, and more specifically in graph theory, a **directed graph** (or **digraph**) is a graph, or set of nodes connected by edges, where the edges have a direction associated with them. In formal terms, a digraph is a pair (sometimes ) of:^{[1]}

- a set
*V*, whose elements are called*vertices*or*nodes*, - a set
*A*of ordered pairs of vertices, called*arcs*,*directed edges*, or*arrows*(and sometimes simply*edges*with the corresponding set named*E*instead of*A*).

It differs from an ordinary or undirected graph, in that the latter is defined in terms of unordered pairs of vertices, which are usually called edges.

A digraph is called "simple" if it has no loops, and no multiple arcs (arcs with same starting and ending nodes). A *directed multigraph*, in which the arcs constitute a multiset, rather than a set, of ordered pairs of vertices may have loops (that is, "self-loops" with same starting and ending node) and multiple arcs. Some, but not all, texts allow a digraph, without the qualification simple, to have self loops, multiple arcs, or both.

## Contents

## Basic terminology

An arc is considered to be directed *from* *to* ; is called the *head* and is called the *tail* of the arc; is said to be a *direct successor* of , and is said to be a *direct predecessor* of . If a path made up of one or more successive arcs leads from to , then is said to be a *successor* of , and is said to be a *predecessor* of . The arc is called the arc *inverted*.

An orientation of a simple undirected graph is obtained by assigning a direction to each edge. Any directed graph constructed this way is called an "oriented graph". A directed graph is an oriented simple graph if and only if it has neither self-loops nor 2-cycles.^{[2]}

A *weighted digraph* is a digraph with weights assigned to its arcs, similar to a weighted graph.
In the context of graph theory a digraph with weighted edges is called a *network*.

The adjacency matrix of a digraph (with loops and multiple arcs) is the integer-valued matrix with rows and columns corresponding to the nodes, where a nondiagonal entry is the number of arcs from node *i* to node *j*, and the diagonal entry is the number of loops at node *i*. The adjacency matrix of a digraph is unique up to identical permutation of rows and columns.

Another matrix representation for a digraph is its incidence matrix.

See direction for more definitions.

## Indegree and outdegree

For a node, the number of head endpoints adjacent to a node is called the *indegree* of the node and the number of tail endpoints adjacent to a node is its *outdegree* (called "branching factor" in trees).

The indegree is denoted and the outdegree as A vertex with is called a *source*, as it is the origin of each of its incident edges. Similarly, a vertex with is called a *sink*.

The *degree sum formula* states that, for a directed graph,

If for every node *v* ∈ *V*, , the graph is called a *balanced digraph*.^{[3]}

## 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 graph; in some cases, non-isomorphic graphs have the same degree sequence.

The digraph realization problem is the problem of finding a digraph with the degree sequence being a given sequence of positive integer pairs. (Trailing pairs of zeros may be ignored since they are trivially realized by adding an appropriate number of isolated vertices to the digraph.) A sequence which is the degree sequence of some digraph, i.e. for which the digraph realization problem has a solution, is called a digraphic or digraphical sequence. This problem can either be solved by the Kleitman–Wang algorithm or by the Fulkerson–Chen–Anstee theorem.

## Digraph connectivity

{{#invoke:main|main}}
A digraph G is called *weakly connected* (or just *connected*^{[4]}) if the undirected *underlying graph* obtained by replacing all directed edges of G with undirected edges is a connected graph. A digraph is *strongly connected* or *strong* if it contains a directed path from *u* to *v* and a directed path from *v* to *u* for every pair of vertices *u*,*v*. The *strong components* are the maximal strongly connected subgraphs.

## Classes of digraphs

A directed graph *G* is called **symmetric** if, for every arc that belongs to *G*, the corresponding reversed arc also belongs to *G*. A symmetric, loopless directed graph is equivalent to an undirected graph with the edges replaced by pairs of inverse arcs; thus the number of edges is equal to the number of arcs halved.

An **acyclic** directed graph, acyclic digraph, or directed acyclic graph is a directed graph with no directed cycles. Special cases of acyclic directed graphs include multitrees (graphs in which no two directed paths from a single starting node meet back at the same ending node), oriented trees or polytrees (digraphs formed by orienting the edges of undirected acyclic graphs), and rooted trees (oriented trees in which all edges of the underlying undirected tree are directed away from the roots).

A **tournament** is an oriented graph obtained by choosing a direction for each edge in an undirected complete graph.

In the theory of Lie groups, a **quiver** *Q* is a directed graph serving as the domain of, and thus characterizing the shape of, a *representation* *V* defined as a functor, specifically an object of the functor category **FinVct**_{K}^{F(Q)} where *F*(*Q*) is the free category on *Q* consisting of paths in *Q* and **FinVct**_{K} is the category of finite-dimensional vector spaces over a field *K*. Representations of a quiver label its vertices with vector spaces and its edges (and hence paths) compatibly with linear transformations between them, and transform via natural transformations.

## See also

- Coates graph
- Flow chart
- Rooted graph
- Flow graph (mathematics)
- Mason graph
- Oriented graph
- Preorder
- Quiver
- Signal-flow graph
- Transpose graph
- Vertical constraint graph

## Notes

- ↑ Template:Harvtxt. Template:Harvtxt, Section 1.10. Template:Harvtxt, Section 10.
- ↑ Template:Harvtxt, Section 1.10.
- ↑ {{#invoke:citation/CS1|citation |CitationClass=citation }}; {{#invoke:citation/CS1|citation |CitationClass=citation }}.
- ↑ Template:Harvtxt p. 19 in the 2007 edition; p. 20 in the 2nd edition (2009).

## References

- {{#invoke:citation/CS1|citation

|CitationClass=citation
}}

(the corrected 1st edition of 2007 is now freely available on the authors' site; the 2nd edition appeared in 2009 ISBN 1-84800-997-6).

- {{#invoke:citation/CS1|citation

|CitationClass=citation }}.

- {{#invoke:citation/CS1|citation

|CitationClass=citation }} (the electronic 3rd edition is freely available on author's site).

- {{#invoke:citation/CS1|citation

|CitationClass=citation }}.

- {{#invoke:citation/CS1|citation

|CitationClass=citation }}