Acessibilidade / Reportar erro

On a continuous Gale-Berlekamp switching game

Abstract

We propose a continuous version of the classical Gale–Berlekamp switching game. The main results of this paper concern growth estimates for the corresponding optimization problems.

Key words
Gale–Berlekamp switching game; unbalancing lights problem; game theory; Khinchin inequality

Introduction

Designed1 2010 Mathematics Subject Classification. Primary 91A, 26D15. independently by Elwyn Berlekamp and David Gale in the 1960’s, the Gale–Berlekamp switching game – also known as the unbalancing lights problem – represents a classic in the field of combinatorics and its applications, with deep connections to theoretical Computer Science. This single-player game consists of an n×n square matrix of light bulbs set-up at an initial light configuration. The goal is to turn off as many lights as possible using n row and n column switches, which invert the state of each bulb in the corresponding row or column.

For an initial pattern of lights Θ, let i(Θ) denote the smallest final number of on-lights achievable by row and column switches starting from Θ. The smallest possible number of remaining on-lights Rn, starting from the worst initial pattern, is then

Rn=max{i(Θ):Θ is an n×n light pattern}.
Sometimes this optimization problem is posed as finding the maximum of the difference between the number of lights that are on and the number that are off, often denoted by Gn. Obviously both problems are equivalent as Rn=12(n2Gn).

The original problem introduced by Berlekamp asks for the exact value of R10 and it was proved in Carlson & Stolarski (2004) that R10=35 (and thus G10=30). Several related questions pertaining to the original problem have been investigated in depth, see e.g. Brualdi & Meyer 2015BRUALDI RA & MEYER SA. 2015. Gale-Berlekamp permutation-switching problem. European J Combin 44: pat A, 43-56., Carlson & Stolarski 2004CARLSON J & STOLARSKI D. 2004. The correct solution to Berlekamp’s switching game. Discrete Math 287: 145-150., Fishburn & Sloane 1989FISHBURN PC & SLOANE NJA. 1989. The solution to Berlekamp’s switching game. Discrete Math 74: 262-290. and Schauz 2011; in particular the hardness of solving the Gale-Berlekamp switching game was studied in Roth & Viswanathan 2008ROTH RM & VISWANATHAN K. 2008. On the hardness of decoding the Gale-Berlekamp code. IEEE Trans. Inform Theory 54(3): 1050-1060..

In this paper we propose a continuous version of the Gale–Berlekamp switching game. We are interested in a continuous version of the game for which vectors replace light bulbs and knobs substitute the discrete switches used to invert the state of the bulbs in the original problem. In our approach, we also allow the game–board not to be square.

To explain the new proposed game, we initially notice that by associating +1 to the on–lights and 1 to the off–lights from the array of lights (aij)i,j=1n the goal of the original game can be understood mathematically as to determine

G n = min { max x i , y j { 1 , 1 } | i , j = 1 n a i j x i y j | : a i j = 1 or + 1 } ,

where xi and yj denote the switches of the row i and of the column j, respectively.

The new optimization problem herein proposed involves a matrix (aij) with n1 rows and n2 columns whose elements are unit vectors of the plane, 2. The initial direction pattern of each n1n2 vectors is set up at the beginning of the game. In each row i and each column j there are knobs xi and yj, respectively. Rotating the knob xi by an angle θi, it rotates all vectors aij of the row i by the same angle θi. Analogously, when the knob yj is rotated by an angle θj, the same happens with all the vectors aij of the column j (see Figure 1).

Figure 1
Continuous version of the Gale-Berlekamp switching game for n=10.

The game consists of maximizing the Euclidean norm of the sum of all vectors in the final stage. More precisely, for an initial pattern Θ of unit vectors, let s(Θ) be the supremum of the (Euclidean) norms of the sums of all n1n2 vectors achievable by row and column adjusts. The extremal problem is to determine

Gn1n2(1):=min{s(Θ):Θ an n1×n2 pattern}.

Our main result estimates the asymptotic growth of Gn1n2(1):

Theorem 1. For all positive integers n1,n2, we have

