Notes of this continuation: hypothesis, indexing challenge, indexes, selection, calibration.
This page describes version 2026-11-28b, the program on the indexed-search page. The program published on 27 November 2026 is 2026-11-28a. It draws the whole most-negative dH page and keeps the last 20 movements.
Two indexes, built once
start() builds both indexes once. Later iterations maintain them. They do not call that builder again.
Horizon 1 is dH. For each candidate move it stores how many monochromatic edges the move adds or removes. A negative dH lowers the score. change() walks the edges of the moved vertex and shifts the buckets those edges touch. When dH is not zero, the moved vertex's own buckets shift by -dH. The cost of that step follows the degree and the active pages of those neighbors.
Horizon 2 is the opportunity index. It lives in parallel arrays and in one project linked list. It does not add fields to a movement. The list is not ordered. The draw walks vertex, then color. The color already chosen is unlinked, so it is not a candidate. The bucket of the current color is not a candidate either.
The default horizon is 2. -D Horizon=n overrides it, and the value is capped at the number of vertices. In this continuation a horizon above 0 still measures only the neighbors of the vertex. A larger setting does not walk deeper.
What horizon 2 counts
The move takes color x off the vertex and puts color y on it. Opportunity is only the adjacency of that vertex. A vertex that is not adjacent is outside this measure.
quitar is the conflicts the neighbors can remove by using x. poner is the conflicts those neighbors keep because they can no longer use y. Adjacent neighbors are one choice: the maximum-weight independent set, not the sum. Neighbors with no edge between them add. A neighbor that already holds the color contributes 0. The root is marked, so the triangle A—B—C—A does not recompute A.
Using the freed color x removes max(0, −(dH − 1)) conflicts. The edge back to the moved vertex is no longer counted. Occupying y forfeits max(0, −dH) conflicts. quitar and poner are two separate independent sets. They are not a per-neighbor net that is then combined.
The stored key of a candidate that puts color c on vertex v stays
dH(v, c) − put(v, c) + cut(v)
cut(v) is quitar, the opportunity of freeing the current color. put(v, c) is poner, the opportunity taken away by occupying c. Minimizing that stored key treats a large put as attractive. The draw does not minimize the stored key.
The page rank, used only when the selection has left the dH pages, is
dH − quitar + poner
which is dH + put − cut. A climb beats a flat only when quitar covers the conflicts the climb adds and the conflicts of losing y. The selection page says when that rank is read.
On the triangle, every vertex on color 0, dH of a new color is −2. Each neighbor would drop 2 by taking that new color, and the two neighbors are adjacent, so put is 2. The neighbors already hold the freed color, so cut is 0. The stored key is −4. That coloring reaches zero conflicts in 2 steps. On the path 0—1—2—3, after vertex 1 takes color 1, vertex 0 keeps put 0 and cut 0, and the coloring reaches zero in 1 step. Those two counts matched a fresh evaluation.
Unused colors that still share an identical dH column share one walk. The share is decided by reading the columns. It does not rebuild dH. After the coloring mixes, the share falls away. A shared column is still a candidate in the draw.
What one step rewrites
change() maintains dH first. The opportunity step then rewrites the closed ball of radius Horizon+1 in place, on the same records. At horizon 2 that radius is 3. Vertices outside the ball keep their stored put and cut. The builder does not run again.
The neighbor measure itself depends on vertices at distance at most 2: a vertex at distance 3 cannot have a neighbor whose dH this move changed. Radius 3 is one layer past that. It is the radius the step uses.
Eight steps were measured on two graphs, after the builder had run only at the start.
On r125.5 the diameter is 3, so the ball of radius 3 is all 125 vertices. In those eight steps every opportunity value changed. The step still wrote the existing records. It did not rebuild the table from an empty index. dH still moved only along the edges of the moved vertex.
On le450_25a the diameter is 4. In those eight steps the moved vertices still had a ball of all 450 vertices. Between 20 and 83 of those values stayed equal, and nothing outside the ball changed.
Reading every color column, in order to share identical unused columns, is a full read of dH. It is not a reconstruction of the dH values.
This maintenance does not put coloring in P. There is no polynomial bound on the number of moves. On a graph of diameter 3 the opportunity step still visits every vertex. The indexing challenge is to keep the same numbers at a lower cost.