Playing the majority game with boolean formulae
Wildon's Weblog 2021-09-26
In the majority game, there are numbered balls, each either black or white. One knows that black balls are in the majority. At each step, one may ask
‘are balls and
the same colour’
and get a truthful answer. How many questions does it take to find a black ball? This problem was first solved by Saks and Werman, who proved the elegant result that questions are necessary and sufficient, where
is the number of
s in the binary form of
.
It is a nice exercise to find a questioning strategy that meets this target: if you discover something fundamentally different to the ‘Binary Knight Hunt’ from Section 2 of this paper, I would like to know about it! (Incidentally, the name of this strategy comes from a different setting for the problem in which black balls become Knights, who always tell the truth, white balls become Knaves, who always lie, and a comparison between balls and
becomes the question `Person
, is Person
a knight?’.) The harder part of the Saks—Werman result is that
questions are necessary. This part was later generalised by John Britnell and me to the case where black balls outnumber white balls by a specified excess.
A related problem asks for the minimum number of questions to identify the colour of every ball. After the first question in the Binary Knight Hunt when a black ball is known, the question graph is a forest: turning it into a tree by connecting the component of the known black ball to all other components identifies all the balls in questions (recall that a tree on
vertices has
edges). When
is odd, there are
possible sets of black balls (for each partition
one may colour the larger set black), and so we must learn
bits of information. Therefore this strategy is optimal. For even
the same result holds, but requires a bit more work to prove: see Theorem 4 in this later paper of mine.
The majority game for a boolean function
To state the intended generalisation we need some more notation. Let be the colour of ball
, identifying black with
and white with
. A comparison of ball
with ball
reveals
. This is
where
is the two-variable boolean formula
In this post we present some preliminary results on generalizations of the majority game in which is replaced with an arbitrary boolean formula.
Note that, in the original game, we cannot know for sure a ball is of the minority colour unless it has been compared with a ball known to be of majority colour. This observation has no analogue when comparison is replaced with evaluation of an arbitrary boolean formula. For each boolean formula we therefore have three variants of the majority game.
- Find a ball of known colour.
- Find a ball of the majority colour.
- Find the colour of every ball.
For simplicity we shall assume from now on that is odd.
Linear formulae
The relevant formulae are . We immediately note that if
is odd then
, and so we can determine a ball’s colour in just one evaluation, making (1) trivial. For (2), the first
questions may find white balls, so
evaluations are necessary and sufficient. For (3) the obvious strategy uses
questions.
Problem 1 Is it possible, using when
is odd, to find the colour of every ball using
evaluations?
At attempt to block this strategy by requiring the argument of to be distinct is easily subverted, provided that
. (Equivalently,
.) Begin by evaluating
for
distinct choices of
. Order the results so that
and
Since , exactly one of
and
is odd. If it is
then
; if it is
then
. Therefore we obtain
variables
such that
. Since
we are again in the happy position of being able to learn a ball’s colour with a single evaluation. This gives a strategy for game (1) using $\ell+1$ evaluations. For game (2) we use evaluations
for
distinct
, each not equal to any of
; this is possible since $m+1 + (\ell-1) \le m+1 + m \le n$.
Problem 2 Find optimal strategies for games (1), (2) and (3) using when repeated arguments are disallowed.
Problem 3 Show that game (1) cannot be won if .
When is even one can use a similar trick to reduce to the case
by using
questions to find balls
such that
; then
Problem 4 This reduction shows that games (1) and (2) can be solved in questions and game (3) in
questions. Are these bounds optimal?
One could also ask the analogue of Problem 4 with repeated arguments disallowed, but (3) in particular seems to have a somewhat technical flavour. The results so far suggest that games (1) and (2), with repeated arguments permitted, are the most appealing.
Majority vote
An important example of a non-linear boolean function is the -way majority vote function
. Since
, we must require distinct arguments to get an interesting problem. With this condition, observe that if
then
, and now
for any
. This suggests the following strategy: evaluate
at disjoint triples
until one sees both possible results. Let
. Now, interpolating between the sets by evaluating
and
, one can find
and
with
. As above, one further question will win game (1) and one can use very similar ideas to win games (2) and (3).
Unfortunately, if there are few white balls, it may take many evaluations to find a triple in which white balls are in the majority. For instance, suppose that and there are just two white balls. We identify
with
and cover the
-subsets of points of $\latex \mathbb{P}\mathbb{F}_2^4$ using the
lines in
. Since any two points lie on a unique line, this strategy is optimal. Still it requires
evaluations. Generally if
then there are
lines, and so
evaluations may be necessary. Thus the attractive feature of the majority game (and related Knights and Spies problems) that only
questions are needed is lost.
It therefore seems natural to require that there are exactly white balls and
black balls. Suppose, again for simplicity, that
is odd. If we evaluate
at
distinct triples (using
of the
balls) and get
every time, then we have used up at least
black balls and at most
white balls. Hence any remaining triple must have white balls in the majority. This gives a strategy for games (1) and (2) using
questions, and for game (3) using
questions.
Problem 5 Are these strategies optimal?
Problem 6 Generalize to the majority-vote function with any odd number of variables.
The majority game with
-ary functions
Another generalization that might be of interest is to allow different colours, labelled by elements of
, with strictly more than $n/q$ balls of colour $0$. We now interpret
as addition in
. Note this is not the same as the ‘plurality problem’ considered for three colours in this paper of Martin Aigner, Gianluca De Marco, Manuela Montangero, in which the result of a comparison is the familiar ‘same’ / ‘different’ from the majority game, rather than ‘0 so same’, ‘1 so different’, ‘2 so different’ as here. The authors’ main result is that
and
comparisons are necessary and sufficient to find a black ball.
Problem 7. Since bits of information are learned in each evaluation, we can expect that fewer evaluations are necessary. What are optimal strategies for each game?
Finally one could consider a combined generalization in which an arbitrary function is evaluated.