Reverse-search algorithm

Last updated

Reverse-search algorithms are a class of algorithms for generating all objects of a given size, from certain classes of combinatorial objects. In many cases, these methods allow the objects to be generated in polynomial time per object, using only enough memory to store a constant number of objects (polynomial space). (Generally, however, they are not classed as polynomial-time algorithms, because the number of objects they generate is exponential.) They work by organizing the objects to be generated into a spanning tree of their state space, and then performing a depth-first search of this tree.

Contents

Reverse-search algorithms were introduced by David Avis and Komei Fukuda in 1991, for problems of generating the vertices of convex polytopes and the cells of arrangements of hyperplanes. [1] They were formalized more broadly by Avis and Fukuda in 1996. [2]

Principles

A reverse-search algorithm generates the combinatorial objects in a state space, an implicit graph whose vertices are the objects to be listed and whose edges represent certain "local moves" connecting pairs of objects, typically by making small changes to their structure. It finds each objects using a depth-first search in a rooted spanning tree of this state space, described by the following information: [2]

From this information it is possible to find the children of any given node in the tree, reversing the links given by the parent subroutine: they are simply the neighbors whose parent is the given node. It is these reversed links to child nodes that the algorithm searches. [2]

A classical depth-first search of this spanning tree would traverse the tree recursively, starting from the root, at each node listing all of the children and making a recursive call for each one. Unlike a depth-first search of a graph with cycles, it is not necessary to maintain the set of already-visited nodes to avoid repeated visits; such repetition is not possible in a tree. However, this recursive algorithm may still require a large amount of memory for its call stack, in cases when the tree is very deep. Instead, reverse search traverses the spanning tree in the same order while only storing two objects: the current object of the traversal, and the previously traversed object. Initially, the current object is set to the root of the tree, and there is no previous object. From this information, it is possible to determine the next step of the traversal by the following case analysis: [2]

This algorithm involves listing the neighbors of an object once for each step in the search. However, if there are objects to be listed, then the search performs steps, so the number of times it generates neighbors of objects is within a factor of two of the number of times the recursive depth-first search would do the same thing. [2]

Applications

Examples of the problems to which reverse search has been applied include the following combinatorial generation problems:

Vertices of simple convex polytopes
If a -dimensional convex polytope is defined as an intersection of half-spaces, then its vertices can be described as the points of intersection of or more hyperplanes bounding the halfspaces; it is a simple polytope if no vertex is the intersection of more than of these hyperplanes. The vertex enumeration problem is the problem of listing all of these vertices. The edges of the polytope connect pairs of vertices that have hyperplanes in common, so the vertices and edges form a state space in which each vertex has neighbors. The simplex algorithm from the theory of linear programming finds a vertex maximizing a given linear function of the coordinates, by walking from vertex to vertex, choosing at each step a vertex with a greater value of the function; there are several standard choices of "pivot rule" that specify more precisely which vertex to choose. Any such pivot rule can be interpreted as defining the parent function of a spanning tree of the polytope, whose root is the optimal vertex. Applying reverse search to this data generates all vertices of the polytope. A similar algorithm can also enumerate all bases of a linear program, without requiring that it defines a polytope that is simple. [2] [3]
Cells of hyperplane arrangements
A hyperplane arrangement decomposes Euclidean space into cells, each described by a "sign vector" that describes whether its points belong to one of the hyperplanes (sign 0), are on one side of the hyperplane (sign +1), or are on the other side (sign 1). The cells form a connected state space under local moves that change a single sign by one unit, and it is possible to check that this operation produces a valid cell by solving a linear programming feasibility problem. A spanning tree can be constructed for any choice of root cell by defining a parent operator that makes the first possible change that would bring the sign vector closer to that of the root. Using reverse search for this state space and parent operator produces an algorithm for listing all cells in polynomial time per cell. [2] [4]
Point-set triangulations
The triangulations of a planar point set are connected by "flip" moves that remove one diagonal from a triangulation and replace it by another. If the Delaunay triangulation is chosen as the root, then every triangulation can be flipped to the Delaunay triangulation by steps in which the triangulation of some subset of four points is replaced by its Delaunay triangulation. [5] [6] Choosing the first Delaunay flip as the parent of each triangulation, and applying local search, produces an algorithm for listing all triangulations in polynomial time per triangulation. [2]
Connected subgraphs
The connected subgraphs, and connected induced subgraphs, of a given connected graph form a state space whose local moves are the addition or removal of a single edge or vertex of the graph, respectively. A spanning tree of this state space can be obtained by adding the first edge or vertex (in some ordering of the edges or vertices) whose addition produces another connected subgraph; its root is the whole graph. Applying local search to this state space and parent operator produces an algorithm for listing all connected subgraphs in polynomial time per subgraph. [2]

