Systems / Algorithm improvement
Living calculation network
Make a network do less work while its answers and saved snapshots stay correct.
Refresh only the results that must change. Four calculations include a feedback loop; all arithmetic wraps around modulo 7. A and B must refresh together.
A = x + 2B; B = 1 + A; C = 2A; D is independent. The engine solves the arithmetic. You control invalidation and whether a preview may commit.
Network update 1 / 3
Incoming update: x changes from 0 to 2. Which cached results must refresh?
Work and correctness
Refresh work—
Best possible3
IMMUTABLE SNAPSHOT · BEFORE ANY UPDATEA 5 · B 6 · C 3 · D 4Saved reads must keep these original values.
Explore the controls, then check your result.
Need a hint?
An update to x reaches A, B and then C, but not D. Changing D reaches only D. If a preview has no consistent solution, none of its values may become live.