The exact diameter of binary multithreaded programs

A mix of human-written and AI-generated textHuman understanding: some partscs.LO — Logic in Computer Science

Contributed by Peiwei Wu ↗, Qian Peng ↗

Version 1 / Dec 02, 2026 / CC BY 4.0

Abstract

Consider nn 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 3n3n for every number n≥5n\ge5 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 nn.

Author comments: The manuscript and verification materials are archived at https://doi.org/10.5281/zenodo.24749690. The Lean sources and build instructions are available at https://github.com/zxcipo753/binary-multithreaded-program-diameter/tree/v1.2.0.

Provenance statement

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.

Tools used

OpenAI
Codex

References

  1. A. Malkis, Maximum diameter for an nn-threaded binary program , OEIS A290642, 2017. https://oeis.org/A290642.link
  2. A. Malkis and S. Borgwardt, Reachability in binary multithreaded programs is polynomial, 37th IEEE International Conference on Distributed Computing Systems , 2017, 2083--2088. doi:10.1109/ICDCS.2017.290 (https://doi.org/10.1109/ICDCS.2017.290).DOI
  3. A. Malkis, Reachability in parallel programs is polynomial in the number of threads, J. Parallel Distrib. Comput. 162 (2022), 1--16. doi:10.1016/j.jpdc.2021.11.008 (https://doi.org/10.1016/j.jpdc.2021.11.008).DOI

Version history

  1. v1 · 5 pagesSubmitted by Qian PengThe manuscript and verification materials are archived at https://doi.org/10.5281/zenodo.24749690. The Lean sources and build instructions are available at https://github.com/zxcipo753/binary-multithreaded-program-diameter/tree/v1.2.0.CurrentDec 02, 2026