# 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 linked by two symmetric edges. Among directed graphs, the oriented graphs are the ones that have no 2-cycles (that is at most one of (x, y) and (y, x) may be arrows of the graph).

A tournament is an orientation of a complete graph. A polytree is an orientation of an undirected tree. Sumner's conjecture states that every tournament with 2n − 2 vertices contains every polytree with n vertices.

The number of non-isomorphic oriented graphs with n vertices (for n = 1, 2, 3, …) is

1; 2; 7; 42; 582; 21,480; 2,142,288; 575,016,219; 415,939,243,032; … (sequence A001174 in the OEIS).

Oriented graphs are in one-to-one correspondence with complete directed graphs (graphs in which there is a directed edge in one or both directions between every pair of distinct vertices). A complete directed graph can be converted to an oriented graph by removing every 2-cycle, and conversely an oriented graph can be converted to a complete directed graph by adding a 2-cycle between every pair of vertices that are not endpoints of an edge; these correspondences are bijective. Therefore, the same sequence of numbers also solves the graph enumeration problem for complete digraphs. There is an explicit but complicated formula for the numbers in this sequence.

## Constrained orientations

A strong orientation is an orientation that results in a strongly connected graph. The closely related totally cyclic orientations are orientations in which every edge belongs to at least one simple cycle. An orientation of an undirected graph G is totally cyclic if and only if it is a strong orientation of every connected component of G. Robbins' theorem states that a graph has a strong orientation if and only if it is 2-edge-connected; disconnected graphs may have totally cyclic orientations, but only if they have no bridges.

An acyclic orientation is an orientation that results in a directed acyclic graph. Every graph has an acyclic orientation; all acyclic orientations may be obtained by placing the vertices into a sequence, and then directing each edge from the earlier of its endpoints in the sequence to the later endpoint. The Gallai–Hasse–Roy–Vitaver theorem states that a graph has an acyclic orientation in which the longest path has at most k vertices if and only if it can be colored with at most k colors. Acyclic orientations and totally cyclic orientations are related to each other by planar duality. An acyclic orientation with a single source and a single sink is called a bipolar orientation.

A transitive orientation is an orientation such that the resulting directed graph is its own transitive closure. The graphs with transitive orientations are called comparability graphs; they may be defined from a partially ordered set by making two elements adjacent whenever they are comparable in the partial order. A transitive orientation, if one exists, can be found in linear time. However, testing whether the resulting orientation (or any given orientation) is actually transitive requires more time, as it is equivalent in complexity to matrix multiplication.

An Eulerian orientation of an undirected graph is an orientation in which each vertex has equal in-degree and out-degree. Eulerian orientations of grid graphs arise in statistical mechanics in the theory of ice-type models.

A Pfaffian orientation has the property that certain even-length cycles in the graph have an odd number of edges oriented in each of its two directions. They always exist for planar graphs, but not for certain other graphs. They are used in the FKT algorithm for counting perfect matchings.