Hubbry Logo
Directed graphDirected graphMain
Open search
Directed graph
Community hub
Directed graph
logo
8 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
Directed graph
Directed graph
from Wikipedia
A simple directed graph

In mathematics, and more specifically in graph theory, a directed graph (or digraph) is a graph that is made up of a set of vertices connected by directed edges, often called arcs.

Definition

[edit]

In formal terms, a directed graph is an ordered pair G = (V, A) where[1]

  • V is a set 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 that the latter is defined in terms of unordered pairs 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). Sometimes these entities are called directed multigraphs (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.[2] 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

[edit]

Subclasses

[edit]
A simple directed acyclic graph
A tournament on 4 vertices
  • 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 graphs.)
  • 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. Some authors describe digraphs with loops as loop-digraphs.[2]
    • 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 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. There can be one arc between x and y or two arcs in opposite directions.[3]
    • 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.[4]
    • 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. 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.[5]
    • Oriented graphs are directed graphs having no opposite pairs of directed edges (i.e. at most one of (x, y) and (y, x) 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.[6] Such a graph can be obtained by applying an orientation to an undirected graph.
      • Tournaments are oriented graphs obtained by choosing a direction for each edge in undirected complete graphs. A tournament is a semicomplete digraph.[4]
      • A directed graph is acyclic if it has no directed cycles. The usual name for such a digraph is directed acyclic graph (DAG).[7]
        • Multitrees are DAGs in which there are no two distinct directed paths from the same starting vertex to the same ending vertex.
        • Oriented trees or polytrees are DAGs formed by orienting the edges of trees (connected, acyclic undirected graphs).
          • Rooted trees 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

[edit]
  • Weighted directed graphs (also known as directed networks) are (simple) directed graphs with weights assigned to their arrows, similarly to weighted graphs (which are also known as undirected networks or weighted networks).[2]
    • Flow networks 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 graphs 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 graphs 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 diagrams are directed multigraphs that represent finite-state machines.
  • 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 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 FinVctKF(Q) where F(Q) is the free category on Q consisting of paths in Q and FinVctK 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.

Basic terminology

[edit]
Oriented graph with corresponding incidence matrix

An arc (x, y) 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 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 (y, x) is called the reversed arc of (x, y).

The adjacency matrix of a multidigraph with loops is the integer-valued matrix with rows and columns corresponding to the vertices, where a nondiagonal entry aij is the number of arcs from vertex i to vertex j, and the diagonal entry aii is the number of loops at vertex i. The adjacency matrix of a directed graph is a logical matrix, and is unique up to permutation of rows and columns.

Another matrix representation for a directed graph is its incidence matrix.

See direction for more definitions.

Indegree and outdegree

[edit]
A directed graph with vertices labeled (indegree, 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 trees).

Let G = (V, E) and vV. The indegree of v is denoted deg(v) and its outdegree is denoted deg+(v).

A vertex with deg(v) = 0 is called a source, as it is the origin of each of its outgoing arcs. Similarly, a vertex with deg+(v) = 0 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 vV, deg+(v) = deg(v), the graph is called a balanced directed graph.[8]

Degree sequence

[edit]

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 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.

Directed graph connectivity

[edit]

A directed graph is weakly connected (or just connected[9]) if the undirected underlying graph obtained by replacing all directed edges of the graph with undirected edges is a connected graph.

A directed graph is strongly connected or strong if it contains a directed path from x to y (and from y to x) for every pair of vertices (x, y). The strong components are the maximal strongly connected subgraphs.

A connected rooted graph (or flow graph) is one where there exists a directed path to every vertex from a distinguished root vertex.

See also

[edit]

Notes

[edit]

References

[edit]
[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
A directed graph, also known as a digraph, is a mathematical structure in graph theory consisting of a set of vertices (or nodes) and a set of directed edges (or arcs) that connect ordered pairs of vertices, where each edge indicates a one-way relationship from a source vertex to a target vertex. Unlike undirected graphs, which model symmetric connections, directed graphs capture asymmetric or oriented relationships, such as traffic flow on one-way streets or follower connections in social networks. Key properties of directed graphs include the in-degree of a vertex, defined as the number of edges incoming to it, and the out-degree, the number of edges outgoing from it; these degrees help analyze connectivity and structure within the graph. Directed graphs may contain cycles, loops (edges from a vertex to itself), or multiple edges between the same pair of vertices in the same direction, though simple directed graphs restrict to at most one edge per . A directed graph is strongly connected if there is a directed path between every pair of vertices, and it is acyclic (a or DAG) if it contains no directed cycles, which is crucial for applications like scheduling and dependency resolution. Directed graphs find extensive applications in , including modeling prerequisites in course curricula, web page linking for search engine algorithms like , and network flows in optimization problems. Fundamental algorithms for directed graphs encompass for acyclic graphs, shortest path computations adapted for directionality, and decomposition into strongly connected components using methods like Kosaraju's or Tarjan's. These structures also appear in for (e.g., PERT charts) and in for representing metabolic pathways or neural connections.

Formal Definition

Basic Components

A directed graph, also known as a digraph, is formally defined as a pair (V,A)(V, A), where VV is a set of vertices and AA is a set of ordered pairs (u,v)(u, v) with u,vVu, v \in V, representing directed edges or arcs from uu to vv. This definition applies to simple directed graphs, where AA contains at most one occurrence of each ordered pair (no multiple arcs) and may or may not include self-loops (arcs with u=vu = v). These arcs indicate a one-way connection, distinguishing directed graphs from undirected graphs, in which edges lack direction and allow traversal in both ways. The directionality of arcs enables asymmetric relationships; for instance, the presence of an arc (u,v)(u, v) does not require a corresponding arc (v,u)(v, u), which impacts how information or flow traverses the graph. In a simple directed graph without self-loops, no arcs from a vertex to itself and no multiple arcs between the same ordered pair of distinct vertices are allowed. For example, consider vertices V={a,b,c}V = \{a, b, c\} with arcs A={(a,b),(b,c)}A = \{(a, b), (b, c)\}; this forms a simple directed path from aa to cc without loops or duplicates. In more general directed graphs (multidigraphs), self-loops and multiple arcs between the same are permitted, where AA is treated as a of ordered pairs or defined using a multiplicity function from V×VV \times V to non-negative integers. Directed graphs can be represented using adjacency matrices, where entry (i,j)(i, j) indicates an arc from vertex ii to jj, or adjacency lists that store outgoing neighbors for each vertex.

Mathematical Representation

A directed graph G=(V,A)G = (V, A), consisting of a set VV of vertices and a set AA of directed arcs, can be formally represented using matrices or lists to encode the structure for computational and theoretical analysis. The is a square n×nn \times n matrix AA, where n=Vn = |V|, and the entry Aij=1A_{ij} = 1 if there is a directed arc from vertex ii to vertex jj, and Aij=0A_{ij} = 0 otherwise. For weighted directed graphs, AijA_{ij} instead holds the weight of the arc from ii to jj, or 0 if no arc exists. In multidigraphs, AijA_{ij} can represent the number of arcs from ii to jj. The representation maps each vertex to a list of its outgoing neighbors, storing the graph as a collection of such lists, one per vertex. This structure directly reflects the arcs by listing the targets reachable from each source vertex. The is a rectangular V×A|V| \times |A| matrix BB, with rows indexed by vertices and columns by arcs; for an arc from vertex uu (tail) to vertex vv (head), the entry Bu,k=1B_{u,k} = -1, Bv,k=1B_{v,k} = 1, and all other entries in column kk are 0. Adjacency matrices enable constant-time O(1)O(1) queries to check for the existence of an arc between any pair of vertices, making them advantageous for dense graphs where many are present, though they require Θ(n2)\Theta(n^2) space regardless of the number of . In contrast, adjacency lists use Θ(V+A)\Theta(|V| + |A|) space, which is more efficient for sparse graphs with few relative to n2n^2, but arc existence queries take O(d)O(d) time where dd is the out-degree of the source vertex. Incidence matrices, while useful in linear algebra applications such as computing the graph Laplacian, are less common for general purposes due to their larger size proportional to A|A| and the need for arc indexing. For example, consider a directed graph with vertices V={1,2,3}V = \{1, 2, 3\} and arcs A={(1,2),(2,3)}A = \{(1,2), (2,3)\}. The is (010001000),\begin{pmatrix} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \end{pmatrix},
Add your contribution
Related Hubs
User Avatar
No comments yet.