Trace theory and parameterized counting

Trace counting under a small independence cover

Removing a small vertex cover from an independence graph leaves action types that cannot occur together in one concurrent step. That decomposition gives an exact fixed-parameter algorithm for one height-one trace layer. It does not extend to arbitrary traces: one commuting pair already supports the published#P\#\mathrm P-hardness construction for DFA trace counting.

The support cover is a concurrency parameter

A concurrent alphabet consists of an alphabetΣ\Sigma and a symmetric, irreflexive independence relationI\mathbb I. Adjacent independent letters may commute. Their equivalence classes are Mazurkiewicz traces.

The full counting problem also receives a lengthnn, encoded in unary, and asks how many traces contain at least one accepted word of that length. The unary convention is part of the published complexity statement, not a harmless implementation detail.

View I\mathbb I as an undirected graph and let

κ(I)=τ(I) \kappa(\mathbb I)=\tau(\mathbb I)

be its minimum vertex-cover number. IfBB is a cover, thenC=Σ∖BC=\Sigma\setminus Bcontains no independent pair. Consequently a simultaneous independent step contains an arbitrary clique fromBB and at most one letter from CC.

FPRD-SH-B11 · sharp negative boundary

Full trace counting is hard at cover number one

De Colnet, Meel, and Mathur prove exact DFA trace counting#P\#\mathrm P-hard in their Theorem 3.2, by a parsimonious reduction from#DNF\#\mathrm{DNF}. Their Theorem 3.1 separately proves membership in#P\#\mathrm P. The reduction uses the fixed alphabet

Σ={a,b,0,1,$},I={(a,b),(b,a)}. \Sigma=\{a,b,0,1,\$\},\qquad \mathbb I=\{(a,b),(b,a)\}.

Corollary. Exact DFA trace counting is#P\#\mathrm P-complete when the independence graph has one edge, vertex-cover numberκ=1\kappa=1, independence width two, maximum degree one, and matching number one.

The reduction represents term choice by the position of onebb among repeatedaas:

bak−1∼abak−2∼⋯∼ak−1b. ba^{k-1}\sim aba^{k-2}\sim\cdots\sim a^{k-1}b.

These are presentations of one trace, while the DFA uses the position to test one DNF term. A trace touches the language when at least one presentation selects a satisfied term. ChoosingB={b}B=\{b\} shows more: every accepted word contains exactly one occurrence of the only cover letter.

At κ=0\kappa=0 no letters commute, traces are words, and length-slice counting for a DFA is polynomial when the length is unary. The exact boundary therefore jumps from polynomial at zero to #P\#\mathrm P-complete at one.

FPRD-SH-T34 · exact height-one algorithm

The cover works for one nonempty Foata step

In the Cartier–Foata view of traces, one nonempty height-one step is a cliqueSS of the independence graph: its letters occur once, are pairwise independent, and all permutations of SS form one trace. The trace touches a DFA language when some permutation is accepted.

Theorem. Given anmm-state DFA and a supplied independence-graph vertex cover of sizeκ\kappa, all accepted nonempty one-step traces, including their size distribution, can be counted exactly in

O ⁣(∣Σ∣ κ2κm) O\!\left(|\Sigma|\,\kappa 2^\kappa m\right)

time andO(2κm)O(2^\kappa m) auxiliary space.

Every clique is uniquely eitherN⊆BN\subseteq B orN∪{c}N\cup\{c\} for onec∈Cc\in C. ForN⊆BN\subseteq B, letR0(N)R_0(N) be the DFA states reached by all permutations ofNN. Then

R0(∅)={q0},R0(N)=⋃b∈Nδ(R0(N∖{b}),b). R_0(\varnothing)=\{q_0\},\qquad R_0(N)=\bigcup_{b\in N}\delta(R_0(N\setminus\{b\}),b).

For a fixed core lettercc, the corresponding sets satisfy

Rc(N)=δ(R0(N),c)∪⋃b∈Nδ(Rc(N∖{b}),b). R_c(N)=\delta(R_0(N),c) \cup\bigcup_{b\in N}\delta(R_c(N\setminus\{b\}),b).

Splitting a permutation by its final letter proves the recurrences. A candidate touches the language exactly when its reachable-state set meets the final states. The recurrence may be evaluated for every mask, but only clique masks—and, forN∪{c}N\cup\{c\}, masks compatible with cc—are counted. There are2κ2^\kappa cover masks, and the core letters are processed one at a time.

FPRD-SH-C19 · exact computational audit

Kernel and direct permutation counts agree

ControlCoverageResult
All four-letter independence graphs64 graphsPass
All complete two-state DFAs and final sets65,536 instancesPass
Larger deterministic controls2,500 instancesPass
DNF reduction-pattern controls4,000 formulasPass

The exact audit compares the kernel dynamic program with direct subset and permutation enumeration. Two complete runs produced byte-identical output.

Audit program · canonical output · review certificate

The missing resource is sequential presentation width

The cover number bounds simultaneous compatibility among action types. It does not bound the number of positions an exceptional occurrence can occupy among repeated dependent actions, or the number of DFA residual states exposed by those positions. The hard construction has only one exceptional occurrence, but it exposes an unbounded term-selection orbit.

Any useful refinement must therefore control a presentation-sensitive quantity—such as the number of distinct DFA residuals realized by the linearizations of a trace prefix—in addition to the independence cover. Another parameter depending only on the fixed alphabet graph cannot change this hardness boundary.

Sources

  • Alexis de Colnet, Kuldeep S. Meel, and Umang Mathur, Counting and Sampling Traces in Regular Languages, Proceedings of the ACM on Programming Languages 10 (POPL 2026), article 81, pp. 2352–2379, DOI 10.1145/3776723; arXiv:2512.00314. Theorem 3.1 proves membership in #P\#\mathrm P; Theorem 3.2 is the fixed-alphabet parsimonious reduction used above.
  • Volker Diekert and Grzegorz Rozenberg, editors, The Book of Traces, World Scientific, 1995, ISBN 978-981-02-2058-7. This is the classical source for trace and normal-form terminology; it is not a source for the FPRD cover algorithm.