Encoding Schemes for Parallel In-Place Algorithms
Chase Hutton, Adam Melrod
TL;DR
This work advances in-place parallel computation by introducing encoding-based techniques—notably inversion encoding and restorable buffers—that unlock additional information within the input to support conflict-free, low-memory parallelism. It delivers work-efficient strong PIP algorithms for two canonical problems: merging two sorted sequences and random permutation, each with $O(n)$ or $O(n)$-scaled work and polylogarithmic depth (e.g., $O( ext{log}^2 n)$ span for merging, $O( ext{polylog } n)$ for permutation), and demonstrates a practical application to integer sorting. The methods rely on a general encoding framework and careful two-phase algorithms that leverage input structure, with theoretical guarantees complemented by an empirical evaluation showing negligible memory overhead and competitive runtimes against optimized non-in-place solutions. Overall, the paper broadens the toolkit for space-efficient parallel algorithm design and provides a path toward broadly applicable in-place techniques beyond the specific problems analyzed.
Abstract
Many parallel algorithms which solve basic problems in computer science use auxiliary space linear in the input to facilitate conflict-free computation. There has been significant work on improving these parallel algorithms to be in-place, that is to use as little auxiliary memory as possible. In this paper, we provide novel in-place algorithms to solve the fundamental problems of merging two sorted sequences, and randomly shuffling a sequence. Both algorithms are work-efficient and have polylogarithmic span. Our algorithms employ encoding techniques which exploit the underlying structure of the input to gain access to more bits, which enables the use of auxiliary data as well as non-in-place methods. The encoding techniques we develop are general. We expect them to be useful in developing in-place algorithms for other problems beyond those already mentioned. To demonstrate this, we outline an additional application to integer sorting. In addition to our theoretical contributions, we implement our merging algorithm, and measure its memory usage and runtime.
