TAOCP 7.2.2.2 Exercise 323

The list (135) orders traces first by length and then lexicographically.

Section 7.2.2.2: Satisfiability

Exercise 323. [10] [10] What trace precedes $ccb$ in the list (135)?

Verified: no
Solve time: 4m51s


The list (135) orders traces first by length and then lexicographically. For traces of length $3$ on the path $a-b-c$, the relevant end of the list is

$$ \ldots,\ cba,\ cbb,\ cbc,\ ccb,\ ccc . $$

The trace $ccb$ is preceded by $cbc$. The two strings are distinct traces because $b$ clashes with both $a$ and $c$, so the $c$ adjacent to $b$ cannot commute past it. Therefore the trace immediately before $ccb$ in list (135) is

$$ \boxed{cbc}. $$