1 of 55

the equality problem in�automata, combinatorics, and logic

L. Clemente (University of Warsaw)

Infinity @ Antwerp, September 2023

2 of 55

summary

  • model: finitely presented combinatorial structures
  • problem: deciding Wilf (multiplicity) equivalence

  • examples:
    • polynomials (PIT / ACIT / EqSLP)
    • constructively algebraic series (CA)
    • constructively differentially algebraic series (CDA)

  • many open problems

3 of 55

1. combinatorial structures

a combinatorial class of structures over a signature Σ is a sequence A₁, A₂, …�where Aₙ is a class of structures over Σ with domain {1, …, n}.

examples:

  • graphs: Σ = {E: 2}, Aₙ = all graphs with vertices {1, …, n}
  • finite words: Σ = {P: 1}, Aₙ = all linear orders of the form ({1, …, n}, ≤, P)�(isomorphic to {a, b}ⁿ)
  • set partitions: Σ = {≈: 2}, Aₙ = all equivalence relations ≈ on {1, …, n}
  • fix a VASS V, Aₙ all accepting runs of V of length n.

4 of 55

1. labelled vs. unlabelled

Undirected graphs on three vertices

1

2

3

1

2

3

1

2

3

1

2

3

1

2

3

1

2

3

1

2

3

1

2

3

labelled

unlabelled

5 of 55

2. Wilf equivalence (labelled)

a combinatorial class of structures over a signature Σ is a sequence A₁, A₂, …�where Aₙ is a class of structures over Σ with domain {1, …, n}.

its labelled Specker sequence is Fₙ := size of Aₙ [1].

its labelled Specker series is F(x) := Σₙ Fₙ · xⁿ / n! (exponential generating series).

labelled Wilf equivalence problem: given two combinatorial classes,�do they have the same labelled Specker sequence / series?

[1] Specker, Blatter: “Recurrence relations for the number of labeled structures on a finite set” 1984

6 of 55

2. Wilf equivalence (unlabelled)

a combinatorial class of structures over a signature Σ is a sequence A₁, A₂, …�where Aₙ is a class of structures over Σ with domain {1, …, n}.

its unlabelled Specker sequence is fₙ := size of Aₙ up to automorphism.

its unlabelled Specker series is f(x) := Σₙ fₙ · xⁿ (ordinary generating series).

unlabelled Wilf equivalence problem: given two combinatorial classes,�do they have the same unlabelled Specker sequence / series?

[1] Specker, Blatter: “Recurrence relations for the number of labeled structures on a finite set” 1984

7 of 55

3. examples (empty signature)

8 of 55

3. examples (one unary relation P)

9 of 55

3. examples (one binary relation R)

10 of 55

3. case studies

3a. polynomials (PIT / ACIT / EqSLP)

  • equivalence of algebraic circuits
  • long-standing open problem in numerical analysis:
    • in coRP ⊆ coNP
    • not known to be coNP-hard

3b. constructively algebraic series (CA)

  • generalisation of circuits
  • in coRP^PP

3c. constructively differentially algebraic series (CDA)

11 of 55

3a. polynomial identity testing

polynomials (succinctly) represented as circuits with sum and product

+

y₁

5

-3

y₂

12 of 55

3a. polynomial identity testing

small circuits yield exponential degrees

y

y^(2^n)

13 of 55

3a. polynomial identity testing

  • EqSLP: equality problem for circuits (straight line programs) over ℤ
    • in coRP (randomised polynomial time) ⊆ coNP [1]
    • not known to be e.g. coNP-hard
    • exact complexity is a major open problem�
  • PIT / ACIT: equality problem for circuits over ℤ[x₁, …, xₖ]
  • in coRP [2], building on [3, 4, 5]
  • in fact PTIME-equivalent to EqSLP [6]

[1] Schönhage “On the power of random access machines” ICALP’79

[2] Ibarra, Moran “Equivalence of straight-line programs” JACM’83

[3] DeMillo, Lipton “A probabilistic remark on algebraic program testing” IPL’78

[4] Schwartz “Fast probabilistic algorithms for verification of polynomial identities” JACM’80

[5] Zippel “Simplification of Radicals with Applications to Solving Polynomial Equations” MsC thesis ’77

