An in-place, subquadratic algorithm for permutation inversion

01/07/2019
by   Grzegorz Guśpiel, et al.
0

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(n^2) 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(n^3/2) time.

READ FULL TEXT

Please sign up or login with your details

Forgot password? Click here to reset

Sign in with Google

×

Use your Google Account to sign in to DeepAI

×

Consider DeepAI Pro