On compressing permutations and adaptive sorting

Jérémy Barbay, Gonzalo Navarro
2013 Theoretical Computer Science  
We prove that, given a permutation π over [1..n] formed of nRuns sorted blocks of sizes given by the vector R = r 1 , . . . , r nRuns , there exists a compressed data structure encoding n r i n(1 + log 2 nRuns) bits while supporting access to the values of π () and π −1 () in time O(log nRuns/ log log n) in the worst case and O(H(R)/ log log n) on average, when the argument is uniformly distributed over [1..n]. This data structure can be constructed in time O(n(1 + H(R))), which yields an
more » ... ed adaptive sorting algorithm. Similar results on compressed data structures for permutations and adaptive sorting algorithms are proved for other preorder measures of practical and theoretical interest.
doi:10.1016/j.tcs.2013.10.019 fatcat:vxgaveeqkbhtdeuhbtfcczeery