Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

The 2-swap greedy shortest-path conjecture is false

Abstract

Binary words at distance one force arbitrarily many greedy swaps.

Words are functions Fin n → α. The paper’s positions 1,…,n and alphabet 1,…,σ become zero-based finite types. A stage pairs occurrences in increasing position order before applying any of its swaps. Only unequal index pairs contribute to the length; this counts pairs even if a later application would exchange equal letters. The proposition below asks only for equality of this count with graph distance, and allows every maximal-count reference letter and every non-increasing order of the remaining letters.

Definition 1.1 (Exchanging two positions).

Formalization. D5/S3/Combinatorics/Permutation/AdamsonFlahertyPotapovSpirakisTwoSwapGreedy.twoSwap (✓ std3).

Citation. Duncan Adamson; Nathan Flaherty; Igor Potapov; Paul G. Spirakis (2024). Structural and Combinatorial Properties of 2-swap Word Permutation Graphs. DOI: 10.1007/978-3-031-55601-2_5. URL: https://arxiv.org/abs/2307.01648v3.

Commentary.

Definition 1, page 4: ‘Given a word w∈Σⁿ and pair i,j∈[n], i<j such that w[i]≠w[j], the 2-swap of w by (i,j), denoted w∘(i,j), returns the word w[1,i−1]w[j]w[i+1,j−1]w[i]w[j+1,n].’ Precomposition by Equiv.swap exchanges those entries; the restrictions on indices and letters appear in IsTwoSwapOf.

Definition 1.2 (Counting each letter).

Formalization. D5/S3/Combinatorics/Permutation/AdamsonFlahertyPotapovSpirakisTwoSwapGreedy.parikh (✓ std3).

Citation. Duncan Adamson; Nathan Flaherty; Igor Potapov; Paul G. Spirakis (2024). Structural and Combinatorial Properties of 2-swap Word Permutation Graphs. DOI: 10.1007/978-3-031-55601-2_5. URL: https://arxiv.org/abs/2307.01648v3.

Commentary.

Page 4: ‘Given a word w∈Σⁿ, the Parikh vector of w, denoted P(w) is the σ-length vector such that the ith entry of P(w) contains the number of occurrences of symbol i in w, formally, for i∈[σ], P(w)[i]=|{j∈[n] | w[j]=i}|, where n=|w|.’ The finite-set cardinality counts each position once.

Definition 1.3 (The 2-swap relation).

Formalization. D5/S3/Combinatorics/Permutation/AdamsonFlahertyPotapovSpirakisTwoSwapGreedy.IsTwoSwapOf (✓ std3).

Citation. Duncan Adamson; Nathan Flaherty; Igor Potapov; Paul G. Spirakis (2024). Structural and Combinatorial Properties of 2-swap Word Permutation Graphs. DOI: 10.1007/978-3-031-55601-2_5. URL: https://arxiv.org/abs/2307.01648v3.

Commentary.

Definition 1, page 4: ‘Given a word w∈Σⁿ and pair i,j∈[n], i<j such that w[i]≠w[j], the 2-swap of w by (i,j), denoted w∘(i,j), returns the word w[1,i−1]w[j]w[i+1,j−1]w[i]w[j+1,n].’ This predicate supplies precisely the two restrictions and the resulting word.

Definition 1.4 (The graph on all words).

Formalization. D5/S3/Combinatorics/Permutation/AdamsonFlahertyPotapovSpirakisTwoSwapGreedy.swapGraph (✓ std3).

Source. Repository-derived.

Acknowledgement. Duncan Adamson; Nathan Flaherty; Igor Potapov; Paul G. Spirakis (2024). Structural and Combinatorial Properties of 2-swap Word Permutation Graphs. DOI: 10.1007/978-3-031-55601-2_5. URL: https://arxiv.org/abs/2307.01648v3.

Commentary.

The graph SimpleGraph.fromRel makes the 2-swap relation undirected and excludes loops. Its vertices here are all functions Fin n → α.

Definition 1.5 (The configuration graph).

