Skip to content

Interdiction view (Day 4): the adversary on a budget ladder - #66

Merged
bgent19 merged 1 commit into
mainfrom
feat/43-interdiction-view
Aug 16, 2026
Merged

Interdiction view (Day 4): the adversary on a budget ladder#66
bgent19 merged 1 commit into
mainfrom
feat/43-interdiction-view

Conversation

@bgent19

@bgent19 bgent19 commented Aug 16, 2026

Copy link
Copy Markdown
Owner

Closes #43.

Day 4's view (C): the adversary climbing a budget ladder one rung at a time, with the greedy heuristic's guess shown before the optimum's verdict at every rung.

What it does

The whole ladder arrives in one /interdict?ladder=true request per dataset and is installed as a complete spine before the keyboard goes live, so stepping a budget level — forwards or backwards, at speaking pace — is an index change and never a fetch.

The coarse unit is the budget level k, and each rung is two beats: greedy's blockade on the live network, then the optimum's flip with the throughput collapsed. Hypothesis, then verdict. Greedy's pick is the one the room can predict off the board, so it is the guess the instructor invites them to make out loud; putting the optimum first would answer the question before asking it, and it would leave the rung ending on greedy's stall rather than on the true residual the next k departs from.

Both tracks are on screen at every rung, on every dataset, with agreement stated as a pair — the theater reads 140 / 140, 60 / 60, 0 / 0. A rung with one number is read as "greedy wasn't run", and the theater's greedy correctness is a theorem about the network's shape rather than luck.

Nothing about how long Day 4 is is decided in JavaScript. Ladder length, the rung collapse and the diverges flag are read off the payload, and the timeline flags the diverging rungs so "k=1 agrees, k=2 and k=3 do not" is visible without stepping the whole ladder. The search counts are labelled Searched and Skipped, per track, because the space's size beside a greedy result claims work greedy never did.

Two tracks spend no second channel: only one blockade is ever drawn, so .removed stays a single row state and the X keeps its one meaning. The interdicted subset is row states on the one ledger with the count as a headline number, never a second list. Day 3's min-cut layer is on from beat 0 and stays toggleable over the interdicted network — the cross-day mashup the layer catalog is global for.

Accepted costs, stated so they are not read as bugs

  • The spatial punchline — greedy at the source, the optimum at the sink — becomes a comparison across a keypress.
  • A diverging rung shows a wrong answer first and lives with it for both of its beats.
  • The panel never shows both blockades at once.
  • Unit 1 carries a pristine beat before its two rung beats, so 1 lands on the untouched theater. Same fold, and same cost, as the Flow & Cut spine.

Two things the review moved

  • showCut is now shared with the Flow & Cut spine. Day 4 draws Day 3's certificate underneath its own wreckage, and a certificate rendered from two blocks of code is one that can mean one thing on Wednesday and another on Thursday.
  • The untouched theater's throughput comes off /maxflow rather than off the ladder's own baseline_throughput. It sits one slot from the cut capacity it must equal by max-flow/min-cut, and two numbers that must be equal, fetched by two routes, are a contradiction waiting for a projector.

A blockade naming a lane the diagram cannot draw now throws while the spine is being built, rather than being skipped: skipping drops the lane from the picture and from the Struck count, which is a headline number quietly too small with nothing raised anywhere.

Verification

Full suite 365 passed, including ten new tests for this ticket in tests/test_web_assets.py. The frontend is verified from Python or not at all, so no JS toolchain is added here — but since Python cannot execute the modules, the spine was additionally driven under Node against real API payloads while developing: 7 beats / 3 units on the trap, divergence false, true, true, ends declining rather than wrapping, digit jumps landing on the right rung, and both the missing-lane guard and the truncated-ladder label firing.

The picture itself is eyeballed, as ever.

#43)

The whole ladder arrives in one request per dataset and is installed as a
complete spine before the keyboard goes live, so stepping a budget level --
forwards or backwards, at speaking pace -- is an index change and never a
fetch.

The coarse unit is the budget level k, and each rung is two beats: greedy's
blockade on the live network, then the optimum's flip with the throughput
collapsed. Hypothesis, then verdict. Greedy's pick is the one the room can
predict off the board, so it is the guess the instructor invites them to make
out loud; putting the optimum first would answer the question before asking
it, and it would leave the rung ending on greedy's stall rather than on the
true residual the next k departs from.

Both tracks are on screen at every rung, on every dataset, with agreement
STATED as a pair -- the theater reads 140 / 140, 60 / 60, 0 / 0. A rung with
one number is read as "greedy wasn't run", and the theater's greedy
correctness is a theorem about the network's shape rather than luck.

Nothing about how long Day 4 is is decided in JavaScript. Ladder length, the
rung collapse and the `diverges` flag are read off the payload, and the
timeline flags the diverging rungs so "k=1 agrees, k=2 and k=3 do not" is
visible without stepping the whole ladder. The search counts are labelled
`Searched` and `Skipped`, per track, because the space's size beside a greedy
result claims work greedy never did.

Two tracks spend no second channel: only one blockade is ever drawn, so
`.removed` stays a single row state and the X keeps its one meaning. The
interdicted subset is row states on the one ledger with the count as a
headline number, never a second list.

Notes on two things the review moved:

- `showCut` is now shared with the Flow & Cut spine. Day 4 draws Day 3's
  certificate underneath its own wreckage -- the cross-day mashup the layer
  catalog is global for -- and a certificate rendered from two blocks of code
  is one that can mean one thing on Wednesday and another on Thursday.
- The untouched theater's throughput comes off `/maxflow` rather than off the
  ladder's own `baseline_throughput`. It sits one slot from the cut capacity
  it must equal by max-flow/min-cut, and two numbers that must be equal,
  fetched by two routes, are a contradiction waiting for a projector.

A blockade naming a lane the diagram cannot draw now throws while the spine is
being built, rather than being skipped: skipping drops the lane from the
picture AND from the `Struck` count, which is a headline number quietly too
small with nothing raised anywhere.

Closes #43
@bgent19
bgent19 merged commit 6bfb49e into main Aug 16, 2026
1 check passed
@bgent19
bgent19 deleted the feat/43-interdiction-view branch August 16, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Interdiction view (Day 4)

1 participant