What changed from v1 to v3

2026-11-28 → 2026-11-28 · 1 paragraph edited, 51 added, 19 removed, 11 unchanged. Compared as markdown source.

v1 · v2 · v3 compare v3 with · read v3

abstract
Ahmed and Snevily'sSnevily made the Odd Sum conjecture (Open Problemfor Garden;Roller IIS-O-5131)Coaster sayspermutations thatin every2013 Roller(Open CoasterProblem permutationGarden, piIIS-O-5131). ofThe odd lengthcase says: if n = 2k+1 hasand pi is in RC(n), then pi_j + pi_{n-j+1} is odd for 1 <= j <= k. We show itthat failsthe odd case is false at n = 17. The permutation (8,14,3,15,6,10,2,17,7,12,1,16,5,11,4,13,9) has t = 798783 = tmax(17),tmax(17). andThe pair sums pi_4 + pi_14 =and 15pi_6 + 11pi_12 =are 2626. isVersion even.3 Thehas valuea tmax(17)Lean =4 798783proof wasthat reportedthe optimalLean bykernel Nettochecks (2021,in Gurobi);full. weThe re-proveproof optimalitydoes withnot twouse furthernative_decide. solversThe (OR-toolstheorems CP-SATRC.t_le_17, RC.t_pi0, RC.pi0_isRollerCoaster and HiGHS,RC.oddSumConjecture_false gapuse 0)only the axioms propext, Classical.choice and anQuot.sound. independentlyThe writtenproof Booleanhas modela forbranch-and-bound whichsearch, ta >=proof 798784that the search is infeasible.sound, Completeand enumerations2681 givestatements |RC(13)|that =the 64,kernel |RC(14)|checks =by 4,calculation. |RC(15)|Version =3 also has the full list of RC(17). The list has 128 withpermutations. noEach violation,of sothe 128 permutations violates the conjecture. Each member of RC(n) satisfies the conjecture for each odd n <= 15. Thus n = 17 is the first odd length wherethat violates the conjectureconjecture. fails.The Alllists 68for membersn of>= RC(17)13 foundcome sofrom farthe violatesolver it.CP-SAT. OptimalityNo restsproof onassistant solverchecked runs,the lists. The permutation is not anew. machine-checkedIt certificate;is in the even2022 casethesis of Netto and in a 2021 paper of Botler and Netto. These works do not mention the countingOdd conjectureSum conjecture. Our lists of RC(n) for n = 3,...,13 are equal to the lists in the preprint of Ahmed and Snevily. We do not addressed.prove or disprove the even case.
# The Odd Sum conjecture for Roller Coaster permutations is false at n = 17
## The conjecture
removed
Ahmed and Snevily (2013; [Open Problem Garden](https://www.openproblemgarden.org/op/roller_coaster_permutations), isitsolved IIS-O-5131).
removed
For a sequence $\tau$, let $i(\tau)$ and $d(\tau)$ be the numbers of maximal increasing and maximal decreasing runs of contiguous entries. For a permutation $\pi$ of $[n]$, let $t(\pi)=\sum_{\tau}(i(\tau)+d(\tau))$, summed over all subsequences $\tau$ of $\pi$ of length at least 3. $RC(n)$ is the set of permutations that maximize $t$ ("Roller Coaster permutations"), and $t_{\max}(n)$ is the maximum.
added
Ahmed and Snevily made the conjecture in 2013. It is Conjecture 2.4 of their [preprint](https://tanbir.github.io/files/preprints/ahmed_snevily_roller_coaster_permutations.pdf). It is on the [Open Problem Garden](https://www.openproblemgarden.org/op/roller_coaster_permutations). On isitsolved it is IIS-O-5131.
added
These are the definitions:
added
- A run of a sequence is a maximal increasing or maximal decreasing block of at least two adjacent entries. - $i(\tau)$ is the number of increasing runs of the sequence $\tau$. - $d(\tau)$ is the number of decreasing runs of $\tau$. - $t(\pi)=\sum_{\tau}(i(\tau)+d(\tau))$ for a permutation $\pi$ of $[n]$. The sum is over all subsequences $\tau$ of $\pi$ of length at least 3. - $t_{\max}(n)$ is the maximum of $t$ over all permutations of $[n]$. - $RC(n)$ is the list of permutations with $t(\pi)=t_{\max}(n)$. These are the Roller Coaster permutations.
> **Odd Sum conjecture.** Let $\pi\in RC(n)$. If $n=2k+1$, then $\pi_j+\pi_{n-j+1}$ is odd for $1\le j\le k$. If $n=2k$, then $\pi_j+\pi_{n-j+1}=2k+1$ for $1\le j\le k$.
## Result
edited
**The odd case failsis false at $n=17$.**
$$\pi = (8, 14, 3, 15, 6, 10, 2, 17, 7, 12, 1, 16, 5, 11, 4, 13, 9)$$
removed
- $t(\pi)=798783=t_{\max}(17)$, so $\pi\in RC(17)$. - $\pi_4+\pi_{14}=15+11=26$ and $\pi_6+\pi_{12}=10+16=26$ are even.
removed
The parity of each pair sum is unchanged by reversal and by complement ($a\mapsto 18-a$), so the three symmetric images of $\pi$ violate the conjecture too.
removed
This permutation appears in Table 2.1 of Netto's 2021 thesis ([PESC/UFRJ](https://pesc.coppe.ufrj.br/uploadfile/publicacao/3043.pdf)), which reports $t_{\max}(17)=798783$ as the optimum of an integer program solved with Gurobi. The thesis doesn't discuss the Odd Sum conjecture.
added
- $t(\pi)=798783=t_{\max}(17)$. Thus $\pi\in RC(17)$. - $\pi_4+\pi_{14}=15+11=26$. This pair sum is even. - $\pi_6+\pi_{12}=10+16=26$. This pair sum is even.
added
Reversal does not change the parity of a pair sum. The complement $a\mapsto 18-a$ does not change it. Thus the three symmetric images of $\pi$ also violate the conjecture.
added
This permutation is not new. It is in Table 2.1 of the 2022 thesis of Netto ([PESC/UFRJ](https://pesc.coppe.ufrj.br/uploadfile/publicacao/3043.pdf)). It is also in the paper of Botler and Netto, [New Bounds on Roller Coaster Permutations](https://sol.sbc.org.br/index.php/etc/article/view/16378) (2021). The thesis gives $t_{\max}(17)=798783$ as the maximum of an integer program. The solver was Gurobi. The paper gives $798783$ as an improved lower bound. These two works do not mention the Odd Sum conjecture.
added
Ahmed and Snevily give $798471$ as a lower bound for $t_{\max}(17)$. The maximum is larger than this value.
added
We give two new results:
added
- The permutation violates the Odd Sum conjecture. - A Lean proof shows that $t_{\max}(17)=798783$. The Lean kernel checks this proof.
added
## Lean proof
added
The folder `lean/` contains a Lean 4 proof of the result in the section above. The proof uses Mathlib. The Lean kernel checks each step of the proof. The proof does not use `native_decide`.
added
The file `lean/RollerCoaster/Main.lean` contains the final theorems:
added
```lean theorem t_le_17 (π : Equiv.Perm (Fin 17)) : t π ≤ 798783 theorem t_pi0 : t pi0 = 798783 theorem pi0_isRollerCoaster : IsRollerCoaster pi0 theorem oddSumConjectureOdd_false : ¬ OddSumConjectureOdd theorem oddSumConjecture_false : ¬ OddSumConjecture ```
added
`OddSumConjecture` is the odd case and the even case together. The proof shows that the odd case is false.
added
Each of these theorems uses only the standard axioms `propext`, `Classical.choice` and `Quot.sound`. The file `lean/AXIOMS.txt` contains the output of the axiom check.
added
The files have these functions:
added
- `RollerCoaster/Defs.lean` defines `tDef`. This is the statistic $t$. The Lean definition follows the definition above. - `RollerCoaster/Formula.lean` proves that `tDef` is equal to a weighted count of triples. The name of this count is `W`. - `KCheck/Search.lean` contains a branch-and-bound search. The search is plain Lean code. The search puts the positions in order from left to right. The search closes a node with a bound from smaller instances of the same problem. - `KCheck/Tab.lean` contains a table of 21240 entries. Each entry is a bound for a smaller instance. One entry is the bound for the full problem. The proof does not trust the table. - `RollerCoaster/KSound.lean` proves that the search is sound. If the search gives `true`, then the bound is correct for every sequence. - `Cert/` contains 2681 statements about the search. The Lean kernel checks each statement by calculation (`decide +kernel`). Together, the statements check each entry of the table again. The check of an entry uses only smaller entries. The search opens approximately 1.2 million nodes in total. - `Cert/Assemble.lean` puts the statements together. - `RollerCoaster/Bound.lean` gives the result `W f 0 0 17 ≤ 667865`. This is the same as $t\le 798783$. - `RollerCoaster/Value.lean` calculates the weight of the counterexample in the kernel.
added
Build the proof with this command:
added
```bash cd lean && lake exe cache get && lake build && lake env lean Audit.lean ```
added
The build of the folder `Cert/` uses approximately 70 minutes of processor time. The build runs the 160 files of this folder in parallel. One job uses approximately 1.3 GB of memory. The build starts one job for each processor core. To use fewer jobs, set the variable `LEAN_NUM_THREADS`. For example, `LEAN_NUM_THREADS=6 lake build` uses 6 jobs. With 6 jobs, the full build took 19 minutes on our computer.
added
The search uses the complement symmetry. If we replace each value $a$ by $-a$, then $W$ does not change. Thus the search examines only the sequences with $\pi_1<\pi_2$.
added
`tDef` counts two equal adjacent entries as a decrease. A permutation has no equal entries. Thus this rule has no effect on the result.
added
These programs make the table and the files in `Cert/`:
added
- `lean/tools/gen7.c` is the search in C. It makes the table. The C search also gives 798783. The command is `./gen7 17 7 12 12`. - `lean/tools/gen_tab.py` writes `KCheck/Tab.lean`. - `lean/KGen.lean` runs the Lean search as native code. It divides the search into parts for the kernel. - `lean/tools/gen_cert.py` writes the files in `Cert/`.
added
The proof does not trust these programs. The kernel checks their output.
## Why 798783 is the maximum
removed
A subsequence with $r$ runs has $r-1$ turning points, so
added
A turning point of a sequence is an entry that is a peak or a valley. A subsequence with $r$ runs has $r-1$ turning points. Thus
$$t(\pi)=\Bigl(2^n-1-n-\tbinom n2\Bigr)+\sum_{i<j<k,\ \pi_j\notin[\min(\pi_i,\pi_k),\max(\pi_i,\pi_k)]}2^{\,n-(k-i+1)}.$$
removed
The term for $(i,j,k)$ counts the subsequences in which $i,j,k$ are consecutive chosen positions and $j$ is a peak or valley. Maximizing this is an integer program over the pairwise order variables $o_{ab}=[\pi_a<\pi_b]$ with transitivity constraints.
removed
Three solvers and four independently written models give the same optimum for $n=17$ (logs in `logs/`):
removed
| Solver | Method | Result | |---|---|---| | Gurobi (Netto 2021) | MILP | 798783, reported optimal | | OR-tools CP-SAT (`optimum_cpsat.py`) | CP/SAT with LP | 798783, proved optimal in about 25 s | | HiGHS (`optimum_highs.py`) | branch and cut | 798783, proved optimal in about 40 s, gap 0 | | CP-SAT, reviewer's model (`reviewer_infeasibility_model.py`) | pure Boolean, no symmetry breaking | $t\ge 798784$ is infeasible (156 s) |
removed
The same models reproduce every published value: $t_{\max}(3..13)$ from Ahmed and Snevily's exhaustive search, and $81350, 174954, 374409$ for $n=14,15,16$. A core-guided MaxSAT solver (`optimum_maxsat.py`, RC2) also reproduces $n\le 15$; it's too slow to finish $n=17$.
added
This formula is Theorem 1 of Botler and Netto (2021). It is also Theorem 2.6 of the thesis of Netto.
added
The term for $(i,j,k)$ counts the subsequences in which $\pi_i,\pi_j,\pi_k$ are three consecutive entries. The number of these subsequences is $2^{n-(k-i+1)}$. The term is in the sum only if $\pi_j$ is a turning point.
added
The maximum of this sum is an integer program. The variables are the order variables $o_{ab}=[\pi_a<\pi_b]$. The constraints are the transitivity constraints.
added
Three solvers give the same maximum for $n=17$. A fourth run shows that no larger value is possible. These results do not use the Lean proof. The folder `logs/` contains the logs of our runs. We did not run Gurobi.
added
| Solver | Model | Result | |---|---|---| | Gurobi (Netto 2022) | MILP | 798783. The thesis says that this is the maximum. | | OR-tools CP-SAT (`optimum_cpsat.py`) | CP/SAT with LP | 798783. The solver proves that this is the maximum in approximately 50 s. | | HiGHS (`optimum_highs.py`) | branch and cut | 798783. The solver proves that this is the maximum in approximately 40 s. | | CP-SAT, second model (`reviewer_infeasibility_model.py`) | Boolean model, no symmetry breaking | $t\ge 798784$ is infeasible (156 s). |
added
The CP-SAT model gives the same values as the published values for $n=14,15,16$. These values are $81350$, $174954$ and $374409$. Ahmed and Snevily give them as conjectured values or lower bounds. Netto gives them as maxima. The folder `logs/` contains the CP-SAT log for $n=14,\dots,17$.
added
The MaxSAT solver RC2 (`optimum_maxsat.py`) gives the same value for $n=15$. We have no RC2 result for $n=17$.
## Checks
```bash python3 check.py ```
removed
Standard library only. It computes $t$ directly from the definition over all $2^{17}$ subsequences, confirms it matches the formula above (exhaustively for $n\le 7$, and at random for $n=13$), reproduces $t_{\max}(3..9)$ by brute force, and confirms $t(\pi)=798783$ with the two even pair sums.
removed
```bash python optimum_cpsat.py 17 600 ```
removed
```bash python optimum_highs.py 17 3000 ```
removed
These need `ortools` and `scipy`.
removed
## Smaller cases
removed
Complete enumerations (`enumerate_rc.py`; logs in `logs/`, lists in `data/`) give $|RC(13)|=64$, $|RC(14)|=4$ and $|RC(15)|=128$, and every one of those permutations satisfies the Odd Sum conjecture. Brute force gives the same for $n\le 9$. So $n=17$ is the first odd length where it fails.
removed
For $n=17$, `data/rc17_known_members.json` lists 68 members of $RC(17)$ found so far (local search plus solver runs, closed under reversal and complement). All 68 violate the conjecture. The complete list of $RC(17)$ is not yet known.
added
This script uses only the standard library. The script does these checks:
added
- It calculates $t$ from the definition, over all $2^{17}$ subsequences. - It compares the definition with the formula for all permutations with $n\le 7$. - It compares the definition with the formula for random permutations with $n=13$. - It calculates $t_{\max}(n)$ for $n=3,\dots,9$ by a full search. - It calculates $RC(n)$ for $n=3,\dots,6$ from the definition. It compares the result with the published lists. The lists are equal. - It checks that $t(\pi)=798783$. - It checks that a pair sum is even. It prints the even pair sums.
added
```bash python3 optimum_cpsat.py 17 600 ```
added
```bash python3 optimum_highs.py 17 3000 ```
added
These two scripts need `ortools` and `scipy`. The script `optimum_maxsat.py` needs `python-sat`.
added
```bash python3 compare_published.py ```
added
This script compares our lists of $RC(n)$ for $n=3,\dots,13$ with the lists in the preprint of Ahmed and Snevily. The lists are equal.
added
## Full lists of $RC(n)$
added
A full search over all permutations gives $RC(n)$ for $n=3,\dots,12$ (`enumerate_rc_bruteforce.c`). The script `enumerate_rc.py` gives $RC(n)$ for $n=13,\dots,17$. This script uses the solver CP-SAT. It finds a permutation with $t=t_{\max}(n)$. It blocks the permutation and its symmetric images. It does these steps again until no permutation remains. The folder `logs/` contains the logs. The script writes each list to the file `rc<n>.json`. The folder `data/` contains these files for $n=13,\dots,17$. The commands are `python3 enumerate_rc.py <n> <tmax>` and `./enumerate_rc_bruteforce <n>`.
added
| $n$ | $t_{\max}(n)$ | $\lvert RC(n)\rvert$ | Members that violate the conjecture | Method | |---|---|---|---|---| | 3 | 2 | 4 | 0 | full search | | 5 | 37 | 8 | 0 | full search | | 7 | 270 | 16 | 0 | full search | | 9 | 1523 | 32 | 0 | full search | | 11 | 7768 | 64 | 0 | full search | | 13 | 37405 | 64 | 0 | CP-SAT | | 15 | 174954 | 128 | 0 | CP-SAT | | 17 | 798783 | 128 | 128 | CP-SAT, two runs |
added
For even $n$, the lists are:
added
- $|RC(n)|=4$ for $n=4,6,8,10,12$. The method is a full search. - $|RC(n)|=4$ for $n=14,16$. The method is CP-SAT. - Each of these permutations satisfies the even case of the conjecture.
added
Thus each member of $RC(n)$ satisfies the Odd Sum conjecture for each odd $n\le 15$. All 128 members of $RC(17)$ violate the conjecture. Thus $n=17$ is the first odd length that violates the conjecture.
added
The Lean proof does not use these lists. The Lean proof shows only two facts. The first fact is that $t_{\max}(17)=798783$. The second fact is that one member of $RC(17)$ violates the conjecture. The lists for $n\ge 13$ are correct if the CP-SAT result `INFEASIBLE` is correct.
## Not verified
removed
- No Lean formalization. Optimality rests on solver runs (three independent engines), not a machine-checked certificate. - The complete list of $RC(17)$ and of $RC(16)$. - The reading of $i(\tau)+d(\tau)$ as the number of maximal monotone runs is the one that reproduces Ahmed and Snevily's published $t_{\max}$ values for $n=3..13$. Their paper itself was not consulted; the statement is taken from the Open Problem Garden entry. - The even case of the conjecture and the counting conjecture $|RC(2k+1)|=2^j$, $j\le k+1$, are not addressed.
added
- The full lists of $RC(n)$ for $n\ge 13$ come from a solver. The full lists for $n\le 12$ come from a C program. No proof assistant checked these lists. - We did not run Gurobi. We give the Gurobi result from the thesis of Netto. - The folder has no log for the Lean build time, the Lean memory use or the number of nodes. - We read the preprint of Ahmed and Snevily on the site of Ahmed. We did not read the journal version (Bull. ICA 68, 2013). - The preprint says that a sequence of contiguous numbers has at least two numbers. We read such a sequence as a run. A run is maximal. Botler and Netto use the same definition. With this definition, our lists of $RC(n)$ for $n=3,\dots,13$ are equal to the lists in the preprint. The Lean definition `tDef` uses this definition. - Example 1.2 of Adamczak (arXiv:1605.02415) gives $t(1324)=8$. Ahmed and Snevily give $t(1324)=9$. Our definition gives $9$. Thus the example of Adamczak has an error. - We do not prove or disprove the even case of the conjecture. We checked the even case only for the lengths in the section above. - We do not prove or disprove the counting conjecture $|RC(2k+1)|=2^j$, $j\le k+1$. The values in the table agree with it.
## Prior work
removed
Searched on 28 November 2026: the Open Problem Garden entry (no comments), Adamczak (arXiv:1605.02415), arXiv:1703.08735, Netto's thesis, GitHub and web search. No statement that the Odd Sum conjecture fails was found.
added
We searched on 28 November 2026. We searched these sources:
added
- The Open Problem Garden entry. It has no comments. - The preprint of Ahmed and Snevily. - Adamczak, arXiv:1605.02415. This note says that a proof of the Odd Sum conjecture is a goal. The note contains no proof of the conjecture. Netto gives a counterexample to the main argument of the note. - Adamczak, arXiv:1703.08735. Version 2 of this paper disputes the counterexample of Netto. This paper does not mention the Odd Sum conjecture. - The thesis of Netto. - Botler and Netto, New Bounds on Roller Coaster Permutations (2021). - OEIS, GitHub and the web.
added
We found no statement that the Odd Sum conjecture is false. We found no proof of the conjecture.