Walk predecessors backward and reverse the path. This is a small deterministic example, not solver engineering.

Example

Walk predecessors backward and reverse the path.

highlighted = computed this step

Step 1 — Reverse walk

Compute the highlighted combinatorics value.

reverse path(E, D, C, B, A)\begin{array}{c|c}\text{reverse path}&\hlmath{\text{(E, D, C, B, A)}}\end{array}

Step 2 — Forward path

Compute the highlighted combinatorics value.

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