Documentation

DescriptiveComplexity.Problems.ZeroOneIP.Hardness

0-1 integer programming is NP-hard #

A single equation with 0-1 variables is a subset-sum instance, so the reduction from Knapsack is the identity in everything but the vocabulary: the items become the columns, the target becomes the right-hand side, and the whole instance becomes one equation.

The only thing to build is that single row. The interpretation has one tag and dimension one, so its universe is a copy of the input (DescriptiveComplexity.IPRed.ipPt); the row is the minimum of the input order, which is the one element a first-order formula can name. Everything else – columns, positions, bits, and the order carrying the place values, which stays the input's own le – is read off unchanged, so no arithmetic appears anywhere and the correctness proof is a transport of binNum along that copy.

Naming the minimum is the only use of the order, so this is an DescriptiveComplexity.OrderedFOReduction; conveniently, being one also supplies the finiteness and nonemptiness that make the minimum exist.

Formula builders over the ordered expansion of binary-weighted instances #

@[reducible, inline]

The ordered expansion of the language of binary-weighted instances.

Equations
Instances For
    Dependency graph
    @[reducible, inline]

    The item symbol in the ordered expansion.

    Equations
    Instances For
      Dependency graph
      @[reducible, inline]

      The position symbol in the ordered expansion.

      Equations
      Instances For
        Dependency graph
        @[reducible, inline]

        The bit symbol in the ordered expansion.

        Equations
        Instances For
          Dependency graph
          @[reducible, inline]

          The target symbol in the ordered expansion.

          Equations
          Instances For
            Dependency graph
            @[reducible, inline]

            The place-value order symbol in the ordered expansion.

            Equations
            Instances For
              Dependency graph
              Dependency graph
              Dependency graph
              Dependency graph
              Dependency graph

              x is below y in the place-value order, as a formula.

              Equations
              Instances For
                Dependency graph
                noncomputable def DescriptiveComplexity.IPRed.minF {α : Type} (x : α) :

                x is a minimum of the input order, as a formula.

                Equations
                Instances For
                  Dependency graph
                  Dependency graph
                  Dependency graph
                  @[simp]
                  theorem DescriptiveComplexity.IPRed.realize_bitF {α A : Type} [FirstOrder.Language.binWeights.Structure A] [LinearOrder A] {v : αA} {i p : α} :
                  (bitF i p).Realize v BWBit (v i) (v p)
                  Dependency graph
                  Dependency graph
                  @[simp]
                  theorem DescriptiveComplexity.IPRed.realize_leBwF {α A : Type} [FirstOrder.Language.binWeights.Structure A] [LinearOrder A] {v : αA} {x y : α} :
                  (leBwF x y).Realize v BWLe (v x) (v y)
                  Dependency graph
                  Dependency graph

                  The interpretation #

                  The interpretation of a 0-1 integer program in a binary-weighted instance: one column per item, one bit position per bit position, and a single row – the minimum of the input order – whose entries are the weights and whose right-hand side is the target.

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

                    The interpreted structure is a copy of the input #

                    The point of the interpreted structure carrying a.

                    Equations
                    Instances For
                      Dependency graph
                      @[simp]
                      theorem DescriptiveComplexity.IPRed.ipPt_snd {A : Type} (a : A) (j : Fin 1) :
                      (ipPt a).2 j = a
                      Dependency graph
                      Dependency graph
                      Dependency graph

                      The interpreted universe is a copy of the input, which is what makes the whole correctness proof a transport.

                      Equations
                      Instances For
                        Dependency graph
                        Dependency graph

                        Characterization of the interpreted relations #

                        Dependency graph
                        Dependency graph
                        Dependency graph
                        Dependency graph
                        Dependency graph
                        Dependency graph

                        The interpreted order is the input's own place-value order, read on the copy.

                        Dependency graph

                        The numbers, transported #

                        The entry of the single row in the column of an item is the weight of that item.

                        Dependency graph

                        The right-hand side of the single row is the target.

                        Dependency graph

                        Correctness #

                        Correctness of the reduction: a binary-weighted instance has a set of items summing to the target iff the one-equation program interpreted in it has a 0-1 solution.

                        Dependency graph

                        Knapsack FO-reduces to 0-1 integer programming, over any linear order on the input: the items become the columns, the target the right-hand side, and the whole instance a single equation, carried by the minimum of the order.

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