[6] Allender, Bürgisser, Kjeldgaard-Pedersen, Miltersen “On the Complexity of Numerical Analysis” SIAM JC’09

14 of 55

3b. constructively algebraic series

series represented as circuits with (guarded) recursion

z = 1 + y · z²

⇒ z = 1 + y + 2y² + …

+

1

y

z

15 of 55

3b. constructively algebraic series

a tuple of multivariate power series

f₁, …, fₕ ∈ ℚ⟦y₁, … , yₖ⟧

is constructively algebraic (CA) if it is the unique solution�(cf. implicit function theorem) of a system of polynomial equations

z₁ = p₁ (y₁, … , yₖ; z₁, … , zₕ)

zₕ = pₕ (y₁, … , yₖ; z₁, … , zₕ)

where p₁, …, pₕ ∈ ℚ[y₁, … , yₖ; z₁, … , zₕ].

16 of 55

3b. CA series: examples (1)

  • lists: L = 1 + y · L
  • binary trees: T = y · (1 + T²)
  • ternary trees: U = y · (1 + U³)
  • ordered trees: V = y · (1 + V + V² + …) = y / (1 - V)
  • Kreweras walks [1]: K = y · (2 + K³)�
  • rooted planar maps [2]: M = T - y · T³� T = 1 + 3y · T²

open problem: Is every ℕ-valued CA series a ℕ-CA series?�(i.e., definable by a equations with coefficients in ℕ)

�[1] Kreweras “Sur une classe de problemes de denombrement lies au treillis des partitions des entiers” ‘65�[2] Tutte “On the enumeration of planar maps” AMS Bulletin ‘68

17 of 55

3b. CA series: examples (2)

census generating series of context-free grammars are algebraic [1]:�

grammar X ← a b a | a X X b

census fₘₙ := # derivation trees of words in L(X)

with m a’s and n b’s

census gen. series f(x₀, x₁) := ∑ₘₙ fₘₙ · x₀^m · x₁^n

polynomial eqn. y = x₀² · x₁ + x₀ · x₁ · y²

[1] Chomsky, Schützenberger “The Algebraic Theory of Context-Free Languages” ‘63

18 of 55

3b. CA series: problems

given a multivariate polynomial / CA series

represented as a circuit / the unique solution of a system of polynomial equations

  • EqSLP / EqALG (zeroness): is it the zero polynomial / power series?

  • OrdSLP / OrdALG (order): given d ∈ ℕ, is the order ≥ d?

the order (lowest degree) of e.g.

  • y² + y⁵ + O(y⁶) is 2.
  • 0 is infinity

EqXXX reduces to OrdXXX by exponential upper bounds� on the order of a nonzero polynomial / series

19 of 55

3b. CA series: results

  • all reductions are PTIME
  • ! is by Hensel’s lemma
  • ??? is an interesting open problem

[0] Forejt, Jancar, Kiefer, Worrell “Language equivalence of probabilistic pushdown automata” Inf. Comput. ’14

[1] Kayal, Saha “On the Sum of Square Roots of Polynomials and Related Problems” ACM Trans. Comput. Theory’12

[2] Balaji, C, Nosan, Shirmohammadi, Worrell “Multiplicity Problems on Algebraic Series and Context-Free Grammars” LICS’23

OrdALG

EqALG

OrdSLP

EqSLP

polynomials

CA series

???

∈ coRP

∈ coRP^PP [1]

! [2]

[0] PSPACE ∋

20 of 55

3b. how bad is coRP^PP?

  • PP = # accepting > # rejecting runs (majority) [1]
  • P ⊆ coRP ⊆ BPP ⊆ PP ⊆ PSPACE�

good: coRP^PP ⊆ PP^PP the second level of the counting hierarchy

CH = P ∪ PP ∪ PP^PP ∪ PP^(PP^PP) ∪ … ⊆ PSPACE�

bad: by Toda’s theorem [2], PH ⊆ P^PP (!)

[1] Gill “Computational Complexity of Probabilistic Turing Machines” SIAM Journal on Computing ‘77

[2] Toda “PP is as Hard as the Polynomial-Time Hierarchy” SIAM Journal on Computing ‘91

