Back to Search Start Over

Space-efficient acyclicity constraints: A declarative pearl

Authors :
Taus Brock-Nannestad
Source :
Science of Computer Programming. 164:66-81
Publication Year :
2018
Publisher :
Elsevier BV, 2018.

Abstract

Many constraints on graphs, e.g. the existence of a simple path between two vertices, or the connectedness of the subgraph induced by some selection of vertices, can be straightforwardly represented by means of a suitable acyclicity constraint. One method for encoding such a constraint in terms of simple, local constraints uses a 3-valued variable for each edge, and an ( N + 1 ) -valued variable for each vertex, where N is the number of vertices in the entire graph. For graphs with many vertices, this can be somewhat inefficient in terms of space usage. In this paper, we show how to refine this encoding into one that uses only a single bit of information, i.e. a 2-valued variable, per vertex, assuming the graph in question is planar. More generally, for graphs that are embeddable in genus g (i.e. on a torus with g handles), we show that 2 g + 1 bits per vertex suffices. We furthermore show how this same constraint can be used to encode connectedness constraints, and a variety of other graph-related constraints.

Details

ISSN :
01676423
Volume :
164
Database :
OpenAIRE
Journal :
Science of Computer Programming
Accession number :
edsair.doi...........4b9e96f970ffedfd761f295285e64b54
Full Text :
https://doi.org/10.1016/j.scico.2017.10.016