Other applications include algorithms for generating the following structures:

Related Research Articles

<span class="mw-page-title-main">Tree (graph theory)</span> Undirected, connected and acyclic graph

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 at most one path, or equivalently an acyclic undirected graph, or equivalently a disjoint union of trees.

<span class="mw-page-title-main">Component (graph theory)</span> Maximal subgraph whose vertices can reach each other

In graph theory, a component of an undirected graph is a connected subgraph that is not part of any larger connected subgraph. The components of any graph partition its vertices into disjoint sets, and are the induced subgraphs of those sets. A graph that is itself connected has exactly one component, consisting of the whole graph. Components are sometimes called connected components.

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.

<span class="mw-page-title-main">Spanning tree</span> Tree which includes all vertices of a graph

In the mathematical field of graph theory, a spanning treeT of an undirected graph G is a subgraph that is a tree which includes all of the vertices of G. In general, a graph may have several spanning trees, but a graph that is not connected will not contain a spanning tree. If all of the edges of G are also edges of a spanning tree T of G, then G is a tree and is identical to T.

<span class="mw-page-title-main">Chordal graph</span> Graph where all long cycles have a chord

In the mathematical area of graph theory, a chordal graph is one in which all cycles of four or more vertices have a chord, which is an edge that is not part of the cycle but connects two vertices of the cycle. Equivalently, every induced cycle in the graph should have exactly three vertices. The chordal graphs may also be characterized as the graphs that have perfect elimination orderings, as the graphs in which each minimal separator is a clique, and as the intersection graphs of subtrees of a tree. They are sometimes also called rigid circuit graphs or triangulated graphs.

<span class="mw-page-title-main">Euclidean minimum spanning tree</span> Shortest network connecting points

A Euclidean minimum spanning tree of a finite set of points in the Euclidean plane or higher-dimensional Euclidean space connects the points by a system of line segments with the points as endpoints, minimizing the total length of the segments. In it, any two points can reach each other along a path through the line segments. It can be found as the minimum spanning tree of a complete graph with the points as vertices and the Euclidean distances between points as edge weights.

<span class="mw-page-title-main">Convex polytope</span> Convex hull of a finite set of points in a Euclidean space

A convex polytope is a special case of a polytope, having the additional property that it is also a convex set contained in the -dimensional Euclidean space . Most texts use the term "polytope" for a bounded convex polytope, and the word "polyhedron" for the more general, possibly unbounded object. Others allow polytopes to be unbounded. The terms "bounded/unbounded convex polytope" will be used below whenever the boundedness is critical to the discussed issue. Yet other texts identify a convex polytope with its boundary.

<span class="mw-page-title-main">Feedback arc set</span> Edges that hit all cycles in a graph

In graph theory and graph algorithms, a feedback arc set or feedback edge set in a directed graph is a subset of the edges of the graph that contains at least one edge out of every cycle in the graph. Removing these edges from the graph breaks all of the cycles, producing an acyclic subgraph of the given graph, often called a directed acyclic graph. A feedback arc set with the fewest possible edges is a minimum feedback arc set and its removal leaves a maximum acyclic subgraph; weighted versions of these optimization problems are also used. If a feedback arc set is minimal, meaning that removing any edge from it produces a subset that is not a feedback arc set, then it has an additional property: reversing all of its edges, rather than removing them, produces a directed acyclic graph.

<span class="mw-page-title-main">Dual graph</span> Graph representing faces of another graph

In the mathematical discipline of graph theory, the dual graph of a planar graph G is a graph that has a vertex for each face of G. The dual graph has an edge for each pair of faces in G that are separated from each other by an edge, and a self-loop when the same face appears on both sides of an edge. Thus, each edge e of G has a corresponding dual edge, whose endpoints are the dual vertices corresponding to the faces on either side of e. The definition of the dual depends on the choice of embedding of the graph G, so it is a property of plane graphs rather than planar graphs. For planar graphs generally, there may be multiple dual graphs, depending on the choice of planar embedding of the graph.

<span class="mw-page-title-main">Pseudotriangle</span>

In Euclidean plane geometry, a pseudotriangle (pseudo-triangle) is the simply connected subset of the plane that lies between any three mutually tangent convex sets. A pseudotriangulation (pseudo-triangulations) is a partition of a region of the plane into pseudotriangles, and a pointed pseudotriangulation is a pseudotriangulation in which at each vertex the incident edges span an angle of less than π.