Formalization. D5/S3/Combinatorics/Permutation/AdamsonFlahertyPotapovSpirakisTwoSwapGreedy.configGraph (✓ std3).

Citation. Duncan Adamson; Nathan Flaherty; Igor Potapov; Paul G. Spirakis (2024). Structural and Combinatorial Properties of 2-swap Word Permutation Graphs. DOI: 10.1007/978-3-031-55601-2_5. URL: https://arxiv.org/abs/2307.01648v3.

Commentary.

Page 5: ‘For a given alphabet Σ and Parikh vector P, the configuration graph of Σ∗|P is the undirected graph G(P)={V(P),E(P)} where:’ The source explains: ‘Informally, the configuration graph for a given Parikh vector P is the graph with each vertex corresponding to some word in Σ∗|P, and each edge connecting every pair of words w,u∈Σ∗|P such that there exists some 2-swap transforming w into u.’ SimpleGraph.induce restricts swapGraph to exactly these words.

Definition 1.6 (Occurrence positions in increasing order).

Formalization. D5/S3/Combinatorics/Permutation/AdamsonFlahertyPotapovSpirakisTwoSwapGreedy.occurrences (✓ std3).

Citation. Duncan Adamson; Nathan Flaherty; Igor Potapov; Paul G. Spirakis (2024). Structural and Combinatorial Properties of 2-swap Word Permutation Graphs. DOI: 10.1007/978-3-031-55601-2_5. URL: https://arxiv.org/abs/2307.01648v3.

Commentary.

Algorithm 1, page 9: ‘i ← index of kᵗʰ occurrence of x in w’. Filtering List.finRange n by equality to x lists exactly those positions in increasing order. The source’s kᵗʰ occurrence has list index k−1.

Definition 1.7 (Pairing corresponding occurrences).

Formalization. D5/S3/Combinatorics/Permutation/AdamsonFlahertyPotapovSpirakisTwoSwapGreedy.stageSwaps (✓ std3).

Citation. Duncan Adamson; Nathan Flaherty; Igor Potapov; Paul G. Spirakis (2024). Structural and Combinatorial Properties of 2-swap Word Permutation Graphs. DOI: 10.1007/978-3-031-55601-2_5. URL: https://arxiv.org/abs/2307.01648v3.

Commentary.

Algorithm 1, page 9: ‘i ← index of kᵗʰ occurrence of x in w’ and ‘j ← index of kᵗʰ occurrence of x in v’. List.zip pairs corresponding entries of the two occurrence lists. For equal Parikh vectors their lengths agree.

Definition 1.8 (Applying a stage).

Formalization. D5/S3/Combinatorics/Permutation/AdamsonFlahertyPotapovSpirakisTwoSwapGreedy.applySwaps (✓ std3).

Citation. Duncan Adamson; Nathan Flaherty; Igor Potapov; Paul G. Spirakis (2024). Structural and Combinatorial Properties of 2-swap Word Permutation Graphs. DOI: 10.1007/978-3-031-55601-2_5. URL: https://arxiv.org/abs/2307.01648v3.

Commentary.

Algorithm 1, page 9: ‘Apply all 2-swaps in S to w and set S ← ∅’. List.foldl applies them in increasing occurrence order. The length comparison below does not assume that this application reaches the target word.

Definition 1.9 (The sequence of stages).

Formalization. D5/S3/Combinatorics/Permutation/AdamsonFlahertyPotapovSpirakisTwoSwapGreedy.greedySwaps (✓ std3).

Citation. Duncan Adamson; Nathan Flaherty; Igor Potapov; Paul G. Spirakis (2024). Structural and Combinatorial Properties of 2-swap Word Permutation Graphs. DOI: 10.1007/978-3-031-55601-2_5. URL: https://arxiv.org/abs/2307.01648v3.

Commentary.

Algorithm 1, page 9: ‘for x ∈ Σ \ {1} do’. The empty list performs no stage. A nonempty list first records the occurrence pairs for its head letter, then continues from the word obtained by applying those pairs.

Definition 1.10 (Counting nontrivial pairs).