0.886 G n 1 n 2 ( 1 ) n 1 n 2 max { n 1 , n 2 } 1 . (1)

We conclude this introduction by commenting on the ideas and techniques used to prove Theorem 1, which are of particular interest. We observe that due to the combinatorial complexity of this kind of problems, growth estimates as in Theorem 1 are often obtained by non-deterministic techniques, see for instance Alon & Spencer 1992ALON N & SPENCER J. 1992. The Probabilistic Method, Wiley. (Second Edition, 2000, Third Edition 2008)., Araújo & Pellegrino 2019ARAÚJO G & PELLEGRINO D. 2019. A Gale-Berlekamp permutation-switching problem in higher dimensions. European J Combin 77: 17-30. and Bennett et al. 1975BENNETT G, GOODMAN V & NEWMAN CM. 1975. Norms of random matrices. Pacific J Math 59(2): 359-365.. A main novelty proposed in this article regards a deterministic approach to estimating Gn1n2(1), which yields improved, more precise estimates than those obtained by non-deterministic methods. We believe that the methods herein developed are likely to be applicable in an array of other problems and to exemplify the depth of these new ideas, we also prove analogues of (1) in higher-dimensional configurations.

Proof of Theorem 1

Initially, it is more convenient to conceive the vectors in the game as complex numbers aij with modulus 1, which represent the elements of the array (aij)i,j=1n1,n2. In this case, when the player rotates a knob, the action is modeled by the multiplication by unimodular complex numbers.

There is no loss of generality in supposing that n1n2. We start off the proof of Theorem 1 by reminding that a consequence of the Krein–Milman Theorem assures that for all A:n1×n2, defined by

A(ej1,ej2)=aj1j2,
where ek:=(0,,0,1,0,,0), with 1 exactly at the k-th position, there holds
A=sup|xj1(1)|=|xj2(2)|=1|j1,j2=1n1,n2aj1j2xj1(1)xj2(2)|,
i.e., the supremum norm of A is attained at the extreme points of the closed unit balls of n1 and n2. Thus we can easily observe that
Gn1n2(1)=inf{A:|aj1j2|=1}
and our task is then to estimate the infimum of A over all bilinear forms A:n1×n2 with unimodular coefficients.

Once the problem has been described as above, the upper bound in Theorem 1 can be obtained by means of an argument from the seminal paper of Bohnenblust & Hille 1931BOHNENBLUST HF & HILLE E. 1931. On absolute convergence of Dirichlet series. Ann of Math 32: 600-622., Theorem II, page 608. We shall explain the necessary adaptations when we deliver the proof of Theorem 2.

As for the lower estimate, we shall make use of Khinchin inequality, which we revise for the sake of completeness.

Khinchin inequality

To motivate, let’s state the following question: suppose that we have n real numbers a1,,an and a fair coin. When we flip the coin, if it comes up heads, you choose β1=a1, and if it comes up tails, you choose β1=a1. When we play for the second time, if it comes up heads, you choose β2=β1+a2 and, if it comes up tails, you choose β2=β1a2. Repeating the process, after having flipped the coin k times we have

βk+1:=βk+ak+1,
if it comes up heads and
βk+1:=βkak+1,
if it comes up tails. After n steps, what should be the expected value of
|βn|=|k=1n±ak|?
Khinchin’s inequality, see for instance Diestel et al. 1995DIESTEL J, JARCHOW H & TONGE A. 1995. Absolutely summing operators, Cambridge Stud. Adv Math 43., page 10, shows that the “ average”
12nεDn|j=1nεjaj|,
where Dn={1,1}n and ε=(ε1,,εn), behaves as the 2-norm of (aj)j=1n. More precisely, it asserts that for any p>0 there are constants Ap,Bp>0 such that
Ap(j=1n|aj|2)12(12nεDn|j=1nεjaj|p)1pBp(j=1n|aj|2)12
for all sequences of scalars (aj)j=1n and all positive integers n. The natural counterpart for the average 12nεDn|j=1nεjaj| in the complex framework is
(12π)n02π02π|j=1najeitj|dt1dtn.
It is well known that in this new context we also have a Khinchin-type inequality, called Khinchin inequality for Steinhaus variables, which asserts that there exist constants Ap̃ and Bp̃ such that
Ap̃(j=1n|aj|2)12((12π)n02π02π|j=1najeitj|pdt1dtn)1pBp̃(j=1n|aj|2)12(2)
for every positive integer n and all scalars a1,,an.

