Flashback: A Reversible Bilateral Run-Peeling Decomposition of Strings
Thomas Konstantinovsky, Gur Yaari

TL;DR
Flashback introduces a reversible string decomposition method that efficiently peels maximal character runs from strings, with a proven run-pairing theorem and structural properties, applicable in linear time and space.
Contribution
The paper presents a novel reversible bilateral run-peeling decomposition with a run-pairing theorem and structural insights, matching lower bounds for string tokenization.
Findings
Decomposition and reconstruction run in O(n) time and space.
Flashback's token count is optimal, matching a lower bound.
Structural properties include characterisation of palindromes and finite-state representation.
Abstract
We introduce Flashback, a reversible string decomposition that repeatedly peels the maximal leading and trailing character runs from a sentinel-wrapped input, recording each pair as one bilateral token. Decomposition and reconstruction both run in O(n) time and space. Our central result is a run-pairing theorem: Flashback is equivalent to pairing the first run of the string with the last, the second with the second-to-last, and so on. This gives an exact token count of 1+[r/2] for a string with r maximal runs, and matches a lower bound that holds for any admissible bilateral run-peeling scheme. From the run-pairing theorem the main structural properties follow as corollaries: the irreducible peeling kernel uses at most two symbols; palindromes are precisely the strings whose run-length encoding is symmetric with an odd number of runs; the image of the decomposition admits an explicit…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
