arXiv Science⌕ Search

arXiv · 2610.23958

Unranking $S$-avoiding permutations with two forbidden offsets

Abstract

Given a finite family of combinatorial objects with a total order, ranking asks for the position of a given object, and unranking asks for the object occupying a given position. Both provide algorithmic access to families too large to enumerate. Kagey gave a polynomial-time algorithm for several position-restricted families and left open the case of $\{-1,1\}$-avoiding permutations. We show that when $|S| = 2$, the graph of forbidden squares is $2$-regular, a disjoint union of cycles, and that fixing a prefix leaves only paths and untouched cycles. This yields polynomial-time prefix counting, ranking and unranking for every two-element set of offsets, covering $\{-1,1\}$. The same structure gives a short proof that the number of $\{-1,1\}$-avoiding permutations equals the $n$-th ménage number for odd $n$ and exceeds it by $2$ for even $n$, proving a conjecture recorded in the OEIS entry A354152.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Antônio Augusto André. 2026-10-09. Unranking $S$-avoiding permutations with two forbidden offsets. https://arxiv.org/abs/2610.23958

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Notes on the Divisibility of Divisor Sums of Catalan Numbers

We investigate divisibility questions for the sum-of-divisors function $σ(C_n)$ of the Catalan numbers $C_n=(n+1)^{-1}\binom{2n}{n}$. Using the prime factors occurring to exponent one in $C_n$, we give explicit divisors of $σ(C_n)$ and obtain, for each fixed integer $m\geq 2$, a power $m^{R_m(n)}$ dividing $σ(C_n)$, with $R_m(n)\sim\frac{2\log 2}{φ(m)}\frac{n}{\log n}$. We further prove uniform divisibility for all moduli up to fixed powers of $\log n$ and, with the same leading constant $2\log 2$, for almost all moduli up to $\sqrt{n}$ apart from logarithmic factors. We also establish a complete classification of the integers $m\geq 2$ for which $m\midσ(mk-1)$ for every $k\geq 1$, identify precisely the exceptional coprimality relations among the associated linear forms, and record a twin-prime product divisor of $σ(C_n)$. The arguments use standard prime-distribution results and do not assume any conjecture concerning twin primes.

math.CO↗

Sign-coherence and tropical sign pattern for rank $3$ real cluster-cyclic exchange matrices

The sign-coherence about $c$-vectors was conjectured by Fomin-Zelevinsky and proved by Gross-Hacking-Keel-Kontsevich for integer skew-symmetrizable case. We prove this conjecture associated with $c$-vectors for rank 3 real cluster-cyclic skew-symmetrizable case. Simultaneously, we establish their self-contained recursion and monotonicity. Then, these $c$-vectors are proved to be roots of certain quadratic equations. Based on these results, we prove that the corresponding exchange graphs of $C$-pattern and $G$-pattern are $3$-regular trees. We also study the structure of tropical signs and equip the dihedral group $\mathrm{D}_6$ with a cluster realization via certain mutations.

math.CO↗

Subexponential upper bound on the number of rich words

Let $R_q(n)$ denote the number of rich words of length $n$ over a fixed alphabet of size $q\geq2$. It is known that $R_q(n)^{1/n}\to1$. We establish a nonrecursive subexponential upper bound on the number of rich words, with its asymptotic growth quantified in terms of an iterated logarithm. For every $λ\in(1/2,1)$ and $γ>1$, there exists $c>0$ such that, for every positive function $ϕ$ satisfying $ϕ(n)\to\infty$ and $n/ϕ(n)\to\infty$, the functions \[ f(n)=\left[c\ln^{*}\!\left(\frac{n}{ϕ(n)}\ln q\right)\right]^{1/γ}, \qquad B(n)=q^{\frac{n}{ϕ(n)}+\frac{n}{(2λ)^{f(n)-1}}} \] satisfy $R_q(n)\leq B(n)$ for all sufficiently large $n$ and $B(n)^{1/n}\to1$. Here $\ln^{*}$ is the iterated natural logarithm, with value zero on $(0,1]$. The proof iterates a counting inequality based on palindromic factorization and controls the resulting multiplicative constants using the iterated logarithm.

math.CO↗