Back to the proof of Theorem 1, for the purpose of establishing a lower estimate for the growth of Gn1n2(1), we are interested in the case p=1 and only in the left hand side of (2). In König 2014KÖNIG H. 2014. On the best constants in the Khintchine inequality for Steinhaus variables. Israel J Math 203: 23-57. it is proven that A1̃=π/2. For a bilinear form A:n1×n2 given by

A(ej1,ej2)=aj1j2
with
|aj1j2|=1,
we have
(j1=1n1|A(ej1,ej2)|2)1/2(2π)(12π)n102π02π|j1=1n1A(ej1,ej2)eitj1|dt1dtn1=(2π)(12π)n102π02π|A(j1=1n1eitj1ej1,ej2)|dt1dtn1.
Since
02π02πj2=1n2|A(j1=1n1eitj1ej1,ej2)|dt1dtn1(2π)n1maxt1,,tn1[0,2π]j2=1n2|A(j1=1n1eitj1ej1,ej2)|,
denoting the topological dual of n by (n)* and its closed unit ball by B(n)*, we have
j2=1n2(j1=1n1|A(ej1,ej2)|2)1/2(2π)(12π)n102π02πj2=1n2|A(j1=1n1eitj1ej1,ej2)|dt1dtn1(2π)maxt1,,tn1[0,2π]j2=1n2|A(j1=1n1eitj1ej1,ej2)|(2π)AsupφB(n2)*j2=1n2|φ(ej2)|=(2π)A,
where in the last equality we have used the isometric isomorphism
1n(n)(aj)j=1nφ ,
with φ:n defined by
φ((xj)j=1n)=j=1najxj.
Finally, since |A(ej1,ej2)|=1, we conclude that
A(π2)n2n112.
Hence, as n2n1, we have

( π 2 ) G n 1 n 2 ( 1 ) n 1 n 2 max { n 1 , n 2 } .

The game in higher dimensions

The Gale–Berlekamp switching game has a natural extension to higher dimensions. Let m2 be an integer and let an n××n array (aj1jm) of lights be given, each either on (aj1jm=1) or off (aj1jm=1). Let us also suppose that for each k=1,,m and each jk=1,,n there is a switch xjk(k) so that if the switch is pulled (xjk(k)=1) all of the corresponding lights aj1jm (with jk fixed) are switched: on to off or off to on. The goal is to maximize the difference between the number of lights that are on and the number of lights that are off. As in the two-dimensional case, maximizing the difference between the number of on-lights and off-lights is equivalent to estimating

maxxj1(1),,xjm(m){1,1}|j1,,jm=1naj1jmxj1(1)xjm(m)|
and the extremal problem consists of estimating
Sn=min{maxxj1(1),,xjm(m){1,1}|j1,,jm=1naj1jmxj1(1)xjm(m)|:aj1jm=1 or 1},
As in the bilinear case,
Sn=minA:n××n,
with
A(x(1),,x(m))=j1,,jm=1naj1jmxj1(1)xjm(m).
The anisotropic case allows to consider n1××nm arrays, not necessarily square arrays and, in this case, we write
Sn1nm=min{maxxj1(1),,xjm(m){1,1}|j1,,jm=1n1,,nmaj1jmxj1(1)xjm(m)|:aj1jm=1 or 1}.
From a recent result of Albuquerque & Rezende 2019ALBUQUERQUE N & REZENDE L. 2019. Asymptotic estimates for unimodular multilinear forms with small norms on sequence spaces. Bull Braz Math Soc New Series 52(2021): 23-39., we can easily obtain

1 m ( 2 ) m 1 S n 1 n m n 1 n m max { n 1 , , n m } 8 m m ! log ( 1 + 4 m ) .

