How many bits must an algorithm read?: an exposition to Reconstructing OpenAI’s nearly quartic query separation, written for this reader with AI. The theorem and its proof are OpenAI’s. AI systems wrote the three accounts, the Lean and the links between them, under Will Cook’s direction. The links from the text to the Lean, the titles, the reading notes and the comparisons were made with AI. No mathematician has reviewed them.
Auto select follows the paper as you scroll. Hover over a marked phrase to preview its Lean and see how the two compare. Click a phrase to keep it selected in Manual.
How many bits must an algorithm read?
OpenAI’s nearly quartic separation between randomized and quantum queries
Written by AI systems under the direction of Will Cook · November 2026
About this paper. AI systems wrote this paper, its two companion texts and the Lean development, under the direction of Will Cook. No human expert has reviewed them, and no person has checked that the Lean statements say what OpenAI’s paper says; AI agents made that comparison. The separation theorem, its construction and its proof are OpenAI’s (OpenAI 2026).
OpenAI recently constructed total Boolean functions whose bounded-error randomized query complexity is almost the fourth power of their quantum query complexity (OpenAI 2026, Theorem 1.1). Since Aaronson, Ben-David, Kothari, Rao and Tal had shown that the fourth power is always enough (Aaronson et al. 2021), this settles the largest possible gap between the two measures up to the in the exponent. In this exposition we develop OpenAI’s construction and both of its query bounds from a four-column table, working each new idea out on small numbers before stating it in general. We assume finite-dimensional linear algebra, conditional probability and asymptotic notation, and no prior knowledge of quantum algorithms. Sections 1–8 form one continuous argument; the appendices hold the longer calculations and the answers to the exercises. The expert companion gives a shorter route for specialists, and the full proof reconstruction contains every supporting proof.
1. Reading bits one at a time
Does any column in this table have a one in every row?
| Column 1 | Column 2 | Column 3 | Column 4 | |
|---|---|---|---|---|
| Row 1 | 1 | 0 | 1 | 1 |
| Row 2 | 1 | 1 | 0 | 1 |
| Row 3 | 1 | 1 | 1 | 0 |
| Row 4 | 0 | 1 | 1 | 1 |
Read down column 1. Its first three numbers are ones, but the number in row 4 is zero. Columns 2, 3 and 4 also contain zeros, in rows 1, 2 and 3 respectively, so the answer is no. Now change the zero in row 4 of column 1 to a one. Column 1 has four ones, and the answer changes to yes.
Cover all sixteen numbers. You may name a row and a column and uncover the number written there. Each number is a bit, either zero or one, and reading the bit in one square of your choice costs one query. If you ask for row 2 of column 3, you get zero on either table, and you can cross out column 3. If you ask for row 4 of column 1, you get zero on the original table and one on the changed table, so one query in that square distinguishes the two tables. We think of the table as a memory that can only be read one bit at a time, and we count nothing except the reads (de Wolf 2026, sec. 2.4; Buhrman and de Wolf 2002, sec. 3).
What if we move the zeros around before covering the numbers? Put a single zero in each column, choosing its row uniformly at random and independently in each column, and fill every other square with a one. Make a copy of the table, choose one of the four columns uniformly at random, and change its zero to a one in the copy. Suppose you read the four numbers across the top row of each table. You get different answers on the two tables precisely when the changed zero was in the top row, which happens with probability . Reading the top two rows costs eight queries per table and raises the probability to .
On a table with rows and columns, reading the first rows costs queries and detects the change with probability . Here we chose all the rows in advance. In Section 7 the algorithm may use every bit it has already read to choose its next square, and we will see that this does not help it much.
1.1 Quantum queries
Loading the paper…