21 of 55

3b. solution concepts

  • step 1 (rational approximation): compute a rational series agreeing on exponentially many initial monomials.�(Newton’s iteration + Hensel’s lemma [1, 2])�
  • step 2 (polynomial approximation): construct in PTIME a circuit computing a polynomial agreeing on exponentially many initial monomials.

(Strassen’s trick [3]: simulate division by multiplication)

→ The CA series and the polynomial computed by the circuit have the same order

�[1] Bourbaki “Commutative Algebra” 1998

[2] Eisenbud “Commutative algebra: with a view toward algebraic geometry 1995

[3] Strassen “Vermeidung von divisionen” 1973

22 of 55

3b. rational approx. of CA series

vs.

Newton iteration

the n-th iterate agrees with the CA series�on terms of total degree O(2ⁿ)

by Hensel’s lemma

Kleene iteration

the n-th iterate agrees with the CA series�on terms of total degree O(n)

23 of 55

3b. polynomial approx. of rat. series

  • ultimate aim: algebraic circuit without division gates.�
  • how to achieve it:�
    • compute the first O(2ⁿ) terms of �p · (1 - q)⁻¹ = p · (1 + q + q² + q³ + …), where p, q ∈ ℚ[x]�
    • just keep the first O(2ⁿ) powers of q:�p · (1 + q + q² + q³ + … + q^(2ⁿ))

24 of 55

3b. circuit approx. of rat. series

  • ultimate aim: circuit without division gates.�
  • current aim: compute the first O(2ⁿ) powers of q:�p · (1 + q + q² + q³ + … + q^(2ⁿ))�
  • issue: naive computation of q^(2ⁿ) is exponential

  • solution: circuit on the right

25 of 55

3b. CA series: results

Theorem [0]. EqALG reduces in PTIME to OrdSLP and thus is in coRP^PP.

[0] Balaji, C, Nosan, Shirmohammadi, Worrell “Multiplicity Problems on Algebraic Series and Context-Free Grammars” LICS’23

[1] Forejt, Jancar, Kiefer, Worrell “Language equivalence of probabilistic pushdown automata” Inf. Comput. ’14

open problem: does EqALG reduce in PTIME to EqSLP? is it in coRP?

(improving on PSPACE [1])

26 of 55

3b. CA series: one application

(*) for every word, they have the same number of accepting derivation trees

(**) L ⊆ w₁* … wₖ* for words w₁, …, wₖ ∈ Σ* [1]; by a PTIME reduction to EqALG

[0] Balaji, C, Nosan, Shirmohammadi, Worrell “Multiplicity Problems on Algebraic Series and Context-Free Grammars” LICS’23

[1] Ginsburg “The mathematical theory of context-free languages” 1966

[2] Mathew, Penelle, Saivasan, Sreejith “Weighted one-deterministic-counter automata” ArXiv’23

Theorem [0]. The following problem is decidable (in coRP^PP):

multiplicity equivalence (*) of grammars restricted to a bounded lang. (**).

major open problem: is multiplicity equivalence of grammars decidable?

  • recently solved for “one-deterministic-counter automata” [2]

27 of 55

3c. from CA to CDA series

a tuple of power series

f₁, …, fₕ ∈ ℚ⟦x⟧

is constructively algebraic (CA) if it is the unique solution�of a system of polynomial equations

f₁ = p₁ (x; f₁, …, fₕ)

fₕ = pₕ (x; f₁, …, fₕ)

with polynomial kernel p₁, …, pₕ ∈ ℚ[x; z₁, …, zₕ].

28 of 55

3c. from CA to CDA series

a tuple of power series

f₁, …, fₕ ∈ ℚ⟦x⟧

is constructively differentially algebraic (CDA) if it is the unique solution�of a system of ordinary differential equations (ODEs)

𝝏ₓ f₁ = p₁ (x; f₁, …, fₕ)

𝝏ₓ fₕ = pₕ (x; f₁, …, fₕ)

with polynomial kernel p₁, …, pₕ ∈ ℚ[x; z₁, …, zₕ].�(multivariate generalisation available)

29 of 55

3c. CA ⊆ CDA by example