Following the notation of Araújo and Pellegrino 2019, let m2 be an integer and (ai1im) be an n××n array of complex scalars such that |ai1im|=1. For p(1,], let

gm,n(p)=max|i1,,im=1nai1imxi1(1)xim(m)|,
where the maximum is evaluated over all xij(j) such that (xij(j))ij=1np=1 for all j. It is not difficult to prove that
gm,n(p)=A:pn××pn,
with
A(x(1),,x(m))=i1,,im=1nai1imxi1(1)xim(m).
Denoting
Gm,n(p)=mingm,n(p),(3)
where minimum is evaluated over all unimodular m-linear forms A:pn××pn, the best information we can collect (combining results from Araújo & Pellegrino 2019ARAÚJO G & PELLEGRINO D. 2019. A Gale-Berlekamp permutation-switching problem in higher dimensions. European J Combin 77: 17-30. and Pellegrino et al. 2020PELLEGRINO D, SERRANO-RODRÍGUEZ D & SILVA J. 2020. On unimodular multilinear forms with small norms on sequence spaces. Lin Algebra Appl 595: 24-32.) is the following:

| 1 1.3 m 0.365 G m , n ( p ) n m p + p 2 m 2 p 8 m ! log ( 1 + 4 m ) for p [ 2 , ] 1 G m , n ( p ) n 1 1 p C m , p for p ( 1 , 2 ] ,

where Cm,p is obtained by interpolation (via the Riesz–Thorin Theorem) of the constant 1 (the constant when p=1) and 8m!log(1+4m) (the constant when p=2).

The above solution rests in a non-deterministic tool. We shall show in what follows that for p= we can find deterministic solutions with better constants.

We begin with a matrix (aj1jm)j1,,jm=1n1,,nm whose elements are unit vectors in the Euclidean space 2. The initial direction pattern of each n1nm vectors is set up at the beginning of the game. For each k{1,,m}, we have nk control knobs x1(k),,xnk(k). When the knob xjk(k) is rotated by an angle θjk(k), the same happens with all the vectors aj1jm with jk fixed. Defining Θ and s(Θ) as in the two-dimensional case, the extremal problem is to determine

Gn1nm(1):=min{s(Θ):Θ an n1××nm pattern}.
It is worth mentioning that, as a consequence of the Krein-Milman Theorem, we know that Gnn(1) coincides with Gm,n(), as defined in (3). We prove the following:

Theorem 2. For all positive integers m2, n1,,nm1 we have

( 0.886 ) m 1 ( π 2 ) m 1 G n 1 n m ( 1 ) n 1 n m max { n 1 , , n m } 1 .

Moreover, the universal upper bound 1 cannot be improved.

The proof that, in general, the upper bound 1 cannot be improved is trivial — just consider n2==nm=1 and note that in this case

Gn1nm(1)=n1=n1nmmax{n1,,nm}.
The case n1==nm was investigated in Araújo & Pellegrino (2019), but the techniques used by the authors do not provide good estimates for the upper constants: for instance, if we follow the arguments from Araújo & Pellegrino (2019) we just obtain 8m!log(1+4m), due to Kahane–Salem–Zygmund inequality, instead of the universal sharp constant 1.

Proof of Theorem 2

Our task is to estimate inf{A:|aj1jm|=1}, where the infimum runs over all m-linear forms A:n1××nm with unimodular coefficients.

With no loss of generality, we suppose n1nm. For the upper bound, consider, for all k=1,,m1, a nk+1×nk+1 matrix (ars(k)) with

