Kleitman–Wang Algorithms
   HOME

TheInfoList



OR:

The Kleitman–Wang algorithms are two different algorithms 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 conne ...
solving the
digraph realization problem The digraph realization problem is a decision problem in graph theory. Given pairs of nonnegative integers ((a_1,b_1),\ldots,(a_n,b_n)), the problem asks whether there is a labeled simple directed graph such that each vertex v_i has indegree a_i an ...
, i.e. the question if there exists for a finite list of nonnegative
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 language ...
pairs 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 In formal terms, a directed graph is an ordered pair ...
such that its
degree sequence In graph theory, the degree (or valency) of a vertex of a graph is the number of edges that are incident to the vertex; in a multigraph, a loop contributes 2 to a vertex's degree, for the two ends of the edge. The degree of a vertex v is denoted ...
is exactly this list. For a positive answer the list of integer pairs is called ''digraphic''. Both algorithms construct a special solution if one exists or prove that one cannot find a positive answer. These constructions are based on
recursive algorithm In computer science, recursion is a method of solving a computational problem where the solution depends on solutions to smaller instances of the same problem. Recursion solves such recursive problems by using functions that call themselves ...
s. Kleitman and Wang gave these algorithms in 1973.


Kleitman–Wang algorithm (arbitrary choice of pairs)

The algorithm is based on the following theorem. Let S=((a_1,b_1),\dots,(a_n,b_n)) be a finite list of nonnegative integers that is in
nonincreasing In mathematics, a sequence is an enumerated collection of objects in which repetitions are allowed and order matters. Like a set, it contains members (also called ''elements'', or ''terms''). The number of elements (possibly infinite) is called ...
lexicographical order In mathematics, the lexicographic or lexicographical order (also known as lexical order, or dictionary order) is a generalization of the alphabetical order of the dictionaries to sequences of ordered symbols or, more generally, of elements of a ...
and let (a_i,b_i) be a pair of nonnegative integers with b_i >0. List S is digraphic if and only if the finite list S'=((a_1-1,b_1),\dots,(a_-1,b_),(a_,0),(a_,b_),(a_,b_),\dots,(a_n,b_n)) has nonnegative integer pairs and is digraphic. Note that the pair (a_i,b_i) is arbitrarily with the exception of pairs (a_j,0). If the given list S digraphic then the theorem will be applied at most n times setting in each further step S:=S'. This process ends when the whole list S' consists of (0,0) pairs. In each step of the algorithm one constructs the arcs of a digraph with vertices v_1,\dots,v_n, i.e. if it is possible to reduce the list S to S', then we add arcs (v_i,v_1),(v_i,v_2),\dots,(v_,v_),(v_i,v_). When the list S cannot be reduced to a list S' of nonnegative integer pairs in any step of this approach, the theorem proves that the list S from the beginning is not digraphic.


Kleitman–Wang algorithm (maximum choice of a pair)

The algorithm is based on the following theorem. Let S=((a_1,b_1),\dots,(a_n,b_n)) be a finite list of nonnegative integers such that a_1 \geq a_2 \geq \cdots \geq a_n and let (a_i,b_i) be a pair such that (b_i,a_i) is maximal with respect to the
lexicographical order In mathematics, the lexicographic or lexicographical order (also known as lexical order, or dictionary order) is a generalization of the alphabetical order of the dictionaries to sequences of ordered symbols or, more generally, of elements of a ...
under all pairs (b_1,a_1),\dots,(b_n,a_n). List S is digraphic if and only if the finite list S'=((a_1-1,b_1),\cdots,(a_-1,b_),(a_,0),(a_,b_),(a_,b_),\dots,(a_n,b_n)) has nonnegative integer pairs and is digraphic. Note that the list S must not be in lexicographical order as in the first version. If the given list S is digraphic, then the theorem will be applied at most n times, setting in each further step S:=S'. This process ends when the whole list S' consists of (0,0) pairs. In each step of the algorithm, one constructs the arcs of a digraph with vertices v_1,\dots,v_n, i.e. if it is possible to reduce the list S to S', then one adds arcs (v_i,v_1),(v_i,v_2),\dots,(v_i,v_),(v_i,v_). When the list S cannot be reduced to a list S' of nonnegative integer pairs in any step of this approach, the theorem proves that the list S from the beginning is not digraphic.


See also

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


References

* {{DEFAULTSORT:Kleitman-Wang algorithms Graph algorithms