Read the symmetric distances for a tiny TSP instance. This is a small deterministic example, not solver engineering.

Example

Read the symmetric distances for a tiny TSP instance.

highlighted = computed this step

Step 1 — Cities

Set up the exact small combinatorics values.

cities(A, B, C, D)\begin{array}{c|c}\text{cities}&\text{(A, B, C, D)}\end{array}

Step 2 — Distances

Compute the highlighted combinatorics value.

undirected distances((A, B, 4), (A, C, 7), (A, D, 3), (B, C, 6), (B, D, 5), (C, D, 2))\begin{array}{c|c}\text{undirected distances}&\hlmath{\text{((A, B, 4), (A, C, 7), (A, D, 3), (B, C, 6), (B, D, 5), (C, D, 2))}}\end{array}
combinatorics-search Every row is intentionally ordered and pinned to the lesson specification.