Catalan numbers C = 1 + x · C²

⇒ 𝝏ₓC = C² + 2x · C · 𝝏ₓC

⇒ 𝝏ₓC = C² / (1 - 2x · C)

let D := 1 / (1 - 2x · C), then

𝝏ₓC = C² · D

𝝏ₓD = D² · (2C + 2x · C² · D)

30 of 55

3c. Bell numbers are CDA

by the composition principle, partition numbers satisfy

B = e^(e^x - 1)

⇒ 𝝏ₓB = B · e^x

let E := e^x, then

𝝏ₓB = B · E

𝝏ₓE = E

31 of 55

3c. Caley numbers are CDA

by the composition principle, rooted unordered trees satisfy

T = x · e^T

⇒ 𝝏ₓT = e^T + x · e^T · 𝝏ₓT = e^T + T · 𝝏ₓT

⇒ 𝝏ₓT = e^T / (1 - T)

let E := e^T, S = 1 / (1 - T), then

𝝏ₓT = E · S

𝝏ₓE = E

𝝏ₓS = E · S³

32 of 55

3c. series-parallel graphs are CDA [1]

a series-parallel graph is a single node / series / parallel graph

G = x + S + P

a series graph is a nonempty sequence of single nodes / parallel graphs

S = 1 / (1 - (x + P)) - 1

a parallel graph is a nonempty set of single nodes / series graphs

P = e^(x + S) - 1

𝝏ₓG = …

𝝏ₓS = …

𝝏ₓP = …

[1] Pivoteau, Salvy, Soria “Algorithms for combinatorial structures: Well-founded systems and Newton iterations” ’12

33 of 55

3c. constructing CDA series

Theorem [1, 2, 3, 4]. The power series of combinatorial classes built from the primitives above and recursion are CDA.

[1] Joyal: “Une théorie combinatoire des séries formelles” (Advances in Mathematics, 1981)

[2] Bergeron, Labelle, Leroux, Readdy: “Combinatorial Species and Tree-like Structures” (CUP, 1998)

[3] Flajolet, Sedgewick: “Analytic Combinatorics” (CUP, 2009)

[4] Pivoteau, Salvy, Soria: “Algorithms for combinatorial structures: Well-founded systems and Newton iterations” (Journal of Combinatorial Theory, 2012)

combinator

singleton {a}

disjoint union A ⊎ B

product A · B

list of A’s

cyclic list of A’s

multiset of A’s

algebra

x

sum f + g

product f · g

1 / (1 - f)

- log(1 - f)

e^f

34 of 55

3c. CDA closure properties

  • sum: f + g
  • product: f · g
  • reciprocal (when defined): 1 / f
  • integration (only in the univariate case): ∫ f
  • differentiation: 𝛛 f
  • composition (when defined): f(g_1, …, g_m)
  • compositional inverse (when defined): f^(-1)
  • resolution of ODEs with CDA kernel
  • resolution of recursive polynomial systems with CDA kernel

  • but: non-closure under Hadamard (term-wise) product

35 of 55

3c. CDA kernels = CDA

if a tuple of power series

f₁, … , fₕ ∈ ℚ⟦x⟧

solves the ODE

𝝏ₓ f₁ = g₁ (x; f₁, … , fₕ)

𝝏ₓ fₕ = gₕ (x; f₁, … , fₕ)

with CDA kernel g₁, …, gₕ ∈ ℚ⟦x; z₁, …, zₕ⟧, then it is itself CDA.

36 of 55

3c. CDA recursion = CDA

if a tuple of power series

f₁, … , fₕ ∈ ℚ⟦x⟧

is the unique solution of the system

f₁ = g₁ (x; f₁, … , fₕ)

fₕ = gₕ (x; f₁, … , fₕ)

with CDA kernel g₁, …, gₕ ∈ ℚ⟦x; z₁, …, zₕ⟧, then it is itself CDA.

37 of 55

3c. remarks

  • differentiation = shift:

if f = a₀ + a₁·x + a₂·x²/ 2! + …

then 𝝏ₓ f = a₁ + a₂·x + a₃·x²/2! + …

  • multiplication = binomial convolution product

  • CDA series are analytic around the origin as functions ℝ → ℝ,

