Berlekamp Switching Game
   HOME

TheInfoList



OR:

The Berlekamp switching game is a
mathematical game A mathematical game is a game whose rules, strategies, and outcomes are defined by clear mathematics, mathematical parameters. Often, such games have simple rules and match procedures, such as tic-tac-toe and dots and boxes. Generally, mathemati ...
proposed by American mathematician
Elwyn Berlekamp Elwyn Ralph Berlekamp (September 6, 1940 – April 9, 2019) was a professor of mathematics and computer science at the University of California, Berkeley.David Gale David Gale (December 13, 1921 – March 7, 2008) was an American mathematician and economist. He was a professor emeritus at the University of California, Berkeley, affiliated with the departments of mathematics, economics, and industrial ...
, who discovered the same game independently, or the unbalancing lights game. It involves a system of
lightbulb Electric light is an artificial light source powered by electricity. Electric Light may also refer to: * Light fixture, a decorative enclosure for an electric light source * ''Electric Light'' (album), a 2018 album by James Bay * Electric Light ( ...
s controlled by two banks of switches, with one game player trying to turn many lightbulbs on and the other trying to keep as many as possible off. It can be used to demonstrate the concept of covering radius in
coding theory Coding theory is the study of the properties of codes and their respective fitness for specific applications. Codes are used for data compression, cryptography, error detection and correction, data transmission and computer data storage, data sto ...
.


Rules

The equipment for playing the game consists of a room containing rectangular array of lightbulbs, of dimensions a\times b for some numbers a and b. A bank of ab switches on one side of the room controls each lightbulb individually. Flipping one of these switches changes its lightbulb from off to on or from on to off, depending on its previous state. On the other side of the room is another bank of a+b switches, one for each row or column of lightbulbs. Whenever any of these switches is flipped, every lightbulb in the row or column that it controls changes from off to on or from on to off, depending on its previous state. When flipping more than one switch, the order in which the switches are flipped does not make a difference to the outcome: the same lightbulbs will be lit at the end of the sequence of flips no matter what order they are flipped. The game is played in two rounds. In the first round, the first player uses the switches that control individual lights, to set the lights on or off arbitrarily. In the second round, the second player uses the switches that control rows or columns of lights, changing the pattern of lights set by the first player into another pattern (or, possibly, leaving it unchanged). The goal of the first player is to have as many lights remaining lit at the end of the game as possible, and the goal of the second player is to have as few lights remaining lit as possible. Therefore, the first player should choose a pattern of lights for which the second player cannot turn off many lights.


History

Berlekamp worked at
Bell Labs Nokia Bell Labs, commonly referred to as ''Bell Labs'', is an American industrial research and development company owned by Finnish technology company Nokia. With headquarters located in Murray Hill, New Jersey, Murray Hill, New Jersey, the compa ...
in
Murray Hill, New Jersey Murray Hill is an unincorporated community located within portions of both Berkeley Heights and New Providence, located in Union County, in the northern portion of the U.S. state of New Jersey. It is the longtime central location of Bell ...
from 1966 to 1971. While there, he constructed a physical instance of this game for the case 10 \times 10 in the Mathematics Department commons room. David Gale also invented the game independently, some time prior to 1971. Early research on related problems included publications by , whose computer experiments can be interpreted as asking, for the 15\times 15 game, how well the second player can do against a first player who plays randomly, and by , who address Gleason's question theoretically, showing that for
almost all In mathematics, the term "almost all" means "all but a negligible quantity". More precisely, if X is a set (mathematics), set, "almost all elements of X" means "all elements of X but those in a negligible set, negligible subset of X". The meaning o ...
choices of the first player, in the limit of large game board sizes, the optimal game value is close to \tfracn^2.


Analysis

Mathematically, one can describe the lights turned on by the first player's move as a set S, and the smallest number of lights that can be achieved by the best play for the second player as a number f(S). The best play for the first player is to choose a set S that maximizes f(S). Therefore, one can describe the largest number of lights that can be achieved by the best play for the first player as a number R_ = \max_S f(S). Beyond the question of how to play well in an individual game, a broader question that has been the object of mathematical research is to characterize the value of R_ in general, as a function of a and b, to determine its behavior as a function, or to calculate its value for as many combinations of a and b as possible. The case of a square n \times n array has been solved for n \leq 12 . Additionally,
lower bound In mathematics, particularly in order theory, an upper bound or majorant of a subset of some preordered set is an element of that is every element of . Dually, a lower bound or minorant of is defined to be an element of that is less th ...
s for R_ have been found for n \leq 20 . These numbers are:
Asymptotically In analytic geometry, an asymptote () of a curve is a line such that the distance between the curve and the line approaches zero as one or both of the ''x'' or ''y'' coordinates tends to infinity. In projective geometry and related contexts, ...
, these numbers grow as \tfrac-\Theta(n^).


Computational complexity

Because there are exponentially many choices for which switches to flip, an exhaustive search for the optimal choice is not possible for large n, setting up the question of how well computationally-limited players can play this game. The first player can cause the expected game value to be \tfrac-O(n^) by playing randomly. Similarly, the second player can obtain a value whose expected distance from \tfrac is \Omega(n^) by playing randomly; this value might either be larger or smaller than \tfrac, but if it is larger the second player can flip all row switches to get a value that is smaller by the same amount. This random strategy for the second player can be made non-random using the
method of conditional probabilities In mathematics and computer science, the method of conditional probabilities is a systematic method for converting non-constructive probabilistic existence proofs into efficient Deterministic algorithm, deterministic algorithms that explicitly con ...
, giving a
polynomial time In theoretical computer science, the time complexity is the computational complexity that describes the amount of computer time it takes to run an algorithm. Time complexity is commonly estimated by counting the number of elementary operations p ...
algorithm that obtains the same solution value guarantees. A different
derandomization A randomized algorithm is an algorithm that employs a degree of randomness as part of its logic or procedure. The algorithm typically uses uniformly random bits as an auxiliary input to guide its behavior, in the hope of achieving good performan ...
gives a
parallel algorithm In computer science, a parallel algorithm, as opposed to a traditional serial algorithm, is an algorithm which can do multiple operations in a given time. It has been a tradition of computer science to describe serial algorithms in abstract mach ...
in the complexity class NC. Finding the optimal choice for the second player in the game, once the first player has chosen which bulbs to light, is an
NP-hard In computational complexity theory, a computational problem ''H'' is called NP-hard if, for every problem ''L'' which can be solved in non-deterministic polynomial-time, there is a polynomial-time reduction from ''L'' to ''H''. That is, assumi ...
problem. However, there is a
polynomial-time approximation scheme In computer science (particularly algorithmics), a polynomial-time approximation scheme (PTAS) is a type of approximation algorithm for optimization problems (most often, NP-hard optimization problems). A PTAS is an algorithm which takes an inst ...
for the n\times n game that can find a choice for the second player that leaves only (1+\varepsilon) times the minimum possible number of lit bulbs, for any \varepsilon>0, in time O(n^2)+2^.


Connection to coding theory

The Berlekamp switching game can be used in
coding theory Coding theory is the study of the properties of codes and their respective fitness for specific applications. Codes are used for data compression, cryptography, error detection and correction, data transmission and computer data storage, data sto ...
as a demonstration of the covering radius of a certain binary
linear code In coding theory, a linear code is an error-correcting code for which any linear combination of Code word (communication), codewords is also a codeword. Linear codes are traditionally partitioned into block codes and convolutional codes, although t ...
. A binary linear code of length n and dimension d is defined as a d-dimensional
linear subspace In mathematics, the term ''linear'' is used in two distinct senses for two different properties: * linearity of a ''function (mathematics), function'' (or ''mapping (mathematics), mapping''); * linearity of a ''polynomial''. An example of a li ...
of the n-dimensional
vector space In mathematics and physics, a vector space (also called a linear space) is a set (mathematics), set whose elements, often called vector (mathematics and physics), ''vectors'', can be added together and multiplied ("scaled") by numbers called sc ...
\mathbb_2^n over the finite field with two elements, \mathbb_2. The elements of the subspace are called codewords, and the covering radius is the smallest number r such that every point of \mathbb_2^n is within
Hamming distance In information theory, the Hamming distance between two String (computer science), strings or vectors of equal length is the number of positions at which the corresponding symbols are different. In other words, it measures the minimum number ...
r of a codeword. Let n = ab and d = a + b - 1. For these parameter values, the vector space \mathbb_2^n describes all possible patterns of lit bulbs on the a\times b array of lightbulbs, with a vector addition operation that combines two patterns by lighting the bulbs that appear in exactly one of the two patterns (the
symmetric difference In mathematics, the symmetric difference of two sets, also known as the disjunctive union and set sum, is the set of elements which are in either of the sets, but not in their intersection. For example, the symmetric difference of the sets \ and ...
operation on the sets of lit bulbs). One can define a linear subspace consisting of all patterns that the second player can turn completely off, or equivalently of all patterns that the second player could create starting with a board that is completely off. Although the second player has 2^ choices for how to set the second bank of switches, this subspace has 2^ elements, giving it dimension a+b-1, because flipping all of the second player's switches has no effect on the pattern of lit bulbs. Then R_ is the covering radius of this code. The set of lit bulbs chosen by the first player, with best play, gives a point of \mathbb{F}_2^n that is as far as possible from the linear subspace. The set of bulbs whose state is changed by the second player, with best play, gives the closest point in the linear subspace. The set of bulbs that remain lit after these choices are the ones whose number defines the Hamming distance between these two points.


See also

*
Lights Out (game) ''Lights Out'' is an electronic game released by Tiger Electronics in 1995. The game consists of a 5 by 5 grid of lights. When the game starts, a random number or a stored pattern of these lights is switched on. Pressing any of the lights will ...
, a different puzzle involving turning off lightbulbs using switches that control multiple bulbs


References

Coding theory Mathematical games