Documentation

Complexitylib.Classes.PCP.Internal.ConstraintGraph

Constraint graphs and their unsatisfiability value #

The combinatorial core of Dinur's proof of the PCP theorem. A constraint graph over an alphabet α is a finite multigraph whose edges each carry a binary constraint on the labels of their endpoints; an assignment labels the vertices, and the unsatisfiability value unsatVal is the least fraction of edges any assignment leaves unsatisfied.

Dinur's amplification step is a transformation of constraint graphs that preserves satisfiability (unsatVal = 0) while doubling unsatVal otherwise, so all of that argument is phrased in terms of the definitions here.

Design #

Main definitions #

Main results #

A constraint graph over the alphabet α: a finite multigraph on the vertices Fin numVerts, with edges indexed by Fin numEdges, each edge carrying a binary constraint on the labels of its endpoints.

  • numVerts :

    The number of vertices; the vertices are Fin numVerts.

  • numEdges :

    The number of edges; the edges are indexed by Fin numEdges, so parallel edges and self-loops are allowed.

  • tail : Fin self.numEdgesFin self.numVerts

    The source of an edge.

  • head : Fin self.numEdgesFin self.numVerts

    The target of an edge.

  • rel : Fin self.numEdgesααBool

    The constraint carried by an edge, as a predicate on the labels of its tail and its head, in that order.

Instances For
    @[reducible, inline]

    An assignment labels every vertex with a symbol of the alphabet.

    Equations
    Instances For

      Whether the assignment a satisfies the edge e, as a Bool.

      Equations
      Instances For

        The assignment a satisfies the edge e.

        Equations
        Instances For
          theorem Complexity.ConstraintGraph.satisfies_iff {α : Type} {G : ConstraintGraph α} {a : G.Assignment} {e : Fin G.numEdges} :
          G.Satisfies a e G.rel e (a (G.tail e)) (a (G.head e)) = true

          The edges left unsatisfied by a.

          Equations
          Instances For

            The fraction of edges that a leaves unsatisfied. An edgeless graph has value 0.

            Equations
            Instances For

              An assignment wastes no edges exactly when it satisfies every edge. This holds for the edgeless graph too, where both sides are trivially true.

              A constraint graph is satisfiable when some assignment satisfies every edge.

              Equations
              Instances For
                noncomputable def Complexity.ConstraintGraph.unsatVal {α : Type} [Fintype α] [Nonempty α] (G : ConstraintGraph α) :

                The unsatisfiability value: the least fraction of edges any assignment leaves unsatisfied.

                Equations
                Instances For
                  theorem Complexity.ConstraintGraph.le_unsatVal {α : Type} {G : ConstraintGraph α} [Fintype α] [Nonempty α] {c : } (h : ∀ (a : G.Assignment), c G.unsatFrac a) :

                  The minimum defining unsatVal is attained.

                  The zero-gap case is exactly satisfiability.

                  An unsatisfiable graph has an edge, since otherwise any labelling works.

                  On an unsatisfiable graph every assignment fails at least one edge, so its value is at least one edge's worth.

                  A positive value certifies unsatisfiability.