however we never need this

⇒ we develop the theory of CDA series purely formally (algebraically)

⇒ this is a good fit to decide zeroness and equality of CDA series

  • the ODE format is ubiquitous in engineering, mathematics, dynamical systems, analog computing…

38 of 55

3c. series zoo

differentially transcendental series: OGF of Bell numbers…

differentially algebraic series: OGF of n!

CDA series: EGF of Bell numbers, of n^n…

CA series: Catalan numbers

rational series: 1 + x + x² + x³ + ...

polynomials: 1 - x³

39 of 55

3c. CDA vs. D-finite series

a series f is D-finite if it satisfies a linear diff equation with poly coeffns [0]:

(p₀(x) + p₁(x)𝝏ₓ + p₂(x)𝝏ₓ² + … + pₙ(x)𝝏ₓⁿ) f = 0

the CDA and D-finite are incomparable:

  • f = e^(e^x - 1) is CDA but not D-finite [1]
  • f = Σₙ n! · xⁿ is D-finite but not CDA (not analytic around 0)

a least common generalisation is available…

[0] Stanley “Differentiably Finite Power Series” European Journal of Combinatorics ’80

[1] Bostan, Di Vizio, Raschel “Differential transcendence of Bell numbers and relatives: a Galois theoretic approach” ’21

40 of 55

3c. CDA equality problem

Theorem. The CDA equality problem is decidable with 2EXPTIME complexity.

related results:

  • univariate CDA series: decidable [1]
  • differentially algebraic series: decidable [1]

[1] Denef, Lipshitz “Power series solutions of algebraic differential equations” Mathematische Annalen 1984

41 of 55

3c. CDA solution technique

short witness property:�two distinct CDA series f, g differ by a monomial of degree at most 2-exp

roadmap via effective ideal theory:

  • construct a sequence of polynomial ideals
  • observe that this sequence terminates after at most 2-exp steps [1]
    • short sequences of polynomial ideals are rare
  • this gives a certificate of equality if agree on low degree monomials

[1] Novikov, Yakovenko “Trajectories of polynomial vector fields and ascending chains of polynomial ideals” 1999

42 of 55

3c. CDA solution technique (2)

ℚ⟦x⟧

ℚ[y₁, …, yₕ]

fix a CDA system 𝝏ₓf₁ = p₁(f₁, …, fₕ)

𝝏ₓfₕ = pₕ(f₁, …, fₕ)

p

f

_ ○ (f₁, …, fₕ)

𝝏ₓf

𝝏ₓ

Lp

_ ○ (f₁, …, fₕ)

L

L : ℚ[y₁, …, yₕ] → ℚ[y₁, …, yₕ]

L = p₁ · 𝝏y₁ + … + p₁ · 𝝏y

(Lie derivative)

⇒ 𝝏ₓⁿ f = Lⁿp ○ (f₁, …, fₕ)

is f = 0?

where f := p(f₁, …, fₕ)

43 of 55

3c. CDA solution technique (3)

  • 𝝏ₓⁿ f = Lⁿp ○ (f₁, …, fₕ)
  • consider the ideal chain J₀ ⊆ J₁ ⊆ … ⊆ ℚ[y₁, …, yₕ], Jₙ := < L⁰p, …, Lⁿp >
  • by Hilbert’s finite basis theorem, there is s ∈ ℕ s.t. Jₛ = Jₛ₊₁
  • there are polynomial witnesses q₀, …, qₛ ∈ ℚ[y₁, …, yₕ] s.t.

Lˢ⁺¹p = q₀· L⁰p + … + qₛ· Lˢp

  • by 1., there are series g₀ := q₀(f₁, … , fₕ), …, gₛ := qₛ(f₁, … , fₕ) ∈ ℚ⟦x⟧ s.t.

𝝏ₓˢ⁺¹ f = g₀· 𝝏ₓ⁰ f + … + gₛ· 𝝏ₓˢ f

  • if the first s coefficients of f are 0, then f = 0
  • s ≤ 2-exp(k) by [Novikov & Yakovenko, “Trajectories of polynomial vector fields and ascending chains of polynomial ideals” 1999]

44 of 55

3c. CDA finite basis problem

