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

                      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 #

                        Correctness #

                        Stated for an explicit set of items and an explicit 0-1 vector, so that the same lemmas give the equivalence of the two decision problems and the bijection between their solutions (DescriptiveComplexity.Problems.ZeroOneIP.CountingHardness).

                        The columns of a set of items.

                        Equations
                        Instances For
                          Dependency graph

                          The items of a set of columns.

                          Equations
                          Instances For
                            Dependency graph

                            The order of the interpreted program is linear exactly when the input's is.

                            Dependency graph
                            theorem DescriptiveComplexity.IPRed.zeroOneSol_colsOf {A : Type} [FirstOrder.Language.binWeights.Structure A] [LinearOrder A] {S : A → Prop} (hSi : ∀ (i : A), S i → BWItem i) (hsum : ∑ᶠ (i : A) (_ : i ∈ {i : A | S i}), BWWeight i = BWTarget A) :
                            (∀ (q : ipInterp.Map A), colsOf S q → IPCol q) ∧ ∀ (r : ipInterp.Map A), IPRow r → ∑ᶠ (j : ipInterp.Map A) (_ : j ∈ {j : ipInterp.Map A | colsOf S j}), IPCoefVal r j = IPRhsVal r

                            A set of items summing to the target solves the one-equation program.

                            Dependency graph
                            theorem DescriptiveComplexity.IPRed.subsetSum_itemsOfCols {A : Type} [FirstOrder.Language.binWeights.Structure A] [LinearOrder A] {a₀ : A} (ha₀ : IsBot a₀) {x : ipInterp.Map A → Prop} (hxc : ∀ (j : ipInterp.Map A), x j → IPCol j) (heq : ∀ (r : ipInterp.Map A), IPRow r → ∑ᶠ (j : ipInterp.Map A) (_ : j ∈ {j : ipInterp.Map A | x j}), IPCoefVal r j = IPRhsVal r) :
                            (∀ (a : A), itemsOfCols x a → BWItem a) ∧ ∑ᶠ (i : A) (_ : i ∈ {i : A | itemsOfCols x i}), BWWeight i = BWTarget A

                            A solution of the one-equation program is a set of items summing to the target.

                            Dependency graph

                            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