Abstract
This research explores "one-pass" rewriting games on strings, providing a theoretical model for processing streaming data like Active XML. The study identifies specific conditions, such as prefix-freeness and bounded-depth properties, under which optimal winning strategies exist. We demonstrate that while verifying a strategy is computationally efficient (P), finding or comparing them leads to significant complexity challenges, specifically NP-complete and PSPACE-complete problems.
Introduction: The Problem of Streaming Rewriting
The paper investigates context-free games played on strings between two players: Juliet (the rewriter) and Romeo (the environment). In this model, a string contains "active nodes" representing calls to external services. Juliet selects a node to activate, and Romeo replaces it with a new string based on predefined rules. Juliet's objective is to transform the initial string into one belonging to a specific target language.
This framework abstracts Active XML (AXML) document evolution. Unlike previous models where the rewriter has full knowledge of the string, this work focuses on the one-pass (streaming) setting. Here, Juliet moves left-to-right and must decide whether to "read" or "call" a symbol without knowing the future contents of the stream. This information asymmetry makes finding a "dominant" strategy—one that wins whenever any strategy could win—exceptionally difficult.
Methodology and Strategy Classes
The authors employ formal language and automata theory to analyze these games. They define several strategy classes:
- Regular strategies: Decisions are governed by a finite state automaton.
- Forgetful strategies: Juliet ignores the internal structure of replaced strings, focusing only on the resulting symbols.
- Strongly regular strategies: A restricted class derived from the target language's minimal automaton.
The research focuses on strategy existence under constraints like prefix-free replacement rules or non-recursive games, using reductions from 3SAT and NFA universality to establish complexity bounds.
Key Insights: Bounded-Depth and Prefix-Freeness
A central contribution is the introduction of the Bounded-Depth Property. If a game ensures Juliet can win within a fixed number of recursive calls for any given string length, a weakly dominant strategy is guaranteed.
Furthermore, the paper highlights the practicality of Prefix-Freeness. By appending an "end-of-file" symbol to replacement strings, any game can be rendered prefix-free. Such games are well-behaved, consistently allowing for regular weakly dominant strategies. This relates to the "Online Word Problem for NFAs," where transitions must be decided as symbols are revealed sequentially.
Results and Complexity Analysis
The study provides a comprehensive taxonomy of strategy existence and the computational effort required to manage them.
Key complexity results include:
- IsWinning: Determining if a regular strategy wins on a specific word is in P.
- ExistsWinning(SREG): Finding if a strongly regular winning strategy exists is NP-complete.
- IsDominated: Comparing if one strategy is strictly better than another is PSPACE-complete.
Existence results show that prefix-free games always possess regular weakly dominant strategies, while unary games (single-character alphabets) always have undominated strategies.
Conclusion and Future Directions
While the paper settles the complexity for strongly regular strategies, the decidability of finding general regular strategies remains an open question. Future work may also address whether all context-free games possess undominated strategies or if some games allow every strategy to be outperformed on specific inputs. The "Bounded-Depth Universality" conjecture—that every game might inherently possess this property—remains a significant unproven hypothesis.
Summary updated