<span class="mw-page-title-main">David Avis</span> Canadian and British computer scientist

David Michael Avis is a Canadian and British computer scientist known for his contributions to geometric computations. Avis is a professor in computational geometry and applied mathematics in the School of Computer Science, McGill University, in Montreal. Since 2010, he belongs to Department of Communications and Computer Engineering, School of Informatics, Kyoto University.

In mathematics, the vertex enumeration problem for a polytope, a polyhedral cell complex, a hyperplane arrangement, or some other object of discrete geometry, is the problem of determination of the object's vertices given some formal representation of the object. A classical example is the problem of enumeration of the vertices of a convex polytope specified by a set of linear inequalities:

In polyhedral combinatorics, a branch of mathematics, Steinitz's theorem is a characterization of the undirected graphs formed by the edges and vertices of three-dimensional convex polyhedra: they are exactly the 3-vertex-connected planar graphs. That is, every convex polyhedron forms a 3-connected planar graph, and every 3-connected planar graph can be represented as the graph of a convex polyhedron. For this reason, the 3-connected planar graphs are also known as polyhedral graphs.

<span class="mw-page-title-main">Polymake</span>

polymake is software for the algorithmic treatment of convex polyhedra.

In graph theory, a Trémaux tree of an undirected graph is a type of spanning tree, generalizing depth-first search trees. They are defined by the property that every edge of connects an ancestor–descendant pair in the tree. Trémaux trees are named after Charles Pierre Trémaux, a 19th-century French author who used a form of depth-first search as a strategy for solving mazes. They have also been called normal spanning trees, especially in the context of infinite graphs.

In graph theory, a partial cube is a graph that is isometric to a subgraph of a hypercube. In other words, a partial cube can be identified with a subgraph of a hypercube in such a way that the distance between any two vertices in the partial cube is the same as the distance between those vertices in the hypercube. Equivalently, a partial cube is a graph whose vertices can be labeled with bit strings of equal length in such a way that the distance between two vertices in the graph is equal to the Hamming distance between their labels. Such a labeling is called a Hamming labeling; it represents an isometric embedding of the partial cube into a hypercube.

<span class="mw-page-title-main">Apollonian network</span> Graph formed by subdivision of triangles

In combinatorial mathematics, an Apollonian network is an undirected graph formed by a process of recursively subdividing a triangle into three smaller triangles. Apollonian networks may equivalently be defined as the planar 3-trees, the maximal planar chordal graphs, the uniquely 4-colorable planar graphs, and the graphs of stacked polytopes. They are named after Apollonius of Perga, who studied a related circle-packing construction.

<span class="mw-page-title-main">Criss-cross algorithm</span> Method for mathematical optimization

In mathematical optimization, the criss-cross algorithm is any of a family of algorithms for linear programming. Variants of the criss-cross algorithm also solve more general problems with linear inequality constraints and nonlinear objective functions; there are criss-cross algorithms for linear-fractional programming problems, quadratic-programming problems, and linear complementarity problems.

<span class="mw-page-title-main">Flip graph</span> A graph that encodes local operations in mathematics

In mathematics, a flip graph is a graph whose vertices are combinatorial or geometric objects, and whose edges link two of these objects when they can be obtained from one another by an elementary operation called a flip. Flip graphs are special cases of geometric graphs.

Komei Fukuda is a Japanese mathematician known for his contributions to optimization, polyhedral computation and oriented matroid theory. Fukuda is a professor in optimization and computational geometry in the Department of Mathematics and in the Institute of Theoretical Computer Science at ETH Zurich.