ars(k)=e2πirsnk+1.
A simple computation shows that
{t=1n2art(1)ast(1)¯=n2δrs.|ars(1)|=1.{t=1nmart(m1)ast(m1)¯=nmδrs.|ars(m1)|=1.
All the matrices are completed with zeros (if necessary) in order to get a square matrix nm×nm. Define
A:n1××nm
by
A(x(1),,x(m))=i1,,im=1n1,,nmai1i2(1)ai2i3(2)aim1im(m1)xi1(1)xim(m)
and note that, since n1nm, the coefficients
ci1im:=ai1i2(1)ai2i3(2)aim1im(m1)
of all monomials xi1(1)xim(m) with ik{1,,nk} are unimodular. For x(1)Bn1,,x(m)Bnm, consider y(1)Bnm,,y(m)Bnm defined by
y(1)=(x1(1),,xn1(1),0,,0)
and so on. We have
|A(x(1),,x(m))|=|i1,,im=1nmai1i2(1)ai2i3(2)aim1im(m1)yi1(1)yim(m)|im=1nm|i1,,im1=1nmai1i2(1)ai2i3(2)aim1im(m1)yi1(1)yim1(m1)||yimm|(im=1nm|yim(m)|2)1/2(im=1nm|i1,,im1=1nmai1i2(1)ai2i3(2)aim1im(m1)yi1(1)yim1(m1)|2)1/2nm1/2(im=1nmi1,,im1=1j1,,jm1=1nmai1i2(1)aj1j2(1)¯aim1im(m1)ajm1im(m1)¯yi1(1)yj1(1)¯yim1(m1)yjm1(m1)¯)1/2.
Thus
|A(x(1),,x(m))|nm1/2(im=1nmi1,,im1=1j1,,jm1=1nmai1i2(1)aj1j2(1)¯aim1im(m1)ajm1im(m1)¯yi1(1)yj1(1)¯yim1(m1)yjm1(m1)¯)1/2=nm1/2(i1,,im1=1j1,,jm1=1nmai1i2(1)aj1j2(1)¯aim2im1(m2)ajm2jm1(m2)¯yi1(1)yj1(1)¯yim1(m1)yjm1(m1)¯im=1nmaim1im(m1)ajm1im(m1)¯)1/2.
Since
im=1nmaim1im(m1)ajm1im(m1)¯=nmδim1jm1,
we have
|A(x(1),,x(m))|nm1/2(im1=1nmi1,,im2=1j1,,jm2=1nmai1i2(1)aj1j2(1)¯aim2im1(m2)ajm2im1(m2)¯yi1(1)yj1(1)¯yim2(m2)yjm2(m2)¯yim1(m1)yim1(m1)¯nm)1/2=nm(im1=1nmi1,,im2=1j1,,jm2=1nmai1i2(1)aj1j2(1)¯aim2im1(m2)ajm2im1(m2)¯yi1(1)yj1(1)¯yim2(m2)yjm2(m2)¯|yim1(m1)|2)1/2nm(i1,,im2=1j1,,jm2=1nmai1i2(1)aj1j2(1)¯aim3im2(m3)ajm3im2(m3)¯yi1(1)yj1(1)¯yim2(m2)yjm2(m2)¯im1=1nmaim2im1(m2)ajm2im1(m2)¯)1/2.
Thus
|A(x(1),,x(m))|nm(i1,,im2=1j1,,jm2=1nmai1i2(1)aj1j2(1)¯aim3im2(m3)ajm3im2(m3)¯yi1(1)yj1(1)¯yim2(m2)yjm2(m2)¯im1=1nmaim2im1(m2)ajm2im1(m2)¯)1/2.
Since
(i1,,im2=1j1,,jm2=1nmai1i2(1)aj1j2(1)¯aim3im2(m3)ajm3im2(m3)¯yi1(1)yj1(1)¯yim2(m2)yjm2(m2)¯im1=1nmaim2im1(m2)ajm2im1(m2)¯)1/2=nm11/2(im2=1nmi1,,im3=1j1,,jm3=1nmai1i2(1)aj1j2(1)¯aim3im2(m3)ajm3im2(m3)¯yi1(1)yj1(1)¯yim2(m2)yim2(m2)¯)1/2=nm11/2(im2=1nm|yim2(m2)|2i1,,im3=1j1,,jm3=1nmai1i2(1)aj1j2(1)¯aim3im2(m3)ajm3im2(m3)¯yi1(1)yj1(1)¯yim3(m3)yjm3(m3)¯)1/2,
we conclude that
|A(x(1),,x(m))|nmnm11/2(im2=1nmi1,,im3=1j1,,jm3=1nmai1i2(1)aj1j2(1)¯aim3im2(m3)ajm3im2(m3)¯yi1(1)yj1(1)¯yim3(m3)yjm3(m3)¯)1/2
and repeating this procedure we finally obtain
|A(x(1),,x(m))|nmnm112n212(i1=1nmyi1(1)yi1(1)¯)12=nm12nm12n212(i1=1n1|xi1(1)|2)12nm12(nm12n112).
Thus
Gn1nm(1)n1nmmax{n1,,nm}1.

The lower estimate is an adaptation of the bilinear case, using this well-know extension of inequality (2), in the case p=1, to multiple sums as follows:

(j1,,jm=1n1,,nm|aj1jm|2)1/2(2π)m(12π)n1++nm02π02π|j1,,jm=1n1,,nmaj1jmeitj1(1)eitjm(m)|dt,
where dt:=dt1(1)dtn1(1)dt1(m)dtnm(m).

ACKNOWLEDGMENTS

The authors thank Fernando Costa J\’unior for kindly designing and providing Figure 1. The authors also thank the referee for important comments that helped to improve the final version of this paper. D. Pellegrino is supported by Conselho Nacional de Desenvolvimento Científico e Tecnológico (CNPq) Grant 307327/2017-5 and Grant 2019/0014 Fundação de Apoio à Pesquisa do Estado da Paraíba (FAPESQ). J. Silva is supported by Coordenação de Aperfeiçoamento de Pessoal de Nível Superior (CAPES).

  • 2010 Mathematics Subject Classification. Primary 91A, 26D15.
  • ALBUQUERQUE N & REZENDE L. 2019. Asymptotic estimates for unimodular multilinear forms with small norms on sequence spaces. Bull Braz Math Soc New Series 52(2021): 23-39.
  • ALON N & SPENCER J. 1992. The Probabilistic Method, Wiley. (Second Edition, 2000, Third Edition 2008).
  • ARAÚJO G & PELLEGRINO D. 2019. A Gale-Berlekamp permutation-switching problem in higher dimensions. European J Combin 77: 17-30.
  • BENNETT G, GOODMAN V & NEWMAN CM. 1975. Norms of random matrices. Pacific J Math 59(2): 359-365.
  • BOHNENBLUST HF & HILLE E. 1931. On absolute convergence of Dirichlet series. Ann of Math 32: 600-622.
  • BRUALDI RA & MEYER SA. 2015. Gale-Berlekamp permutation-switching problem. European J Combin 44: pat A, 43-56.
  • CARLSON J & STOLARSKI D. 2004. The correct solution to Berlekamp’s switching game. Discrete Math 287: 145-150.
  • DIESTEL J, JARCHOW H & TONGE A. 1995. Absolutely summing operators, Cambridge Stud. Adv Math 43.
  • FISHBURN PC & SLOANE NJA. 1989. The solution to Berlekamp’s switching game. Discrete Math 74: 262-290.
  • KÖNIG H. 2014. On the best constants in the Khintchine inequality for Steinhaus variables. Israel J Math 203: 23-57.
  • PELLEGRINO D, SERRANO-RODRÍGUEZ D & SILVA J. 2020. On unimodular multilinear forms with small norms on sequence spaces. Lin Algebra Appl 595: 24-32.
  • ROTH RM & VISWANATHAN K. 2008. On the hardness of decoding the Gale-Berlekamp code. IEEE Trans. Inform Theory 54(3): 1050-1060.
  • SHAUZ U. 2011. Colorings and nowhere-zero flows of graphs in terms of Berlekamp’s switching game. Electron J Combin 18: no. 1, Paper 65, 33 pp.

Publication Dates

  • Publication in this collection
    08 May 2023
  • Date of issue
    2023

History

  • Received
    30 Apr 2020
  • Accepted
    26 Oct 2020
Academia Brasileira de Ciências Rua Anfilófio de Carvalho, 29, 3º andar, 20030-060 Rio de Janeiro RJ Brasil, Tel: +55 21 3907-8100 - Rio de Janeiro - RJ - Brazil
E-mail: aabc@abc.org.br