---
title: Compressed Permutation Oracle
url: https://www.emergentmind.com/topics/compressed-permutation-oracle
type: topic
---

# Compressed Permutation Oracle

Searching arXiv for relevant papers on compressed permutation oracles and related permutation compression / quantum compressed oracles.
A compressed permutation oracle is an encoded permutation interface that supports oracle-style evaluation without reconstructing the full permutation explicitly. In the data-structural literature, it denotes a compressed succinct representation of a static permutation \(\pi:[1..n]\to[1..n]\) supporting both \(\pi(i)\) and \(\pi^{-1}(i)\), with space and time governed by structural regularities such as runs, strict runs, shuffled upsequences, and LRM-partitions [0902.1038], [0911.4981], [1009.5863], [1108.4408]. In the quantum-oracle literature, the same phrase denotes a compressed-oracle framework for a uniformly random permutation, typically with forward and inverse superposition access, where a small partial database or path record is intended to capture what a \(q\)-query algorithm can have learned about the hidden permutation [2103.08975], [2407.09655], [2509.18586], [2606.30281].

## 1. Terminological scope and oracle models

The expression “compressed permutation oracle” has two established meanings. The first arises in succinct data structures and adaptive sorting. There, the hidden object is a fixed permutation \(\pi\) over \([1..n]\), and the objective is to store \(\pi\) in fewer than the usual \(n\lg n\) bits when \(\pi\) has exploitable monotone structure, while still answering \(\pi(i)\) and \(\pi^{-1}(i)\) efficiently. The second arises in quantum cryptography and quantum query complexity. There, the hidden object is a uniformly random permutation \(\varphi\in \mathbf S_N\), queried in superposition, often in both forward and inverse directions, and the objective is to replace the full purified truth table by a smaller or more interpretable state that records only the information effectively learned by the adversary [1009.5863], [2509.18586].

| Research line | Hidden object | Oracle interface |
|---|---|---|
| Succinct data structures | Static permutation \(\pi\) on \([1..n]\) | \(\pi(i)\), \(\pi^{-1}(i)\) |
| Quantum compressed oracles | Uniform random permutation \(\varphi\in \mathbf S_N\) | Forward and inverse superposition queries |

This dual usage creates a frequent misconception. In the static setting, “compressed” refers to space bounded by entropy-like disorder measures of the permutation itself. In the quantum setting, “compressed” refers to a stateful oracle representation or proof technique; it need not be a compact implementation in the ordinary RAM sense. A related misconception is that a compressed permutation oracle is merely an index over an explicitly stored permutation. The data-structural papers state the stronger notion: an integrated encoding of \(\pi\) that itself answers the permutation-oracle operations [1009.5863].

## 2. Entropy-compressed static permutation representations

The classical line begins from the observation that a permutation can be substantially smaller than \(n\lg n\) bits if it decomposes into a small or low-entropy collection of monotone pieces. The foundational framework in “Compressed Representations of Permutations, and Applications” [0902.1038] studies contiguous runs, strict runs, and shuffled upsequences. For a length vector \(X=\langle n_1,\dots,n_r\rangle\) summing to \(n\), the central parameter is
\[
H(X)=\sum_{i=1}^r \frac{n_i}{n}\lg\frac{n}{n_i}.
\]
This entropy drives both compressed space and adaptive running time. In the run-based representation of [0902.1038], a permutation covered by \(\nRuns\) runs of lengths \(\Runs\) is encoded in at most
\[
n(2+H(\Runs))(1+o(1))+\mathcal{O}(\nRuns\log n)
\]
bits, with \(\pi(i)\) and \(\pi^{-1}(i)\) supported in \(\mathcal{O}(1+\log \nRuns)\) time and average \(\mathcal{O}(1+H(\Runs))\) time. The same work gives strict-run and shuffled-upsequence variants, and also explains how these encodings can be combined with cycle decompositions to support iterated queries \(\pi^k(i)\) [0902.1038].

