{
  "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.",
  "abstract_shown": true,
  "affiliations": [],
  "article_type": null,
  "arxiv": "2610.23958",
  "author_total": 1,
  "authors": [
    {
      "name": "Antônio Augusto André"
    }
  ],
  "bibtex": "https://research.draconitic.com/paper/b8056seg60pyt.bib",
  "cited_by": 0,
  "doi": "10.48550/arxiv.2610.23958",
  "fulltext_url": null,
  "id": "b8056seg60pyt",
  "issns": [],
  "landing_url": "https://arxiv.org/abs/2610.23958",
  "language": null,
  "licence": "LicenseRef-arXiv-nonexclusive-1.0",
  "licence_label": "arXiv licence",
  "licence_source": "article",
  "licence_url": "http://arxiv.org/licenses/nonexclusive-distrib/1.0/",
  "metadata_licence": "CC0-1.0",
  "native_subjects": [
    [
      "arxiv",
      "cs.DM"
    ],
    [
      "arxiv",
      "math.CO"
    ],
    [
      "openalex",
      "2607|Advanced Combinatorial Mathematics"
    ]
  ],
  "openalex": "W7223014200",
  "pdf_url": "https://arxiv.org/pdf/2610.23958",
  "pmcid": null,
  "pmid": null,
  "published": "2026-10-09",
  "publisher": null,
  "ris": "https://research.draconitic.com/paper/b8056seg60pyt.ris",
  "sources": [
    {
      "first_seen": "2026-10-30T12:30:57Z",
      "native_id": "2610.23958",
      "source": "arxiv",
      "url": "https://arxiv.org/abs/2610.23958"
    }
  ],
  "subjects": [
    {
      "field": "mathematics",
      "origin": "arxiv:math.CO",
      "subfield": "combinatorics"
    }
  ],
  "title": "Unranking $S$-avoiding permutations with two forbidden offsets",
  "title_text": "Unranking S-avoiding permutations with two forbidden offsets",
  "type": "preprint",
  "updated_at": "2026-10-30T12:33:44Z",
  "url": "https://research.draconitic.com/paper/b8056seg60pyt",
  "venue": "arXiv",
  "versions": []
}