Journal of Information Processing
Online ISSN : 1882-6652
ISSN-L : 1882-6652
 
Design and Implementation of a Reversible Multidimensional Array-matching Algorithm Using the Rabin-Karp Method
Takuma Kurachi, Toya Makino, Tetsuo Yokoyama
Author information
JOURNAL FREE ACCESS

2026 Volume 34 Pages 1048-1059

Details
Abstract

In reversible computation models, no information from intermediate states can be discarded. Consequently, directly adapting conventional (irreversible) algorithms often produces a large amount of redundant garbage data or significantly complicates the implementation. In this study, we designed and implemented reversible programs for multidimensional array matching using the reversible programming language Janus, considering both a naive approach and the Rabin-Karp method. In particular, to treat rolling hash updates in the multidimensional Rabin-Karp method reversibly, we implemented each update together with its corresponding inverse update as a paired operation. This design ensures that, upon termination, no garbage data other than the input remains. We present and validate Janus programs for the two-dimensional case, and show that the same approach can be applied to implement the three-dimensional case. Moreover, by organizing construction rules based on nested procedures, we show that programs for four or more dimensions can be mechanically constructed using the same methodology.

Content from these authors
© 2026 by the Information Processing Society of Japan
Previous article Next article
feedback
Top