cs.LO — Logic in Computer Science
The exact diameter of binary multithreaded programs
Consider labelled threads, each with one private bit, communicating through a single shared bit. Each thread has its own transition rules. We prove Malkis's conjecture that the maximum finite distance between states is exactly for every number of threads. The lower bound was known. For the upper bound we show that every reachable endpoint admits an execution in which at most three threads act more than once. Three are sometimes necessary, even when there are only three threads. Once the other threads act only once, two counters and a visit condition suffice to put their moves back into a short execution. A finite certificate, verified in Lean, establishes the controller exchanges and the length bounds needed for all .