Documentation

DescriptiveComplexity.Problems.Partition.Membership

Partition is in NP #

The certificate guesses the split and two ripple-carry walks, one along the chosen items and one along the items left out, and asks that they end on the same number. Two things differ from Knapsack (DescriptiveComplexity.Problems.Knapsack.Membership):

The two walks are the same clauses read twice, once for the side b = true (the chosen items) and once for b = false (the others), so the whole clause family is written as a function of b, and so is the semantic argument, which is DescriptiveComplexity.chain_sound and DescriptiveComplexity.exists_chain (DescriptiveComplexity.Problems.Knapsack.Chain) applied twice.

The relation variables of the certificate: the chosen items, and the running totals and carries of the two walks.

  • sel : PIdx

    The chosen items.

  • ps (b : Bool) : PIdx

    The running total of the walk on the side b.

  • cy (b : Bool) : PIdx

    The carries of the walk on the side b.

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

    The single existential block of the Σ₁ definition of Partition: the chosen items (unary), and, for each side, the running totals and the carries (ternary: an item and a wide position, itself a pair).

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

      The symbol of the running total of the side b.

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

        The item symbol in the kernel's vocabulary.

        Equations
        Instances For
          Dependency graph
          @[reducible, inline]

          The position symbol in the kernel's vocabulary.

          Equations
          Instances For
            Dependency graph
            @[reducible, inline]

            The bit symbol in the kernel's vocabulary.

            Equations
            Instances For
              Dependency graph
              @[reducible, inline]

              The order symbol in the kernel's vocabulary.

              Equations
              Instances For
                Dependency graph
                @[reducible, inline]

                The chosen-items symbol in the kernel's vocabulary.

                Equations
                Instances For
                  Dependency graph
                  @[reducible, inline]

                  The running-total symbol of the side b in the kernel's vocabulary.

                  Equations
                  Instances For
                    Dependency graph
                    @[reducible, inline]

                    The carry symbol of the side b in the kernel's vocabulary.

                    Equations
                    Instances For
                      Dependency graph

                      Formula builders #

                      Dependency graph
                      Dependency graph

                      The clauses #

                      Realization #

                      Membership #

                      Partition is Σ₁-definable: guess the split and the two ripple-carry walks, one along the chosen items and one along the others, and check first-order that they end on the same number. Since NP is defined as Σ₁-definability, this is the membership half of the NP-completeness of Partition.

                      Dependency graph