Documentation

DescriptiveComplexity.Problems.ZeroOneIP.Membership

0-1 integer programming is in NP #

The certificate guesses the 0-1 vector and, for each row, a ripple-carry walk along the columns:

and the kernel asks that each row's walk be a ripple-carry addition ending on that row's right-hand side. It is Knapsack's certificate (DescriptiveComplexity.Problems.Knapsack.Membership) with a row argument threaded through the two arithmetic relations and a guard row r in front of every clause: the rows do not interact, so the walks are independent and the semantic work is DescriptiveComplexity.chain_sound and DescriptiveComplexity.exists_chain (DescriptiveComplexity.Problems.Knapsack.Chain) applied once per row – the reason those two are stated over an arbitrary walk order and item predicate rather than over one vocabulary.

Unlike Partition, the walks run on the instance's own positions: each row's total is its right-hand side, which is written there, so it fits.

@[reducible, inline]

The le symbol over the sum.

Equations
Instances For
    Dependency graph
    Dependency graph
    @[reducible, inline]

    The col symbol over the sum.

    Equations
    Instances For
      Dependency graph
      Dependency graph

      The single existential block of the Σ₁ definition of 0-1 integer programming: the columns set to 1 (unary), and the running partial sums and the carries (ternary: a row, a column and a bit position).

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        Dependency graph
        @[instance_reducible]
        Equations
        • One or more equations did not get rendered due to their size.
        Dependency graph
        Dependency graph
        @[reducible, inline]

        The pS symbol over the sum.

        Equations
        Instances For
          Dependency graph
          @[reducible, inline]

          The row symbol over the sum.

          Equations
          Instances For
            Dependency graph
            @[reducible, inline]

            The vocabulary of the kernel: the instance expanded by the block.

            Equations
            Instances For
              Dependency graph

              The relation variables of the block.

              Instances For
                Dependency graph
                @[reducible, inline]

                The cy symbol over the sum.

                Equations
                Instances For
                  Dependency graph
                  @[reducible, inline]

                  The coef symbol over the sum.

                  Equations
                  Instances For
                    Dependency graph
                    @[reducible, inline]

                    The rhs symbol over the sum.

                    Equations
                    Instances For
                      Dependency graph
                      @[reducible, inline]

                      The posn symbol over the sum.

                      Equations
                      Instances For
                        Dependency graph
                        Dependency graph
                        @[reducible, inline]

                        The x symbol over the sum.

                        Equations
                        Instances For
                          Dependency graph

                          Formula builders #

                          Dependency graph
                          Dependency graph
                          Dependency graph

                          The entry of the row r in the column j has bit 1 at p, as a formula.

                          Equations
                          Instances For
                            Dependency graph

                            The right-hand side of the row r has bit 1 at p, as a formula.

                            Equations
                            Instances For
                              Dependency graph
                              Dependency graph
                              Dependency graph

                              The column x is set to 1, as a formula.

                              Equations
                              Instances For
                                Dependency graph
                                def DescriptiveComplexity.zoPSF {α : Type} (r j p : α) :

                                Bit p of the running total of the row r at the column j, as a formula.

                                Equations
                                Instances For
                                  Dependency graph
                                  def DescriptiveComplexity.zoCyF {α : Type} (r j p : α) :

                                  The carry at p of the step appending the column j to the total of the row r, as a formula.

                                  Equations
                                  Instances For
                                    Dependency graph

                                    The bit that the column j contributes to the row r at p: the entry's bit, if the column is set to 1.

                                    Equations
                                    Instances For
                                      Dependency graph

                                      The exclusive or of three formulas, as x ↔ (y ↔ z).

                                      Equations
                                      Instances For
                                        Dependency graph

                                        The majority of three formulas.

                                        Equations
                                        Instances For
                                          Dependency graph
                                          noncomputable def DescriptiveComplexity.zoMinColF {α : Type} (j : α) :

                                          j is the first column, as a formula.

                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Instances For
                                            Dependency graph
                                            noncomputable def DescriptiveComplexity.zoMaxColF {α : Type} (j : α) :

                                            j is the last column, as a formula.

                                            Equations
                                            • One or more equations did not get rendered due to their size.
                                            Instances For
                                              Dependency graph
                                              noncomputable def DescriptiveComplexity.zoSuccColF {α : Type} (i j : α) :

                                              j is the column right after i, as a formula.

                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For
                                                Dependency graph
                                                noncomputable def DescriptiveComplexity.zoMinPosnF {α : Type} (p : α) :

                                                p is the lowest position, as a formula.

                                                Equations
                                                • One or more equations did not get rendered due to their size.
                                                Instances For
                                                  Dependency graph
                                                  noncomputable def DescriptiveComplexity.zoMaxPosnF {α : Type} (p : α) :

                                                  p is the highest position, as a formula.

                                                  Equations
                                                  • One or more equations did not get rendered due to their size.
                                                  Instances For
                                                    Dependency graph
                                                    noncomputable def DescriptiveComplexity.zoSuccPosnF {α : Type} (p q : α) :

                                                    q is the position right above p, as a formula.

                                                    Equations
                                                    • One or more equations did not get rendered due to their size.
                                                    Instances For
                                                      Dependency graph

                                                      The clauses #

                                                      Every clause of a walk is guarded by row r: the rows do not interact, so the kernel is Knapsack's read once per row.

                                                      The first-order kernel of the Σ₁ definition of 0-1 integer programming.

                                                      Equations
                                                      • One or more equations did not get rendered due to their size.
                                                      Instances For
                                                        Dependency graph

                                                        Realization #

                                                        The columns set to 1, read off an assignment of the block.

                                                        Equations
                                                        Instances For
                                                          Dependency graph

                                                          The running total of a row, read off an assignment of the block.

                                                          Equations
                                                          Instances For
                                                            Dependency graph

                                                            The carries of a row, read off an assignment of the block.

                                                            Equations
                                                            Instances For
                                                              Dependency graph

                                                              Membership #

                                                              0-1 integer programming is Σ₁-definable: guess the 0-1 vector and, for each row, the running totals and the carries of a ripple-carry addition, and check first-order that every row's walk ends on that row's right-hand side. Since NP is defined as Σ₁-definability, this is the membership half of the NP-completeness of 0-1 integer programming.

                                                              Dependency graph