1

Here's a problem I devised for myself recently. Suppose an oracle has a secret $n$-digit bit string (that is, a sequence of integers $b_1, \ldots, b_n\ \in \{0, 1\}$) that we want to figure out. We can query the oracle by giving it one bit string $a_1, \ldots, a_n$ at a time and getting the result $\sum_{i=1}^n a_n b_n$, the number of matching $1$s in the query string and secret string.

There's an obvious way to figure out the secret string in only $n$ queries by submitting strings with only one bit set to $1$. My question is: is there an algorithm, at least for some value of $n$, that can deduce the secret bit string in at most $n-1$ guesses? It seems intuitive that there should be: you only need $n$ bits of information to guess the bit string, and most queries have more than two possible results and seem like they should you much more than one bit of information. But I haven't found a general-purpose algorithm, and an exhaustive computer search of the $n = 5$ case found that no set of four query strings gave distinguishable results for all $32$ possible secret strings.

Equivalent (I think) linear algebra reformulation: If $A$ is an $m \times n$ matrix with $m < n$ and all entries either $0$ or $1$, does $\ker A$ necessarily contain a vector whose entries are all in $\{-1, 0, 1\}$? This vector is $\vec{b}_1 - \vec{b}_2 $, where $\vec{b}_1$ and $\vec{b}_2$ are two bit strings that give the same results $A \vec{b}_i$ when queried with the guesses in each row of $A$---and, conversely, it's trivial, given such a vector, to construct a possible $\vec{b}_1$ and $\vec{b}_2$.

0 Answers0