An ordinary regular expression can match either of two patterns, concatenate patterns, or repeat a pattern any number of times. A backreference adds memory. A capture saves the particular substring it matched. A later read of the same variable must match that exact sequence of letters. The question is how efficiently one can decide whether a whole input word matches, and which restrictions on reads make that task easier. Kumabe and Uezato, ICALP 2026
Take four ordinary regular expressions and a word of length . Can we split it as
The two copies of must be identical. Each factor may be empty if its expression permits it. Theorem 7 gives one decision algorithm that takes the four expressions and the word as input. For its time bound, including preprocessing, is
This is the main proof target. Full paper, §1.1
A computation can save many substrings, and different branches may read different variables. An expression is one-use when every computation performs at most one read in total. Reading an uninitialized variable consumes the empty word and still counts as one read.
Theorem 6 constructs a finite union of expressions of the form above, together with one ordinary expression, describing exactly the same language as any one-use expression . The construction takes time and the number and sizes of its output branches have separate bounds. Combining this normalization with the main algorithm gives Theorem 8. The time for arbitrary one-use matching is .
Theorem 9 treats a different repetition pattern. For a prescribed , a middle word matching must occur in consecutive, identical copies between words matching and . With , one algorithm takes time. Another takes time.
Theorem 3 makes the expression part of the input and uses its size as the parameter. A parameterized reduction from Dominating Set establishes -hardness. Theorems 4 and 5 give lower bounds even for fixed expressions. Under the triangle-detection hypothesis, two variables and two reads suffice for a polynomial gap above linear time. Under the orthogonal-vectors hypothesis, for each there is a fixed expression with variables and unboundedly many possible reads that rules out time for every .
The targets use Mathlib's ordinary regular expressions, a semantics for captures and reads, and an explicit bounded-word RAM. The algorithms receive encoded inputs and must halt with the specified output. Expression size counts syntax-tree nodes. The word length is logarithmic in the input size for each fixed alphabet, with constants fixed per program. The formal statements use shifted sizes and binary logarithms to include words of length zero and one. Theorem 9 keeps both repetition-algorithm bounds together. Each of the other six targets corresponds to one numbered theorem in the introduction. Full paper
namespace BackreferenceMatching
theorem theorem_7 (q : ℕ) :
∃ (p : Program) (a c : ℕ), 0 < c ∧
∀ (r : Branch q) (w : Word q),
DecidesWithin p a q (r.code ++ wordCode w) (ABCBD r w)
(2 ^ (c * r.size^2) * (w.length + 1) * (logFactor w.length)^2) := by
sorry
end BackreferenceMatchingGiven four ordinary regular expressions and a word , decide whether for some , , , and . The two copies of are identical. One uniform word-RAM algorithm, including preprocessing, runs in time for and .
No open leaves. Every sub-goal is proved or awaiting decomposition.