Documentation

DescriptiveComplexity.Problems.Hamilton.CountingUndirected

#Hamilton Circuit: counting the circuits of an undirected graph #

The counting version of DescriptiveComplexity.HamCircuit: the number of Hamilton circuits of a graph, a circuit being its set of edges (DescriptiveComplexity.IsUCircuit) – the symmetric relation “x and y are consecutive” – and not one of its two orientations.

Membership #

The certificate is still a linear order, and a circuit has 2n of them: n places to cut it and two directions to read it. The counting kernel (DescriptiveComplexity.sharpHamKernel) fixes both: the order starts at the least element of the instance, as for the directed problem, and of the two neighbours of that element on the circuit it goes first to the smaller one (DescriptiveComplexity.Oriented). Every circuit has exactly one such order: one exists because reversing an order reverses its cyclic successor (DescriptiveComplexity.cycSucc_reverse), and two of them with the same edges agree at the root by the orientation rule, hence everywhere, by induction along the circuit (DescriptiveComplexity.cycSucc_of_sym). Hence DescriptiveComplexity.sharpHamCircuit_mem_sharpP.

Parsimonious hardness is in DescriptiveComplexity.Problems.Hamilton.CountingUndirectedHardness.

def DescriptiveComplexity.IsUCircuit {A : Type} (R E : A → A → Prop) :

The relation E is the edge set of a Hamilton circuit of R: the symmetric closure of a circuit of R.

Equations
Instances For
    Dependency graph
    theorem DescriptiveComplexity.IsUCircuit.of_equiv {A B : Type} (u : A ≃ B) {RA : A → A → Prop} {RB : B → B → Prop} (hR : ∀ (a a' : A), RA a a' ↔ RB (u a) (u a')) {E : A → A → Prop} (h : IsUCircuit RA E) :
    IsUCircuit RB fun (b b' : B) => E (u.symm b) (u.symm b')

    Undirected circuits transport along an equivalence commuting with the relations.

    Dependency graph
    def DescriptiveComplexity.ucircuitEquiv {A B : Type} (u : A ≃ B) {RA : A → A → Prop} {RB : B → B → Prop} (hR : ∀ (a a' : A), RA a a' ↔ RB (u a) (u a')) :
    { E : A → A → Prop // Finite A ∧ IsUCircuit RA E } ≃ { E : B → B → Prop // Finite B ∧ IsUCircuit RB E }

    The undirected circuits of two relations an equivalence exchanges are in bijection.

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

      One order per undirected circuit #

      def DescriptiveComplexity.Oriented {A : Type} [LE A] (C : A → A → Prop) :

      The orientation rule: from the least element, the circuit goes first to the smaller of its two neighbours.

      Equations
      Instances For
        Dependency graph
        theorem DescriptiveComplexity.cycSucc_of_sym {A : Type} [LinearOrder A] [Finite A] {Le Le' : A → A → Prop} (h : IsLinOrd Le) (h' : IsLinOrd Le') {a₀ : A} (ha₀ : IsBot a₀) (hsym : ∀ (x y : A), CycSucc Le x y ∨ CycSucc Le y x ↔ CycSucc Le' x y ∨ CycSucc Le' y x) (ho : Oriented (CycSucc Le)) (ho' : Oriented (CycSucc Le')) (x y : A) :
        CycSucc Le x y → CycSucc Le' x y

        Two oriented cuts with the same edges have the same cyclic successor.

        Dependency graph
        theorem DescriptiveComplexity.card_orientedTour_eq {A : Type} [LinearOrder A] [Finite A] [Nonempty A] (R : A → A → Prop) (hRsym : ∀ (x y : A), R x y → R y x) :
        Nat.card { Le : A → A → Prop // IsLinOrd Le ∧ (∀ (x y : A), SuccOf Le x y → R x y) ∧ (∀ (x y : A), (∀ (z : A), Le x z) → (∀ (z : A), Le z y) → R y x) ∧ (∀ (x : A), IsBot x → ∀ (y : A), Le x y) ∧ Oriented (CycSucc Le) } = Nat.card { E : A → A → Prop // IsUCircuit R E }

        Undirected circuits are the oriented orders that start at the least element, bijectively.

        Dependency graph

        The counting problem #

        The relation E is the edge set of a Hamilton circuit of a finite graph.

        Equations
        Instances For
          Dependency graph

          #Hamilton Circuit: the number of Hamilton circuits of a graph, a circuit being its set of edges.

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

            Membership #

            noncomputable def DescriptiveComplexity.cycF {α : Type} (x y : α) :

            The cyclic successor of the guessed order, as a formula.

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

              #Hamilton Circuit is in #P: a circuit has exactly one oriented cut at the least element of the instance.

              Dependency graph