Analyzing Trade-offs in Reversible Linear and Binary Search Algorithms

10/23/2019
by   Hiroki Masuda, et al.
0

Reversible algorithms are algorithms in which each step represents a partial injective function; they are useful for performance optimization in reversible systems. In this study, using Janus, a reversible imperative high-level programming language, we have developed reversible linear and binary search algorithms. We have analyzed the non-trivial space-time trade-offs between them, focusing on the memory usage disregarding original inputs and outputs, the size of the output garbage disregarding the original inputs, and the maximum amount of traversal of the input. The programs in this study can easily be adapted to other reversible programming languages. Our analysis reveals that the change of the output data and/or the data structure affects the design of efficient reversible algorithms. For example, the number of input data traversals depends on whether the search has succeeded or failed, while it expectedly never changes in corresponding irreversible linear and binary searches. Our observations indicate the importance of the selection of data structures and what is regarded as the output with the aim of the reversible algorithm design.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
01/08/2020

Nullstellensatz Size-Degree Trade-offs from Reversible Pebbling

We establish an exactly tight relation between reversible pebblings of g...
research
04/12/2018

Design and Implementation of Dynamic Memory Management in a Reversible Object-Oriented Programming Language

The reversible object-oriented programming language (ROOPL) was presente...
research
11/22/2022

Reversible Programming: A Case Study of Two String-Matching Algorithms

String matching is a fundamental problem in algorithm. This study examin...
research
10/18/2021

The Spooky Pebble Game

Pebble games are commonly used to study space-time trade-offs in computa...
research
09/06/2022

Jeopardy: An Invertible Functional Programming Language

Algorithms are ways of mapping problems to solutions. An algorithm is in...
research
08/28/2017

Relativized Separation of Reversible and Irreversible Space-Time Complexity Classes

Reversible computing can reduce the energy dissipation of computation, w...
research
02/18/2021

Interleaving classical and reversible

Given a simple recursive function, we show how to extract two interactin...

Please sign up or login with your details

Forgot password? Click here to reset