Discrete~athemati~ 74 (1989) 263-290 North-Holland 263 THEi SOLUTION TO BERLEKAMP’S SWITCHING GAlMEl Received 25 March1987 Revised 4 September 1987 ~er~ek~p’s game consists of a 10 zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIH X 10 arrayof ~~t-b~bs, with 100 switches at the back, one for each bulb, and 20 switches at the front that can complement any row or co&mn of bulbs. For any initial set S of bulbs turned on using the back switches, let f(S) be the minimal nmber of lights that can be achieved by throwing any ~m~mation of row and column switches. The problem is to find the maximum of f(S) over ah choices of S. We show that the answer is 34. We aho determine the solution for IZ x n arrays with 1 G rtG 9. 1. IntIuBduction Several recent papers have studied the covering radius of codes [l--IS]. ~thou~ a number of constructions for codes with low covering radius are zyxwvutsrqpo DOW known, it seems fair to say that the general principles which ensure that a code has low covering radius are not at all well understood. In order for a binary linear code of length N to have covering radius R, for every binary Wtuple x there must be a codeword within Hamming distance zyxwvutsrqponm R of x (and ~~he~ore some x must be at exactly Hamming distance R from the closest codeword). In other words the codewords must esciently ‘cover’ the space of all binary Wtuples. Equiv~ently, a code C has covering radius R if, given any IV-tuple x, it is possible to reduce the Hamming weight of x to at most R by adding to x a sequence of generating codewords for C. One obvious construction is to take N to be a composite number, say Iv = mn, so that codewords can be represented by m x n rectangle arrays of o’s and l’s, and to take as generating codewords all single rows and columns of the array. This ~nst~ction at least has the appearance of dist~but~g the codewords uniformly over the space. The resulting “light-bulb’ codes (the name is explained below) have been the subject of several investigations [2,6,7,11,12]. When N = n2 is a perfect square, it is known that this code (of length n* and dimension 2n - 1) has covering radius R, satisfying ~12-365X/89/$3.50 @ 19g9, Etsevier science Publishers B.V. (Noah-Roland)