Compute every tour cost in canonical order. This is a small deterministic example, not solver engineering.

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)\begin{array}{c|c}\text{tour, cost}&\hlmath{\text{((A, B, C, D, A), 15)}}\end{array}

Step 2 — Tour cost

Compute the highlighted combinatorics value.

tour, cost((A, B, D, C, A), 18)\begin{array}{c|c}\text{tour, cost}&\hlmath{\text{((A, B, D, C, A), 18)}}\end{array}

Step 3 — Tour cost

Compute the highlighted combinatorics value.

tour, cost((A, C, B, D, A), 21)\begin{array}{c|c}\text{tour, cost}&\hlmath{\text{((A, C, B, D, A), 21)}}\end{array}

Step 4 — Tour cost

Compute the highlighted combinatorics value.

tour, cost((A, C, D, B, A), 18)\begin{array}{c|c}\text{tour, cost}&\hlmath{\text{((A, C, D, B, A), 18)}}\end{array}

Step 5 — Tour cost

Compute the highlighted combinatorics value.

tour, cost((A, D, B, C, A), 21)\begin{array}{c|c}\text{tour, cost}&\hlmath{\text{((A, D, B, C, A), 21)}}\end{array}

Step 6 — Tour cost

Compute the highlighted combinatorics value.

tour, cost((A, D, C, B, A), 15)\begin{array}{c|c}\text{tour, cost}&\hlmath{\text{((A, D, C, B, A), 15)}}\end{array}
combinatorics-search Every row is intentionally ordered and pinned to the lesson specification.