An in-place, subquadratic algorithm for permutation inversion

Abstract

We assume the permutation π is given by an n-element array in which the i-th element denotes the value π(i). Constructing its inverse in-place (i.e. using O(n) bits of additional memory) can be achieved in linear time with a simple algorithm. Limiting the numbers that can be stored in our array to the range [1...n] still allows a straightforward O(n2) time solution. The time complexity can be improved using randomization, but this only improves the expected, not the pessimistic running time. We present a deterministic algorithm that runs in O(n3/2) time.

0

Turn this paper into a lesson

ArcXiv compiles a structured reading guide from this paper's metadata: plain-English importance, contributions, prerequisite concepts, which sections to read first, flashcards, and a quiz. Grounded in the abstract, never invented.

Discussion (0)

Sign in to join the discussion.

Loading comments…