,
Michal Opler
Creative Commons Attribution 4.0 International license
Pattern-avoiding permutations are a central object of study in both combinatorics and theoretical computer science. In this paper we design a data structure that can store any size-n permutation τ that avoids an arbitrary (and unknown) fixed pattern π in the asymptotically optimal 𝒪(n lg{s_π}) bits, where s_π is the Stanley-Wilf limit of π. Our data structure supports τ(i) and τ^{-1}(i) queries in 𝒪(1) time, sidestepping the lower bounds that hold for general permutations. Comparable results were previously known only in more restricted cases, e.g., when τ is separable, which means avoiding the patterns 2413 and 3142.
We also extend our data structure to support more complex geometric queries on pattern-avoiding permutations (or planar point sets) such as rectangle range counting in 𝒪(lg lg n) time. This result circumvents the lower bound of Ω(lg{n}/lg lg{n}) by Pătraşcu (STOC 2007) for the general case. For bounded treewidth permutation classes (which include the above-mentioned separable class), we further reduce the space overhead to a lower order additive term, making our data structure succinct. This extends and improves results of Chakraborty et al. (ISAAC 2024) obtained for separable permutations via different techniques. All our data structures can be constructed in linear time.
@InProceedings{kozma_et_al:LIPIcs.ESA.2026.92,
author = {Kozma, L\'{a}szl\'{o} and Opler, Michal},
title = {{Compact Representations of Pattern-Avoiding Permutations}},
booktitle = {34th Annual European Symposium on Algorithms (ESA 2026)},
pages = {92:1--92:18},
series = {Leibniz International Proceedings in Informatics (LIPIcs)},
ISBN = {978-3-95977-445-1},
ISSN = {1868-8969},
year = {2026},
volume = {388},
editor = {Bille, Philip and Pettie, Seth and Storandt, Sabine},
publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
address = {Dagstuhl, Germany},
URL = {https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ESA.2026.92},
URN = {urn:nbn:de:0030-drops-272285},
doi = {10.4230/LIPIcs.ESA.2026.92},
annote = {Keywords: pattern-avoiding permutations, compact data structures, succinct data structures, range counting, twin-width}
}