Minimal Boolean Formulas: Elegance and Challenges in Algorithm Design
2025-06-23
This article recounts the journey of computing the minimum number of AND or OR operators needed to express any Boolean function of five variables. Initially, a Floyd-Warshall algorithm variant was used, but it proved inefficient. The author and Alex Healy later collaborated, leveraging function symmetries and other properties to significantly optimize the algorithm, ultimately calculating the result as 28. The article details the algorithm's optimization process, including reducing computation through function symmetries and equivalence classes, and transitioning from a bottom-up construction to a top-down search. The final algorithm reduced computation time from an estimated months to under half a day.
Development
boolean function