The exact diameter of binary multithreaded programs
Consider n 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 3n for every number n ≥ 5 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 n. Version 1.2.0 gives the uniform upper bound max(3n, n+10) and its relation to the known diameters 13 and 14 at three and four threads. The Lean sources include a separate proof that adjoining one independent thread can increase any attainable distance by exactly one. The archive contains the paper, TeX source, Lean certificates and an independent C++ verifier. The manuscript credits moridinamael for the shared-bit flux idea and kent234535 for proposing the three-controller bound and testing four-thread programs. Author contributions and use of AI. Peiwei Wu and Qian Peng directed the investigation of Malkis's diameter conjecture. They used OpenAI Codex to develop the controller-exchange and length arguments, construct and test the finite certificates, formalize the proofs in Lean, and draft and revise the manuscript.
Authors
- Qian PENG
- Peiwei Wu (ORCID: https://orcid.org/0009-0008-3096-1669)
Institutions
- The University of Melbourne (AU)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-12-02
- DOI
- https://doi.org/10.5281/zenodo.24748081
- Primary Topic
- semigroups and automata theory
- Type
- preprint