Selective Memoization for Efficient Backtracking Regular Expression Matching

πŸ“… 2026-06-25
πŸ“ˆ Citations: 0
✨ Influential: 0
πŸ“„ PDF
πŸ€– AI Summary
This work addresses the exponential worst-case time complexity of backtracking regular expression matchers and the prohibitive memory overhead of full memoization, which, while guaranteeing linear-time matching, is often impractical. The paper introduces a novel minimal feedback node (MFN) memoization strategy that, for the first time, applies the concept of minimum feedback vertex sets to regular expression matching. By selectively memoizing states in both Thompson and Glushkov automata, MFN achieves linear matching time while substantially reducing memory consumption. The approach establishes theoretical connections to existing methods and provides a unified analysis of memoization behavior across both automaton constructions, thereby enhancing the practicality and performance of backtracking matchers in real-world applications.
πŸ“ Abstract
Backtracking regular expression matchers are widely used due to their expressive power but may exhibit exponential worst-case matching time. Memoization provides a principled method for eliminating redundant computation and ensuring linear matching time, but full memoization is memory-intensive and impractical. We introduce the Minimum Feedback Node (MFN) memoization scheme, a selective memoization strategy based on computing a minimum feedback vertex set of an automaton. We establish relationships with existing memoization schemes and analyze their behaviour under both Thompson and Glushkov automaton constructions.
Problem

Research questions and friction points this paper is trying to address.

backtracking
regular expression matching
memoization
exponential time
memory efficiency
Innovation

Methods, ideas, or system contributions that make the work stand out.

selective memoization
minimum feedback vertex set
backtracking regex matching
linear-time matching
automaton construction
πŸ”Ž Similar Papers
No similar papers found.