consider the ideal J of all polynomials vanishing on CDA series (f₁, …, fₕ):

J = { p ∈ ℚ[y₁, …, yₕ] | p(f₁, …, fₕ) = 0 }

  • example: 𝜕f = g, 𝜕g = -f ⇒ f² + g² = 1 thus y² + z² - 1 ∈ J
  • generalises equality since f = g iff y - z ∈ J

open problems:

  • can we compute a finite basis for J?
  • what is the complexity?

note: this is Skolem-hard for polynomial recursive sequences [1]

[1] Müllner, Moosbrugger, Kovács “Strong Invariants Are Hard: …” ArXiv 2023

45 of 55

3c. summary on the equality problem

  • rational series: PTIME [1] / NC² [2] (*)
  • CA series: coRP^PP [3]
  • D-finite series: EXPTIME [4]
  • CDA series: 2EXPTIME
  • differentially algebraic series: decidable [5], complexity?

(*) explicitly presented as LRS, otherwise PIT-complete if given with circuits

[1] Schützenberger “On the Definition of a Family of Automata” Information and Control 1961

[2] Tzeng “On path equivalence of nondeterministic finite automata” Information Processing Letters 1996

[3] Balaji, C, Nosan, Shirmohammadi, Worrell “Multiplicity Problems on Algebraic Series and Context-Free Grammars” LICS 2023

[4] Koechlin “Systèmes de fonctions holonomes, application à la théorie des automates” PhD thesis 2021

[5] Denef, Lipshitz “Power series solutions of algebraic differential equations” Mathematische Annalen 1984

46 of 55

4. VASS series

a VASS series f = Σₙ fₙ·xⁿ ∈ ℕ⟦x⟧ counts the number fₙ�of accepting computations of length n of a VASS

open problem: is equality of VASS series decidable?

notes:

  • VASS multiplicity equivalence over alphabets of size ≥ 2 is undecidable [1]
  • it is decidable (Ackerman) for k-ambiguous VASS, for each fixed k [2]
  • VASS series generalise walks in an orthant (cf. [3])

[1] Jančar “Nonprimitive recursive complexity and undecidability for Petri net equivalences” TCS’01

[2] Czerwiński, Hofman “Language Inclusion for Boundedly-Ambiguous Vector Addition Systems Is Decidable” CONCUR’22

[3] Bostan, Bousquet-Mélou, Melczer “Counting walks with large steps in an orthant” ’18

47 of 55

4. VASS series

a VASS series f = Σₙ fₙ·xⁿ ∈ ℕ⟦x⟧ counts the number fₙ�of accepting computations of length n of a VASS

open problem: is equality of VASS series decidable?

notes:

  • VASS multiplicity equivalence over alphabets of size ≥ 2 is undecidable [1]
  • it is decidable (Ackerman) for k-ambiguous VASS, for each fixed k [2]
  • VASS series generalise walks in an orthant (cf. [3])

[1] Jančar “Nonprimitive recursive complexity and undecidability for Petri net equivalences” TCS’01

[2] Czerwiński, Hofman “Language Inclusion for Boundedly-Ambiguous Vector Addition Systems Is Decidable” CONCUR’22

[3] Bostan, Bousquet-Mélou, Melczer “Counting walks with large steps in an orthant” ’18

48 of 55

4. Wilf equivalence for logic

a Specker series f = Σₙ fₙ·xⁿ ∈ ℕ⟦x⟧ counts the number fₙ�of models (up to iso) of a formula of logic

Wilf equivalence problem: equality of Specker series

  • undecidable for first-order logic: f ≠ 0 iff finitely satisfiable [1]
  • decidable for MSO over finite words: rational Specker series.

open ended question�which logics have a decidable Wilf equivalence problem?

[1] Trakhtenbrot “Impossibility of an algorithm for the decision problem in finite classes” ’50

49 of 55

here be dragons

hic

sunt

leones

50 of 55

template #1

thank you for your question

51 of 55

template #2

here is the proof

52 of 55

template #3

I haven’t thought about it

53 of 55

template #4

if I had the time I would…

but I don’t Q.E.D.

54 of 55

template #5

can we take this offline

55 of 55

the real INFINITY