Formalization. D5/S3/Combinatorics/Permutation/AdamsonFlahertyPotapovSpirakisTwoSwapGreedy.greedyLength (✓ std3).

Source. Repository-derived.

Acknowledgement. Duncan Adamson; Nathan Flaherty; Igor Potapov; Paul G. Spirakis (2024). Structural and Combinatorial Properties of 2-swap Word Permutation Graphs. DOI: 10.1007/978-3-031-55601-2_5. URL: https://arxiv.org/abs/2307.01648v3.

Commentary.

A nontrivial pair has distinct position indices. Filtering by that predicate and taking List.length gives the count compared with SimpleGraph.dist. Pairs are counted before imposing any condition on the letters when the pair is eventually applied.

Definition 1.11 (Permitted reference letters and orders).

Formalization. D5/S3/Combinatorics/Permutation/AdamsonFlahertyPotapovSpirakisTwoSwapGreedy.AdmissibleOrder (✓ std3).

Citation. Duncan Adamson; Nathan Flaherty; Igor Potapov; Paul G. Spirakis (2024). Structural and Combinatorial Properties of 2-swap Word Permutation Graphs. DOI: 10.1007/978-3-031-55601-2_5. URL: https://arxiv.org/abs/2307.01648v3.

Commentary.

Proof of Lemma 4, page 9: ‘We assume, without loss of generality, that P[1]≥P[2]≥⋯≥P[σ].’ Algorithm 1 runs over Σ \ {1}. The existential reference letter has maximal count. The list has no duplicates, omits that letter, contains every other letter, and has non-increasing counts. Thus all choices among ties are included.

Definition 1.12 (The shortest-path conjecture).

Formalization. D5/S3/Combinatorics/Permutation/AdamsonFlahertyPotapovSpirakisTwoSwapGreedy.claim (✓ std3).

Citation. Duncan Adamson; Nathan Flaherty; Igor Potapov; Paul G. Spirakis (2024). Structural and Combinatorial Properties of 2-swap Word Permutation Graphs. DOI: 10.1007/978-3-031-55601-2_5. URL: https://arxiv.org/abs/2307.01648v3.

Commentary.

Section 5, page 23: ‘For the 2-swap graph specifically, we leave open the problem of determining the shortest path between two given words w and v. We conjecture that the simple greedy algorithm used to derive the upper bound in Lemma 4 can be used to find the shortest path between any pair of vertices.’ The formula permits any alphabet size σ and word length n, any two words with the same Parikh vector, and any permitted letter order. The proof h puts the target word in the same configuration graph. It asks only for equality of the count with the distance; reaching the target and legality of every generated pair are additional requirements of a path.

Theorem 1.13 (Refutation by an unbounded binary family).

Proof. Machine-checked in Lean as D5/S3/Combinatorics/Permutation/AdamsonFlahertyPotapovSpirakisTwoSwapGreedy.result (✓ std3). ∎

Resolves. Problems/adamson-flaherty-potapov-spirakis-2023-two-swap-greedy (refuted) by D5/S3/Combinatorics/Permutation/AdamsonFlahertyPotapovSpirakisTwoSwapGreedy.result.

Source. Repository-derived.

Acknowledgement. Duncan Adamson; Nathan Flaherty; Igor Potapov; Paul G. Spirakis (2024). Structural and Combinatorial Properties of 2-swap Word Permutation Graphs. DOI: 10.1007/978-3-031-55601-2_5. URL: https://arxiv.org/abs/2307.01648v3.

Commentary.

For each k≥2, take w=0ᵏ1ᵏ and v=1·0ᵏ⁻¹·1ᵏ⁻¹·0. Each letter occurs k times in both words. Exchanging positions 0 and 2k−1 turns w into v, so their distance is one. Pairing the zero occurrences moves every occurrence, and pairing the one occurrences also moves every occurrence: either permitted binary order therefore generates k nontrivial pairs. This proves failure throughout an unbounded family; k=2 contradicts the quantified proposition. The argument determines neither a shortest-path algorithm for unrestricted alphabets nor its complexity.

References