“On Compressing Permutations and Adaptive Sorting” refines this line by representing a permutation as the merge history of monotone pieces in a wavelet-tree-like structure shaped by Huffman coding on run lengths [1108.4408]. For \(\nRuns\) contiguous ascending or monotone runs with length vector \(\vRuns\), the principal bound is
\[
nH(\vRuns)+O(\nRuns\lg n)+o(n)
\]
bits, with \(\pi(i)\) and \(\pi^{-1}(i)\) in worst-case
\[
O(1+\lg \nRuns)
\]
time and average
\[
O(1+H(\vRuns))
\]
time, and a multiary version improves this to worst-case
\[
O\!\left(1+\frac{\lg \nRuns}{\lg\lg n}\right)
\]
and average
\[
O\!\left(1+\frac{H(\vRuns)}{\lg\lg n}\right).
\]
The same paper extends the framework to strict runs, shuffled upsequences, and shuffled monotone sequences, and ties the same entropy parameters to adaptive sorting bounds [1108.4408].

A parallel route appears in “Efficient Fully-Compressed Sequence Representations” [0911.4981]. Instead of designing a permutation-specific code from scratch, that paper reduces permutation queries to sequence queries on compressed run-label strings. For a permutation consisting of \(\rho\) interleaved increasing or decreasing runs of lengths \(\runs(\pi)\), it stores two sequences \(s,s'\) over alphabet \([1..\rho]\) together with one direction bit per run, obtaining
\[
2 n H (\runs (\pi)) + o(n)(H (\runs (\pi)) + 1)
\]
bits and \(\mathcal{O}(\lg\lg \rho)\)-time support for both \(\pi()\) and \(\pi^{-1}()\). For contiguous runs, one label sequence becomes trivial, reducing the bound to
\[
n H (\runs (\pi)) + o(n)(H (\runs (\pi)) + 1)
\]
bits, with \(\pi()\) in \(\mathcal{O}(1)\) time and \(\pi^{-1}()\) in \(\mathcal{O}(\lg\lg \rho)\) time [0911.4981].

## 3. LRM-trees and LRM-partition oracles

The LRM-tree line replaces classical run decompositions by a decomposition extracted from previous-smaller-value structure. For an array \(A[1,n]\), with \(A[0]=-\infty\),
\[
\mathit{PSV}_A(i)=\max\{j \in [0..i-1] : A[j] < A[i]\}.
\]
The LRM-tree \(\mathcal{T}_A\) has parent \(\mathit{PSV}_A(i)\) for node \(i\), and when \(A\) is a permutation \(\pi\), every downward path is increasing. The key new decomposition in “LRM-Trees: Compressed Indices, Adaptive Sorting, and Compressed Permutations” is the LRM-Partition: recursively choose a longest root-to-leaf path, called the spinal chord, remove it, and continue on the remaining forest. All resulting subsequences are increasing, and every LRM-partition has exactly \(\nRuns\) subsequences, although the partition is not necessarily unique [1009.5863].

If the subsequence lengths are \(X=\langle n_1,\dots,n_r\rangle\), the entropy is
\[
\mathcal{H}(X)=\sum_{i=1}^r\frac{n_i}{n}\lg\frac{n}{n_i}.
\]
The paper states that the LRM-partition is “never worse and often better” than the ordinary run partition in terms of entropy. This entropy is then used as the compressibility parameter for the permutation oracle. The representation combines two ingredients: a succinct representation of the LRM-partition itself, and a merge encoding from Barbay and Navarro over the sorted subsequences exposed by the partition [1009.5863].

The partition support structure is encoded as a forest of ordinal trees in balanced parentheses using
\[
2(n+\nRuns)+o(n)\ \text{bits},
\]
supporting in constant time the two fundamental operators \(\alpha(i)\), mapping an original position \(i\) to its subsequence identifier and local rank, and \(\beta(s,p)\), performing the inverse map. On top of this, the merge encoding stores the interleaving of the subsequences in at most
\[
(1+\mathcal{H}(X))(n+o(n))+O(\nRuns\lg n)
\]
bits, supporting \(\pi(i)\) and \(\pi^{-1}(i)\) in worst-case
\[
O(1+\lg \nRuns)
\]
time and average
\[
O(1+\mathcal{H}(X))
\]
time when \(i\) is chosen uniformly from \([1..n]\). The total construction time is
\[
O(n(1+\mathcal{H}(X))).
\]
The paper’s worked example,
\[
\pi=(4,5,9,6,8,1,3,7,2),
\]
has unique LRM-partition
\[
\{(4,5,6,8),(9),(1,3,7),(2)\},
\]
illustrating how forward and inverse permutation queries are reduced to a partition map followed by a merge-encoding query [1009.5863].

## 4. Quantum compressed-oracle constructions for random permutations

The quantum version of the problem begins from a different obstruction: a random permutation is globally correlated. In the purified truth-table picture, the random-permutation state is a superposition over all collision-free assignments, so the registers are entangled from the outset. This blocks the most direct extension of Zhandry’s compressed oracle for random functions [2509.18586].

An early compressed-oracle-style resolution appears in “Tight Bounds for Inverting Permutations via Compressed Oracle Arguments” [2103.08975]. Instead of a local table, that paper decomposes the oracle Hilbert space into subspaces spanned by uniform superpositions over partial injective assignments. If \(A_k\) is the span of assignments of weight \(k\) and \(B_k\) is the span of those assignments whose image already contains \(0\), the construction isolates orthogonal “low” and “high” sectors and proves that after \(k\) oracle calls, the state remains supported on knowledge states of size at most \(k\). The resulting inversion bound is
\[
\Pr[\text{invert random permutation with }k\text{ queries}] \le \frac{(1+2\sqrt{2k})^2}{N-4k} = O\!\left(\frac{k^2}{N}\right).
\]

“Permutation Superposition Oracles for Quantum Query Lower Bounds” introduces a different exact simulation based on the unique strictly monotone factorization
\[
\pi = (N\, t_N)(N-1\, t_{N-1})\cdots (2\, t_2)(1\, t_1),
\qquad t_k\in[k].
\]
For uniformly random \(\pi\in S_N\), the \(t_k\) are independent and uniform, which restores a product-like hidden state even though \(\pi(x)\) and \(\pi^{-1}(y)\) are globally dependent. The paper develops active and inverse-active transposition sets, proves exact simulation of a random permutation and its inverse in superposition, and derives a general lower bound for any relation \(R\subseteq [N]\times[N]\):
\[
\Pr\bigl[(x,\pi(x))\in R\bigr] \le 914\, \frac{q^3 r_{\max} (\ln(N)+2)}{N},
\]
where
\[
r_{\max}=\max\left\{\max_x |R_x|,\; \max_y |R_y^{\mathrm{inv}}|\right\}.
\]
This yields, among other applications, unconditional lower bounds for one-round sponge preimage search and for double-sided zero search [2407.09655].

## 5. Partial injective databases, soundness, and cryptographic applications

A more direct “database” formulation appears in “Compressed Permutation Oracles” [2509.18586]. There the compressed permutation oracle maintains a purifying register consisting of a partial injective database
\[
I \in \mathbf I_{N,N},
\]
intended to record the input-output pairs that the adversary has meaningfully learned. For forward queries, the local compression operator swaps the undefined basis state \(\ket I\) with the uniform superposition over fresh assignments
\[
\ket{+_{x,I}} = \frac{1}{\sqrt{N-|I|}} \sum_{y\in [N]\setminus \operatorname{Im}(I)} \ket{I[x\mapsto y]},
\]
and inverse queries are handled by a flip operator
\[
F\ket I = \ket{I^{-1}}.
\]
The resulting compressed permutation oracle is
\[
cpO \ket{b} = \ket b \otimes
\begin{cases}
pC\cdot P\cdot pC^\dagger & \text{if } b=0,\\
F\cdot pC\cdot P\cdot pC^\dagger \cdot F^\dagger & \text{if } b=1.
\end{cases}
\]

The main soundness theorem states that for a \(q\)-query quantum algorithm,
\[
\frac12 \left\|\rho_A^{(O)}-\rho_A^{(cpO)}\right\|_1
= O\!\left(\frac{q^3}{N^{1/4}}\right).
\]
The compressed database grows by at most one pair per query, formalized by
\[
\Pi_{\le q, I}\ket{\psi_A^{(cpO)}_{AI}} = \ket{\psi_A^{(cpO)}_{AI}}.
\]
The paper further proves a permutation analogue of Zhandry’s fundamental lemma, showing that if an adversary can output \(l\) correct input-output pairs of the real permutation, then, up to an additive \(l/\sqrt{N-t-l}\) term, those pairs must already appear in the compressed database [2509.18586].

These structural statements are then used to settle several cryptographic and query-complexity problems. The paper proves that seven-round Feistel is a strong qPRP, with distinguishing advantage bounded by
\[
O\!\left(\frac{q^3}{N^{1/4}}\right),
\]
thereby resolving the open question of Zhandry on constant-round Feistel in the strongest quantum permutation model. It also re-proves lower bounds for sponge and Davies–Meyer preimage and collision resistance, and gives new lower bounds for cycle finding and the one-more problem [2509.18586].

## 6. Generalization and conceptual synthesis

The most general current formulation is the path-recording oracle of “Quantum Lazy Sampling and Path Recording for Any Group” [2606.30281]. That paper defines an exact compressed-oracle simulation for Haar-random elements of any closed subgroup \(G\subseteq U(N)\). For the permutation case \(G=S_N\), with in-place representation
\[
\rho(\pi)\ket{x}=\ket{\pi(x)},
\]
the hidden memory is a superposition of path states
\[
\ket{(x_1,y_1),\ldots,(x_t,y_t)},
\]
projected onto the legal subspace determined by the commutant algebra of the tensor-power representation. For \(S_N\), this commutant is the partition algebra \(P_t(N)\). The update is written as
\[
Q_{\rho,t+1}^{\mathrm{Path}}
= \sum_{x,y\in B(V)} \ket{y}\!\bra{x|}
\otimes \Lambda_{A_{t+1}}\cdot \Omega_{A_{t+1}}\cdot \mathrm{App}_{x,y}\cdot \Lambda_{A_t}^+\cdot \Omega_{A_t},
\]
and Theorem 5.3 proves exact equivalence with a truly random permutation oracle. One application is a direct comparison between \(S_N\) and \(U(N)\), yielding the pseudorandom-unitary construction \(PC\), where \(P\) is a pseudorandom permutation and \(C\) a random Clifford [2606.30281].

A complementary conceptual result is provided by “The Compressed Oracle is a Worthy (Multiplicative) Adversary” [2509.07876]. That paper does not itself give a general compressed permutation oracle, but it shows that compressed-oracle reasoning is captured by a restricted multiplicative adversary framework, MLADV. In the permutation setting it recovers a Rosmanis-style inversion lower bound through layered partial-information subspaces, suggesting that compressed-oracle arguments and adversary methods are part of a common abstraction rather than disjoint techniques [2509.07876].

Taken together, these works show that “compressed permutation oracle” is not a single construction but a research area organized around one common principle: permutation access can often be replaced by a representation of the structure actually revealed by queries. In succinct data structures, that revealed structure is monotone order, runs, or LRM-partitions, and compression is measured in bits. In quantum cryptography, it is partial injective knowledge, active transpositions, or path records, and compression is measured by how little explicit information about the hidden permutation must be materialized. This suggests that the unifying content of the term is not a specific encoding scheme, but the replacement of full permutation materialization by a structured oracle state that preserves the essential query interface.

Source: https://www.emergentmind.com/topics/compressed-permutation-oracle