Two Wrongs

Programming Hamiltonian Circuits

Programming Hamiltonian Circuits

What’s your favourite language? Hamiltonian circuits, of course!



think of the hamiltonian circuit as something that WANTS to exist. that tries desperately to exist. at any choice of edge to follow, think “and now it will avoid any choice that ruins its chances of becoming a hamiltonian circuit”

sequence points help compartmentalise

circuits:

TRY(A, B)
follow exactly one of A or B (arbitrary choice if both valid)
BOTH(A, B)
the second time, follow the one not taken
PICK(A, B)
accept exactly one of A or B (arbitrary choice if both valid)