Documentation

Complexity.Logics.FirstOrder.Problems.ColoringToCNF

The order-free first-order interpretation from 3COL to 3SAT #

The reductions in this module use order-free first-order interpretations. Input structures have no built-in order or numeric predicates; these are variants of the standard ordered setting.

Three-colorability is a constraint satisfaction problem, and its constraints are clauses of at most three literals: a graph is three-colorable exactly when the 3-CNF formula with a variable x(v, c) for each vertex v and color c, a clause x(v, 0) ∨ x(v, 1) ∨ x(v, 2) for each vertex and a clause ¬x(u, c) ∨ ¬x(v, c) for each edge (u, v) and color c is satisfiable. A loop at v gives the clauses ¬x(v, c), making the formula unsatisfiable, as the loop makes the graph uncolorable. This construction is a tagged interpretation (Cslib.Logic.FO.graph.cnfInterpretation), so 3COL, with loops allowed, is order-free reducible to 3SAT (Cslib.Logic.FO.graph.reduces_ThreeColorable_ThreeSAT); with the converse Cslib.Logic.FO.cnf.reduces_ThreeSAT_ThreeColorable, the two classes are order-free interreducible.

Main definitions #

Main results #

References #

The kinds of elements of the CNF structure of the colorings of a graph: the variables x(v, c), the clauses saying that a vertex has a color, and the clauses saying that the two ends of an edge do not both have the color c.

Instances For
    @[reducible, inline]

    The coordinates of the elements: the vertex of a variable or of a vertex clause, and the two ends of the edge of an edge clause.

    Instances For

      The templates of the literals of each polarity. A variable names the tautology x ∨ ¬x.

      Instances For

        The CNF structure of the colorings of a graph, a tagged interpretation.

        Instances For

          The CNF structure of the colorings of a graph is satisfiable exactly when the graph is three-colorable.

          The CNF structure of the colorings of a graph is a 3-CNF structure.

          Structures with at most one element #

          On a graph with at most one vertex: a single clause, the clause x without a loop and the empty clause with a loop.

          Instances For

            3COL reduces to 3SAT by an order-free first-order interpretation.