Flashback: A Reversible Bilateral Run-Peeling Decomposition of Strings

Thomas Konstantinovsky, Gur Yaari
4/29/2026
cs.DScs.CL

No confident code implementation found for this paper.

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.

Show full abstract

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 finite-state characterisation; and changing one run length rewrites exactly one content token.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{konstantinovsky2026flashback,
  title  = {Flashback: A Reversible Bilateral Run-Peeling Decomposition of Strings},
  author = {Thomas Konstantinovsky and Gur Yaari},
  year   = {2026},
  eprint = {2604.26190},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2604.26190v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2604.26190.svg)](https://codeofpaper.com/paper/2604.26190)

Discussion