Sorting by Nonadjacent Swaps with a Fixed Half-Length Budget

Given a word of 2N positive integers, with repetitions allowed, deciding whether it can be sorted in at most N swaps of nonadjacent positions is NP-complete. A reduction from colored token swapping on a clique first separates all original positions and then adds four-position blocks whose exact cost is three swaps. The number of blocks makes the allowed budget exactly half the output length. A cycle argument proves that neither repeated separator colors nor moves mixing different blocks can reduce the required cost. The output has length at most six times the original word length. The accompanying Lean development proves answer preservation and the explicit length bound; the NP-completeness interpretation uses an external source-hardness theorem and ordinary polynomial-time analysis. Formal scope. The archived Lean source covers the answer-preserving half-budget reduction, certificate legality, padding arguments and explicit output-length bound. The clique token-swapping hardness theorem is external. NP-completeness in a machine model follows from the written polynomial-time and certificate arguments, not a Lean complexity endpoint. No new Lean kernel build is claimed for this release. Rights. CC BY 4.0 applies to the original manuscript and author-owned exposition. Accompanying source and third-party material retain their own terms, as recorded in RIGHTS_AND_NOTICES.md in the source archive.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-12-01
DOI
https://doi.org/10.5281/zenodo.24729954
Primary Topic
Complexity and Algorithms in Graphs
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Sorting by Nonadjacent Swaps with a Fixed Half-Length Budget

Venkateshwar Reddy Jambula
Zenodo (CERN European Organization for Nuclear Research)
Complexity and Algorithms in Graphs
preprint

Sorting by Nonadjacent Swaps with a Fixed Half-Length Budget

Venkateshwar Reddy Jambula
preprint en

Abstract

Given a word of 2N positive integers, with repetitions allowed, deciding whether it can be sorted in at most N swaps of nonadjacent positions is NP-complete. A reduction from colored token swapping on a clique first separates all original positions and then adds four-position blocks whose exact cost is three swaps. The number of blocks makes the allowed budget exactly half the output length. A cycle argument proves that neither repeated separator colors nor moves mixing different blocks can reduce the required cost. The output has length at most six times the original word length. The accompanying Lean development proves answer preservation and the explicit length bound; the NP-completeness interpretation uses an external source-hardness theorem and ordinary polynomial-time analysis. Formal scope. The archived Lean source covers the answer-preserving half-budget reduction, certificate legality, padding arguments and explicit output-length bound. The clique token-swapping hardness theorem is external. NP-completeness in a machine model follows from the written polynomial-time and certificate arguments, not a Lean complexity endpoint. No new Lean kernel build is claimed for this release. Rights. CC BY 4.0 applies to the original manuscript and author-owned exposition. Accompanying source and third-party material retain their own terms, as recorded in RIGHTS_AND_NOTICES.md in the source archive.

Zenodo (CERN European Organization for Nuclear Research)
Complexity and Algorithms in Graphs
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon