Reversible Programming: A Case Study of Two String-Matching Algorithms
Robert Gl\"uck (Copenhagen University), Tetsuo Yokoyama (Nanzan, University)

TL;DR
This paper develops two reversible string-matching algorithms, demonstrating how reversible computing principles can be applied to create space-efficient algorithms with the same asymptotic complexity as traditional ones.
Contribution
It introduces the first reversible versions of naive and Rabin-Karp string-matching algorithms, advancing reversible programming techniques and their application to fundamental algorithms.
Findings
Reversible algorithms require no extra space.
They maintain the same asymptotic time complexity as classic algorithms.
The study advances the understanding of reversible computing in algorithm design.
Abstract
String matching is a fundamental problem in algorithm. This study examines the development and construction of two reversible string-matching algorithms: a naive string-matching algorithm and the Rabin-Karp algorithm. The algorithms are used to introduce reversible computing concepts, beginning from basic reversible programming techniques to more advanced considerations about the injectivization of the polynomial hash-update function employed by the Rabin-Karp algorithm. The results are two clean input-preserving reversible algorithms that require no additional space and have the same asymptotic time complexity as their classic irreversible originals. This study aims to contribute to the body of reversible algorithms and to the discipline of reversible programming.
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.