References

  1. Avis, David; Fukuda, Komei (1992), "A pivoting algorithm for convex hulls and vertex enumeration of arrangements and polyhedra", Discrete & Computational Geometry , 8 (3): 295–313, doi: 10.1007/BF02293050 , MR   1174359 ; preliminary version in Seventh Annual Symposium on Computational Geometry, 1991, doi:10.1145/109648.109659
  2. 1 2 3 4 5 6 7 8 9 10 11 Avis, David; Fukuda, Komei (1996), "Reverse search for enumeration", Discrete Applied Mathematics , 65 (1–3): 21–46, doi: 10.1016/0166-218X(95)00026-N , MR   1380066
  3. Avis, David (2000), "A revised implementation of the reverse search vertex enumeration algorithm", in Kalai, Gil; Ziegler, Günter M. (eds.), Polytopes—combinatorics and computation: Including papers from the DMV-Seminar "Polytopes and Optimization" held in Oberwolfach, November 1997, DMV Seminar, vol. 29, Basel: Birkhäuser, pp. 177–198, MR   1785299
  4. Sleumer, Nora H. (1999), "Output-sensitive cell enumeration in hyperplane arrangements", Nordic Journal of Computing, 6 (2): 137–147, MR   1709978
  5. Lawson, C. L. (1972), Generation of a triangular grid with applications to contour plotting, Memo 299, Jet Propulsion Laboratory
  6. Sibson, R. (1973), "Locally equiangular triangulations", The Computer Journal , 21 (3): 243–245, doi: 10.1093/comjnl/21.3.243 , MR   0507358
  7. Liang, Xiaodong; Wang, Rui; Meng, Ji xiang (2017), "Code for polyomino and computer search of isospectral polyominoes", Journal of Combinatorial Optimization, 33 (1): 254–264, doi:10.1007/s10878-015-9953-z, MR   3595411, S2CID   254655722
  8. Horiyama, Takashi; Yamane, Shogo (2011), "Generation of polyiamonds for p6 tiling by the reverse search", in Akiyama, Jin; Jiang, Bo; Kano, Mikio; Tan, Xuehou (eds.), Computational Geometry, Graphs and Applications - 9th International Conference, CGGA 2010, Dalian, China, November 3-6, 2010, Revised Selected Papers, Lecture Notes in Computer Science, vol. 7033, Springer, pp. 96–107, doi:10.1007/978-3-642-24983-9_10, ISBN   978-3-642-24982-2, MR   2927314
  9. Caporossi, Gilles; Hansen, Pierre (May 1998), "Enumeration of polyhex hydrocarbons to ", Journal of Chemical Information and Computer Sciences , 38 (4): 610–619, doi:10.1021/ci970116n
  10. Kurita, Kazuhiro; Wasa, Kunihiro (2022), "Constant amortized time enumeration of Eulerian trails", Theoretical Computer Science , 923: 1–12, arXiv: 2101.10473 , doi: 10.1016/j.tcs.2022.04.048 , MR   4436557
  11. Eppstein, David (2009), "All maximal independent sets and dynamic dominance for sparse graphs", ACM Transactions on Algorithms , 5 (4): A38:1–A38:14, arXiv: cs/0407036 , doi:10.1145/1597036.1597042, MR   2571901, S2CID   2769046
  12. Avis, David (1996), "Generating rooted triangulations without repetitions", Algorithmica , 16 (6): 618–632, doi:10.1007/s004539900067, MR   1412663
  13. Deza, Antoine; Fukuda, Komei; Rosta, Vera (1994), "Wagner's theorem and combinatorial enumeration of 3-polytopes", Proceedings of a symposium held at the Research Institute for Mathematical Sciences, Kyoto University, Kyoto, May 17–19, 1993, RIMS Kôkyûroku Bessatsu, vol. 872, pp. 30–34, MR   1330480
  14. Avis, David; Katoh, Naoki; Ohsaki, Makoto; Streinu, Ileana; Tanigawa, Shin-ichi (June 2007), "Enumerating non-crossing minimally rigid frameworks" (PDF), Graphs and Combinatorics , 23 (S1): 117–134, doi:10.1007/s00373-007-0709-0, S2CID   10874512
  15. Yamanaka, Katsuhisa; Avis, David; Horiyama, Takashi; Okamoto, Yoshio; Uehara, Ryuhei; Yamauchi, Tanami (2021), "Algorithmic enumeration of surrounding polygons" (PDF), Discrete Applied Mathematics , 303: 305–313, doi:10.1016/j.dam.2020.03.034, MR   4310502
  16. Fukuda, Komei (2004), "From the zonotope construction to the Minkowski addition of convex polytopes", Journal of Symbolic Computation , 38 (4): 1261–1272, doi: 10.1016/j.jsc.2003.08.007 , MR   2094220
  17. Weibel, Christophe (2010), "Implementation and parallelization of a reverse-search algorithm for Minkowski sums", in Blelloch, Guy E.; Halperin, Dan (eds.), Proceedings of the Twelfth Workshop on Algorithm Engineering and Experiments, ALENEX 2010, Austin, Texas, USA, January 16, 2010, Society for Industrial and Applied Mathematics, pp. 34–42, doi: 10.1137/1.9781611972900.4
  18. Bayer, Dave; Taylor, Amelia (2009), "Reverse search for monomial ideals", Journal of Symbolic Computation , 44 (10): 1477–1486, doi: 10.1016/j.jsc.2009.05.002 , MR   2543431