Example
Compute every tour cost in canonical order.
highlighted = computed this step
Step 1 — Tour cost
Compute the highlighted combinatorics value.
tour, cost((A, B, C, D, A), 15)
Step 2 — Tour cost
Compute the highlighted combinatorics value.
tour, cost((A, B, D, C, A), 18)
Step 3 — Tour cost
Compute the highlighted combinatorics value.
tour, cost((A, C, B, D, A), 21)
Step 4 — Tour cost
Compute the highlighted combinatorics value.
tour, cost((A, C, D, B, A), 18)
Step 5 — Tour cost
Compute the highlighted combinatorics value.
tour, cost((A, D, B, C, A), 21)
Step 6 — Tour cost
Compute the highlighted combinatorics value.
tour, cost((A, D, C, B, A), 15)
combinatorics-search
Every row is intentionally ordered and pinned to the lesson specification.