Graphs and Combinatorics - Springer Link

0 downloads 0 Views 350KB Size Report
We show that any starting configuration in a graph with no isolated vertices can, by ... whose elements have nonnegative weights. For the σ-game, .... orbits in the regular σ-game: one with three configurations of weight 1 and one of weight 3, and ..... clearly forms an m × n nullspace matrix which we denote Ni . So {N1, N2,...
Graphs and Combinatorics (2009) 25:309–326 Digital Object Identifier (DOI) 10.1007/s00373-009-0841-0

Graphs and Combinatorics © Springer-Verlag 2009

Maximum Orbit Weights in the σ-game and Lit-only σ-game on Grids and Graphs John L. Goldwasser1 , William F. Klostermeyer2 1 Department of Mathematics, West Virginia University, WV 26506 Morgantown.

e-mail: [email protected]

2 School of Computing, University of North Florida, FL 32224-2669 Jacksonville.

e-mail: [email protected]

Abstract. Let G be a graph in which each vertex can be in one of two states: on or off. In the σ -game, when you “push” a vertex v you change the state of all of its neighbors, while in the σ + -game you change the state of v as well. Given a starting configuration of on vertices, the object of both games is to reduce it, by a sequence of pushes, to the smallest possible number of on vertices. We show that any starting configuration in a graph with no isolated vertices can, by a sequence of pushes, be reduced to at most half on, and we characterize those graphs for which you cannot do better. The proofs use techniques from coding theory. In the lit-only versions of these two games, you can only push vertices which are on. We obtain some results on the minimum number of on vertices one can obtain in grid graphs in the regular and lit-only versions of both games. Key words. Lights out, σ -game, maximum orbit weight.

1. Introduction and Background Let G = (V, E) be a finite, simple, undirected graph with V = {v1 .v2 , . . . , vn }. Each vertex can be “on” (we often say “lit”) or “off”. A configuration of G is the set of → lit vertices. The configuration vector, − x = [x1 , x2 , . . . , xn ], of a configuration is its characteristic vector, so xi = 1 if vi is on and xi = 0 if vi is off. In the σ -game, introduced by Sutner [12], given a configuration T , we can make a move at vi (also called toggling vi or pushing vi or switching vi ) by changing the state of all vertices in G adjacent to vi , i.e., changing the state of all vertices in the open neighborhood of vi , N (vi ). We say a configuration T can be transformed to a configuration R if R can be reached from T by a sequence of moves. The object of the σ -game is to transform a given configuration to one with the minimum possible number of on vertices. In a sense, the σ -game resembles other graph problems in which one tries to minimize or maximize some objective function over a set of initial configurations, such as graph pebbling [13]. In the closed neighborhood version of the σ -game, as inspired by the electronic game “Lights Out!”, pushing a vertex vi changes the state of vi and the state of each of vi ’s neighbors. That is, pushing vi changes the state of all vertices in vi ’s closed

310

J. L. Goldwasser, W. F. Klostermeyer

neighborhood, N [vi ]. We call this model the closed switching game or the σ + -game. Most of the previous papers on the subject, see for example [1–9] are concerned with the σ + -game, whereas [10] studies the σ -game. For example, Sutner [12] and many others have used linear algebra to show that in the σ + -game, the all-on configuration in any graph can be transformed to the all-off configuration. A graph-theoretic proof of this was given in [3]. A variation of the σ -game called the lit-only σ -game was recently studied by Wang and Wu in [14]. This variation allows only vertices in the “on” state to be pushed. (To be clear, we sometimes refer to the σ -game in which we can push any vertex as the regular σ -game). A fourth game is the lit-only σ + -game where we use closed neighborhood switching, but can toggle only on vertices. If R and T are configurations in a graph G we define the relation ∼ in the σ -game by R ∼ T if and only if R can be transformed to T . Such a relation can be defined in the other three games (σ + -game and the lit-only versions of each) as well. It is easy to see that this relation is an equivalence relation in all but the lit-only σ + -game (where it is not symmetric because, for example, you can go from all-on to some other configuration R, but you clearly cannot reach all-on from R because there can be no last move). The equivalence classes induced by these equivalence relations can be thought of as orbits of a permutation group P acting on a set S whose elements have nonnegative weights. For the σ -game, S is the set of configuration vectors on G. Let α1 , α2 , . . . , αn be the row-vectors of the adjacency matrix A(G) of G with vertex ordering v1, v2, . . . , vn . → → → → y =− x + αi If − y is the configuration vector obtained from − x by toggling vi , then − n where the addition is in the vector space G F(2) . The set of all configuration vectors → → which can be reached from − x is − x + H (G), where H (G) is the rowspace of A(G) (over G F(2)). Thus the permutation group P acting on S is isomorphic to H (G), → → → and the orbit of − x is θ (− x)=− x + H (G). Since the orbits are just the cosets of H (G), each has size |H (G)|. → → The weight w(− x ) is the number of 1’s in − x (the Hamming weight) and the weight − → − → − → − → → → w(θ ( x )) of θ ( x ) is defined by w(θ ( x )) = min− y ∈θ(− x ) {w( y )}. The weight of a configuration is its cardinality (so is equal to the weight of the corresponding con− → → figuration vector). The maximum orbit weight of G is W (G) = maxall − x {w(θ ( x ))}. Note that W (G) is the covering radius of the linear code H (G). The permutation group acting on S in the σ + -game is isomorphic to the row→ space of A(G)+ In . We define the closed neighborhood weight of the orbit θ (− x ) and → of a graph G as we did above for the σ -game with respective notations wC(θ (− x )) − → and W C(G). We sometimes write, for instance, wC(θG ( x )) to make it clear we → mean the orbit of − x in graph G. So W (G) = 0 if and only if A(G) is non-singular while W C(G) = 0 if and only if A(G) + In is non-singular (since in each case there is only one orbit). → → In the lit-only σ -game, we can define the weight w(L(θ (− x ))) of the orbit of − x − → (minimum weight of a configuration vector in the lit-only orbit of x ) and the weight W L(G) of a graph G (maximum weight of a lit-only orbit) analogously. The orbit partition in the lit-only σ -game is clearly a refinement of that in the σ -game. For example, let K be the graph with six vertices obtained by attaching a pendant edge to each vertex of a complete graph on three vertices. Since A(K ) is non-singular

σ -game and Lit-only σ -game on Grids and Graphs

311

there is only one orbit in the regular σ -game, so W (K ) = 0. In the lit-only σ -game, − → → however, there are four orbits: one of size 1 (just − x = 0 ), one of size 7 which has weight 1, one of size 21 which has weight 1, and one of size 35 which has weight 2 (this follows from a theorem in [16] since K is a line-graph). Hence W L(K ) = 2. The lit-only σ -game can also be thought of as a permutation group P acting on the set S of configuration vectors (with Hamming weight), but the group action is quite different and can be fairly complicated even for small graphs. For each i ∈ {1, 2, . . . n}, let Bi be the matrix obtained by adding αi to the i th row of the → → → → x is a configuration vector, then − y =− x Bi is equal to − x if identity matrix In . If − − → xi = 0 (so vi cannot be toggled) and is equal to x +αi if xi = 1 (vi is toggled). So the permutation group P acting on S for the lit-only σ -game is isomorphic to the subgroup of G L(n, G F(2)) generated by {B1 , B2 , . . . , Bn }. This is a non-abelian group which induces orbits of nonuniform size (the zero vector is in an orbit of size 1). For example, the graph K 3 (i.e., the complete graph on three vertices) has two orbits in the regular σ -game: one with three configurations of weight 1 and one of weight 3, and one with three configurations of weight 2 and one of weight 0. The − → only difference in the lit-only σ -game partition is that { 0 } is an orbit of size 1 (so there is also a size 3 orbit of weight 2). In the group action we have: ⎛ ⎞ ⎛ ⎞ ⎛ ⎞ 1 1 1 1 0 0 1 0 0 B1 = ⎝ 0 1 0 ⎠ B2 = ⎝ 1 1 1 ⎠ B3 = ⎝ 0 1 0 ⎠ 0 0 1 0 0 1 1 1 1 and the subgroup, Q, of G L(3, G F(2)) generated by these three matrices is a group of order 24 which turns out to be isomorphic to S4 , the symmetric group on 4 symbols (of the 168 3 × 3 matrices which are invertible over G F(2), Q consists of the six permutation matrices and the 18 matrices which have one row with three 1’s and two rows with one 1, but no column with three 1’s). In the following example we start with [100]. Applying B1 means toggle vertex v1 if it is on (it is), then applying B2 means toggle v2 if it on (it will be), then applying B1 again means toggle v1 if it is on (it will not be), resulting in [010]. In Q we get: ⎛ ⎞ 0 1 0 [100](B1 )(B2 )(B1 ) = [100] ⎝ 1 0 0 ⎠ 0 0 1 which is equal to [010], i.e., only v2 is on. For larger graphs it is difficult to determine the structure of the permutation group P which acts on S in the lit-only σ -game (beyond finding a list of generators), and even if one can determine the structure of the group, it seems to shed little light on the structure of the orbits. In the absence of the coset structure, the maximum orbit weight problem seems to be considerably more difficult in the lit-only σ -game. We already noted that “can be transformed to" is not a symmetric relation under lit-only closed neighborhood switching. We can try to define a lit-only group action in the σ + -game in the same way as in the lit-only σ -game. If Ci is equal to In plus the i th row of A(G) + In , then Ci is not invertible (though {C1 , C2 , . . . , Cn } does still generate the set of transformations), so we do not get a group.

312

J. L. Goldwasser, W. F. Klostermeyer

Sutner’s theorem that the all-on configuration can be transformed to all-off in the − → − → σ + -game can be restated as wC(θ ( 1 )) = 0 in any graph, where 1 is the all 1’s vector. It follows immediately that each configuration vector and its (0, 1)-complement are in the same orbit with closed-neighborhood toggling, so W C(G) ≤ n2 and it is easy to show that W (G) ≤ n2 . In this paper, we prove a lemma about weights in linear codes and use it to find all graphs for which equality holds in these two inequalities. Wang and Wu proved that if T is a tree with  leaves, then W (T ) ≤  2  [15] and W L(T ) ≤  2  [14], confirming a conjecture of G. Chang [4]. This conjecture was motivated by questions asked by Chuah and Hu [5] in which lit-only toggling on some special trees called Vogan diagrams is used for the classification of Lie Algebras. Wang and Wu found examples to show the two above inequalities are sharp and noted the difficulty of determining W L(G) for a general graph G. Wu [16] found connections between the edge isoperimetric number of a graph G and W L(L(G)) where L(G) is the line-graph of G. He was also able to determine the size of each orbit in the lit-only σ -game on a line graph. In this paper, we find an upper bound for W L(G) in terms of the independence number of G. Goldwasser, Wang, and Wu [11] recently showed that the lit-only restriction makes almost no difference in the σ + - game, but can make a big difference in the σ -game. They obtained the two following results. Theorem 1 [11]. Let B = ∅ and C = V (G) be configurations in a connected graph G. Then B can be transformed to C in the lit-only σ + -game if and only if it can be in the σ + -game. Theorem 2 [11]. Let G be a graph such that A(G) is non-singular, let B be a configuration in G and let v be a vertex of G not in B. Let C be the configuration obtained from B by toggling v in the σ -game. Then B cannot be transformed to C in the lit-only σ -game. → Due to Theorem 1, we can define the weight wLC(θ (− x )) of an orbit and the + weight W LC(G) of a graph in the lit-only σ -game as in the three other games and → → → wLC(θ (− x )) = wC(θ (− x )) for all − x and wLC(G) = wC(G) for all graphs G. Let G m,n denote the m × n grid graph. Goldwasser, Klostermeyer, and Trapp [7] used Fibonacci polynomials to determine the number of orbits in the σ + -game on G m,n for each (m, n). In particular, they found all (m, n) such that W C(G m,n ) = 0 (so there is only one orbit). Goldwasser and Klostermeyer proved the following. Theorem 3 [8]. If n ≤ m, W C(G m,n ) ≤  n2 . Furthermore, for each positive integer t and each positive real number , there exist positive integers m and n with t < n ≤ m such that W C(G m,n ) ≥ (1 − ) logn n . 2

σ -game and Lit-only σ -game on Grids and Graphs

313

By Theorem 1, these results hold for the lit-only σ + -game as well. In this paper we determine the value of W (G m,n ) for each (m, n), find an upper bound for W L(G m,n ), and determine the precise value of W L(G m,2 ). 2. Results 2.1. Upper Bound for W (G) and W C(G) As we mentioned before, the inequality W C(G) ≤ n2 follows immediately from the fact that the all-on configuration can be transformed to the all-off configuration in the closed switching game. We will now show that the same bound holds in the regular σ -game and will characterize equality for both. Lemma 4. If G is any graph of order n with no isolated vertices, then the average weight in all the configuration vectors in any orbit of G in the σ -game or the σ + -game is n2 . Proof. Since G has no isolated vertices, no column of A(G) is all 0’s, so for each coordinate, precisely half of the vectors in the rowspace H (G) of A(G) have a 1 and → → half have a 0. Hence this is also true for the vectors in − x + H (G), where − x is any configuration vector, completing the proof for the regular σ -game. The same proof works for the σ + -game, except now we do not need to assume G has no isolated  vertices since no column of A(G) + In can ever be all 0’s. Let H be a graph with V (H ) = {v1 , v2 , . . . , vm }. We define the doubling of H to be the graph G with V (G) = {v1 , v2 , . . . , vm , u 1 , u 2 , . . . , u m } and for all i = j, [u i , v j ], [vi , v j ], [u i , u j ] are in E(G) if and only if [vi , v j ] is in E(H ) (so G has twice as many vertices and four times as many edges as H ). The closed doubling of H is obtained from the doubling of H by adding the edges [u i , vi ], for i = 1, 2, . . . , m. Let H be any graph with n/2 vertices for some even integer n and let G be the doubling of H . The configuration consisting of all vertices of G that were original vertices in H (and not any “new” vertices) is clearly in an orbit of weight n2 , since after any sequence of toggles, precisely one of each pair {u i , vi } is on. To show this is the only way to get W (G) = n2 , we will need the following lemma, which is really a result about weights in linear codes. Lemma 5. Let C and D be m × r binary matrices. Let α1 , α2 , . . . , αm be therows of C and β1 , β2 , . . . , βm be the rows of D. If for each subset S of {1, 2, . . . , m} wt i∈S αi = wt i∈S βi (Hamming weight of sums in G F(2)r ), then the columns of D can be permuted to get a matrix D such that C = D . → → → x ) and b(− x ) be the number of column Proof. For each − x = 0 in G F(2)m let a(− − → vectors in C and D, respectively, that are equal to x . If S is any nonempty subset → of {1, 2, . . . , m}, let f (S) denote the set of all − x = (x1 , x2 , . . . , xm ) ∈ G F(2)m such that t∈S xt is odd. Thus

314

J. L. Goldwasser, W. F. Klostermeyer

 − → x ∈ f (S)

      − → a( x ) = wt αi = wt βi = i∈S

i∈S

 − → x ∈ f (S)

→ b(− x)

for each nonempty subset S of {1, 2, . . . , m}.  − → → → → → If we let c(− x ) = a(− x ) − b(− x ), then − x ∈ f (S) c( x ) = 0 for each nonempty subset S of {1, 2, . . . , m}. We regard this as a linear system (over the reals) of 2m − 1 − → → → equations (one for each S) in the 2m − 1 unknowns {c(− x):− x = 0 }. Each row of the coefficient matrix D has 2m−1 1’s and 2m−1 − 1 0’s and any pair of rows in D has precisely 2m−2 positions where both entries are 1. Hence D D t has all entries on the main diagonal equal to 2m−1 and all off-diagonal entries equal to 2m−2 . It is easy to show such a matrix is nonsingular, so D is as well (over the reals). That means → → our homogeneous system has only the trivial solution, so a(− x ) = b(− x ) for each − → x = 0. That means the columns of D can be permuted to get C.  We can now state one of our main results. Theorem 6. Let G be any graph of order n with no isolated vertices. Then W (G) ≤ n2 with equality holding if and only if G is the doubling of some graph H with n2 vertices. Proof. It follows immediately from Lemma 4 that W (G) ≤ n2 , and we have already seen that W (G) = n2 if G is the doubling of some graph. It remains to show that if W (G) = n2 then G is the doubling of some graph. Suppose G is a graph with no isolated vertices such that W (G) = n2 . By Lemma 4, G has an orbit where every configuration vector has weight n2 . Let {v1 , v2 , . . . , vn/2 } be a configuration in that orbit and consider an adjacency matrix A(G) for G with vertex ordering v1 , v2 , . . . , vn . Let C and D be the n × n2 matrices formed by the first n2 columns and last n2 columns of A(G) respectively. Let n be the α1 , α2 , . . . , α rows of C and β1 , β2 , . . . , βn be the rows of D. Then wt i∈S αi = wt i∈S βi (Hamming weight sums in G F(2)n/2 ) for each nonempty set S of {1, 2, . . . , n} since after any sequence of pushes, there are precisely n2 on vertices. Hence by Lemma 5, the columns of D can be permuted to get a matrix D such that C = D . If A(G) has block form

E F t F K where E, F and K have order n2 then there exists a permutation matrix P such that E = F P and F t = K P. If we do this permutation on the rows and columns of A(G), we get the matrix

E Pt Ft

FP Pt K P



where F P = E, P t F t = (F P)t = E t = E and P t K P = P t F t = (F P)t ) = E, so G is the doubling of a graph H which has adjacency matrix E. 

σ -game and Lit-only σ -game on Grids and Graphs

315

The same proof can be used for the closed switching game except we use the matrix A(G) + In instead (so we do not need to assume that G has no isolated vertices). That means that if A(G) + In = then the last

n 2

rows and last

n 2

E Ft

F K



columns can be permuted to get the matrix

E E

E E



which means G is the closed doubling of a graph H such that A(H ) = E + In/2 . That gives us the following. Theorem 7. Let G be any graph of order n. Then W C(G) ≤ n2 with equality holding if and only if G is the closed doubling of some graph H with n2 vertices. 2.2. Upper Bound for W L(G) Little is known about the value of W L(G), except for line graphs [16] and a few special graphs G. The work of Wang and Wu mentioned in the introduction suggests that the difference between W (T ) and W L(T ) is small if T is a tree, though there are no specific results. Conjecture 1. If G is a graph of order n with no isolated vertices, then W L(G) ≤  2n 3 . It is not difficult to see that equality holds for Conjecture 1 if G is a complete tripartite graph with an equal number of vertices in each part. To get an upper bound for W L(G) in terms of the independence number of G, we will need the following lemma, which like Lemma 5, is really a result about weights in linear codes. Lemma 8. Let C = {α1 , α2 , . . . , αm } be a set of vectors in G F(2) p and in G F(2)r such D = {β1 , β2 , . . . , βm } be a set of vectors  that no coordinate is 0 for every αi ∈ C or for every βi ∈ D. If wt i∈S αi ≤ wt i∈S βi (Hamming weight of the sums in G F(2) p and G F(2)r ) for each subset S of {1, 2, . . . , n} then p ≤ r . If equality holds in the weight inequalities for each S, then p = r . Proof. Let F and G be the 2n × p and 2m × r matrices whose rows are the various linear combinations over G F(2) p and G F(2)r of the vectors in C and D, respectively. Since each column of F and G is precisely half 1’s, the total number of 1’s in F is p · 2m−1 and in G is r · 2m−1 . By the weight inequalities, each row of G has at least as many 1’s as the corresponding row in F, so p ≤ r . If equality holds for each  S, then p · 2m−1 = r · 2m−1 and p = r .

316

J. L. Goldwasser, W. F. Klostermeyer

Theorem 9. If G is a graph of order n and independence number t, then W L(G) ≤  n+t 2 . Proof. Suppose G has independence number t and that U ⊆ V (G) is a set of on vertices of minimum weight in its orbit such that W L(G) = |U |. Let M be a maximal independent set in the subgraph G[U ] induced by U . Let H = {v ∈ V (G)\M : v is not adjacent to any vertex in M}, let P = {v ∈ V (G)\M : v is adjacent to some vertex in M and v is on}, let R = {v ∈ V (G)\M : v is adjacent to some vertex in M and v is off} and let |M| = m, |H | = h, |P| = p, |R| = r . Note that {M, H, P, R} is a partition of V (G). Let C be the m × p submatrix if A(G) obtained by taking the rows of vertices in M and the columns of vertices in P, and let D be the m × r submatrix of A(G) with rows of vertices in M and columns of vertices in R. Each column of C and D has at least one 1. Let α1 , α2 , . . . , αm be the rows of C and β1 , β2 , . . . , βm be the rows of D. Since M is a maximal independent set in G[u], every vertex in H is off. We can toggle any subset of the vertices in M and the total number of on vertices does not  decrease. That means wt i∈S αi ≤ wt i∈S βi for each subset S of {1, 2, . . . , m} so p ≤ r by Lemma 8. Hence 2 p ≤ p + r = n − m − h ≤ n − m and p ≤ n−m 2 . Thus n+t ≤ .  the number of on vertices is m + p ≤ n+m 2 2 Note that Theorem 9 shows that the inequality W L(G) ≤  2n 3  of Conjecture 1 holds if the independence number of G is at most n3 . We remark that the inequality in Theorem 9 is sharp if n or n +1 is an odd multiple of t. If tq equals n or n +1 where q is odd, then the complete q-partite graph having an equal number of vertices in q+1 each part has independence number t and lit-only weight  n+t 2  ( 2 parts all on and q−1 2 parts all off). In the absence of a proof for W L(G) ≤  2n 3  when the independence number of G is greater than n3 , the best we have is the following, whose proof appears in Section 4.1. √ Theorem 10. Let G be a graph with no isolated vertices. Then W L(G) ≤ n −  n. − → − → Sutner’s theorem that wC(θ ( 1 )) = 0 in any graph G (where 1 is the all-ones − → vector) does not have an analog for regular switching. For example, w(θ K 2 ( 1 )) = 1. − → − → Sharp upper bounds for w(θG ( 1 )) and wL(θG ( 1 )) are not known. − → Conjecture 2. For every graph G with no isolated vertices, wL(θ ( 1 )) ≤ n2 . − → If true, this bound is sharp because wL θ K n , n ( 1 ) = 2 2

n 2.

We can show the

inequality in Conjecture 2 holds for graphs with fixed independence number and a very large number of vertices.

σ -game and Lit-only σ -game on Grids and Graphs

317

Proposition Let G be a graph with n vertices and independence number t. If n > t·2t 11. − → n then wL θG ( 1 ) < 2 . Proof. Let T be an independent set of vertices of size t and consider the (2t − 1) × (n − t) matrix B whose rows are all possible non-trivial combinations of the t × (n − t) submatrix of A(G) with rows from T and columns from V (G)\T . Since T is a maximal independent set, no column of B is all 0’s. That means each column t−1 has precisely 2t−1 1’s. So some row of B has at least 22t −1 · (n − t) 1 s. If we toggle the vertices whose linear combinations give us this row, the number of on vertices will be at most t+

n n − t · 2t 2t−1 − 1 · (n − t) = − t+1 t 2 −1 2 2 −2

and the result follows.



2.3. Regular σ -game in Grid Graphs A set D of vertices in a graph G is an even open dominating set for G if |N (v) ∩ D| → is even for each v ∈ V (G). The nullspace of A(G) is just the set of all − x in G F(2)n that are characteristic vectors of an even open dominating set. We say the m × n (0, 1)-matrix B = [bi j ] is a nullspace matrix if {(i, j) : bi j = 1} is the set of positions of an even open dominating set in the grid graph G m,n . Clearly, there is at most one nullspace matrix having a given first row (since the second row of such is uniquely determined by the first and so on), and the set of all first rows of m × n nullspace matrices is a subspace of G F(2)n . Goldwasser and Klostermeyer proved the following. Theorem 12 [10]. The number of nullspace matrices of G m,n is 2d where d + 1 = gcd(m + 1, n + 1). We now focus on obtaining orbit weight results for square grids because Theorem 12 will enable us to extend them to non-square grids as well. By Theorem 12, there are 2n nullspace matrices for G n,n , so every binary n-vector is the first row of an n × n nullspace matrix. For each i ∈ {1, 2, . . . , n}, let Mi be the (unique) nullspace matrix with a 1 in the first row in column i (and all other entries in the first row equal to 0). We say {M1 , M2 , . . . , Mn } is the standard basis for the vector space of n × n nullspace matrices over G F(2). We illustrate some Mi matrices for n = 8 in Tables 1, 2, and 3. For each n × n (0, 1)-matrix C we define the trace vector of C, denoted χ (C), by χ (C) = [C1 , C2 , . . . , Cn ] where Ci is the modulo 2 number of positions in C and Mi that are both equal to 1. We identify each n × n(0, 1)-matrix C with the configuration it represents on G n,n and thus we can talk about toggling the elements of C, the orbit containing C, and the weight of the orbit containing C (the minimum number of 1’s in any matrix obtainable from C by a sequence of toggles). Clearly χ (C) = χ (C ) if C and C are in the same orbit. Since there are 2n different orbits and 2n different trace vectors, it follows that χ (C) = χ (C ) if and only

318

J. L. Goldwasser, W. F. Klostermeyer Table 1. M1 with n = 8

Table 2. M2 with n = 8

Table 3. M3 with n = 8

if C and C are in the same orbit. Thus we can define the trace vector of an orbit to be the trace vector of any of the matrices in the orbit. Note that one matrix in the → → orbit with trace vector − v is the matrix with first row − v and all other entries equal to 0. → → v (odd) to be the  n2 -vector Given any n-vector − v = [v1 , . . . , vn ], we define − − → n [v1 , v3 , . . .] and v (even) to be the  2 -vector [v2 , v4 , . . .]. → We say the number of 0 to 1 transitions in the binary vector − v = (v1 , . . . , vn ) is |{i : vi−1 = 0 and vi = 1 where we assume v0 = 0}|. → Theorem 13. If − v is the trace vector for an n × n matrix C then the weight of the orbit → of C in the regular σ -game is the sum of the numbers of 0 to 1 transitions in − v (odd) − → and v (even). The proof of Theorem 13, which depends on the intersections of the positions of the 1’s in M1 , M2 , . . . , Mn appears in Section 4.2, along with a simple procedure

σ -game and Lit-only σ -game on Grids and Graphs

319

for finding a minimum weight matrix in each orbit, and the generating function for the number of orbits of each weight. → → For example, if − v = [10001110100101101] then − v (odd) = [101110011], − → v (even) = [00100110] and the weight of the orbit is 3 + 2 = 5. The n-vector − → v = [11001100 . . .] clearly results in the maximum possible orbit weight for n × n matrices, so we get the following result. Theorem 14. The maximum weight of an orbit (for the regular σ -game) for an n × n matrix is n2 + 1 if n ≡ 2(mod 4) and  n2  otherwise. Theorem 13 and Theorem 14 are easily extendible to non-square grids. Let m and n be non-coprime positive integers, let d + 1 = gcd(m + 1, n + 1), and let {M1 , M2 , . . . , Md } be the standard basis for the space of d × d nullspace matrices. We can construct a basis for the space of all m × n nullspace matrices as follows. Put the d × d matrix Mi in the top left corner for some i ∈ {1, 2, . . . , d}. Put a column of 0’s to its right and then put Md+1−i in rows 1 through d and columns d + 2 through 2d + 1. Then put a columns of 0’s to its right and then put Mi in rows 1 through n+1 d × d matrices with d and columns 2d + 3 through 3d + 2. And so on until d+1 separating columns of 0’s fill in the first d rows. Then do the same thing, starting with Md+i−i across rows d + 2 through 2d + 1. Keep going until you end up with n+1 a m+1 d+1 × d+1 checkerboard pattern of alternating Mi and Md+1−i matrices which clearly forms an m × n nullspace matrix which we denote Ni . So {N1 , N2 , . . . , Nd } is a set of d linearly independent m × n nullspace matrices which, by Theorem 12 is a basis for the space of all m × n nullspace matrices. We can define the length d trace vector of the m × n matrix C as before (parity of intersection of 1’s of C with 1’s of N1 , N2 , . . . , Nd ). Note that each orbit contains precisely one matrix that has 0’s in all positions except the first d positions of the first row, and that the binary d-vector in those positions in that matrix is the trace vector of that orbit. Thus we get the following extension of Theorem 13 and Theorem 14 to non-square matrices. Theorem 15. Let C be an m × n matrix where m and n are not coprime, let d + 1 = → gcd(m + 1, n + 1), and let − v be the d-vector which is the trace vector of C (in the standard basis {N1 , N2 , . . . , Nd } for the space of m × n nullspace matrices). Then the weight of the orbit of C in the regular σ -game is the sum of the number of 0 to 1 tran→ → sitions in − v (odd) and − v (even). The maximum weight of an orbit of m × n matrices d is 2 + 1 if d ≡ 2(mod 4) and  d2  otherwise, the weight of the orbit with trace vector [11001100 . . .]. A simple procedure for finding a canonical minimum weight matrix in each orbit is described in section 4.2. 2.4. Lit-only σ -game in Grid Graphs To determine the structure of the orbits for grid graphs in the lit-only σ -game seems to be difficult. The following easily obtainable inequality is the best we have done, but we have no reason to think it is sharp.

320

J. L. Goldwasser, W. F. Klostermeyer

Theorem 16. W L(G m,n ) ≤ min{m, n}. Proof. As before, we use m × n matrices to represent configurations of lit vertices in G m,n (1 for on, 0 for off), so we can talk about the weight of the orbit of a matrix. Assume m ≥ n and that A is an m × n matrix with more than n 1’s. Let i be minimal such that the i th row of A is not all 0’s. If there is a column j with more than one 1 which has a 1 in position (i, j), let k be the row number of the second “highest” 1 in column j. The sequence of pushes (k, j), (k − 1, j), . . . , (i + 1, j) brings the highest 1 in column j down one level. If each column with a 1 in row i has only one 1, say one such column is the j th , let r be an integer greater than or equal to i + 2 such that there is a 1 in position (r, t), but no 1’s in the r th row between positions (r, t) and (r, j). Such an r exists because some column has at least two 1’s, and neither is in the i th row. Say t > j. Now the sequence of pushes (r, t), (r, t − 1), . . . , (r, j + 1) creates a 1 in position (r, j) and we proceed as before to bring the highest 1 in column j down one level without creating any new 1’s in the i th row. Continuing this process results in a matrix with at most one 1 in each column.  In the regular σ -game, by Theorem 15, W (G m,2 ) is equal to 0 if m ≡ 2(mod 3) and to 2 if m ≡ 2( mod 3) (the two elements in the first row on has minimum weight in its orbit). Theorem 17. W L(G m,2 ) is equal to two if m ≡ 2(mod 3) and is equal to one otherwise. The proof of Theorem 17 is in Section 4.3. 3. Proofs 3.1. Proof of Theorem 10 Proof. Let G = (V, E) be a graph with n vertices and no isolated vertices. Push vertices in G so that as many vertices are in the off state as possible. Let A ⊆ V consist of those vertices in the on state and √ B ⊆ V consist of those vertices in the off state. To the contrary, suppose |B| <  n. Note that for each vertex w ∈ A, w must have at least as many neighbors in B as in A, else pushing w would increase the number of off vertices in G. This implies each vertex in A has at least one neighbor in B. We assume |B| > 1, else the theorem is easy to prove; so n ≥ 9. For a vertex v ∈ B and a set X ⊆ V , let N X (v) denote N (v) ∩ X . √ We assume that the independence number of G greater than n−2 n, otherwise Theorem 9 applies. Let I be a maximum independent set in G and A1 = A ∩ I . Since each vertex in A has at in B, at least√one vertex in B is not √ in I . √ least one neighbor √ Hence |A1 | ≥ n − 2 n + 1 − (√ n − 2) = n − 3 n + 3, since |B|√<  n. If some vertex v ∈ B has at least  n neighbors in A1 , i.e., |N A1 (v)| √ ≥  n, then pushing such a neighbor in A1 first followed by v creates at least  n off vertices in A1 .

σ -game and Lit-only σ -game on Grids and Graphs

321

√ If there exists a vertex v ∈ B such that |N A√1 (v)| =  n − 1, push a neighbor of v in A1 then push v. If there are not√at least  n off √ vertices, it must be√that all the n) + 3) − (( n) − 1) = n − 4( n) + 4 ≥ vertices in B are on. Since (n − 3( √ / N A1 (v) that can be pushed to (( n) − 2)2 , there must be a vertex w ∈ A1 , w ∈ create at least one off vertex in B. √ Finally, suppose there is no vertex v ∈ B such that √ |N A1 (v)| ≥√ n − 1. Then the total number of edges from B to A1 is at most (( n) − 2)(( n) − 1) < |A1 |,  which is impossible since each vertex in A1 is adjacent to some vertex in B. 3.2. Proofs for Regular σ -game on Grid Graphs We regard the matrices M1 , M2 , . . . , Mn as characteristic vectors for subsets of a set T of size n 2 , For each i, let Di be the subset of T with characteristic vector Mi . An examination of the matrix sequences M1 , M3 , M5 , . . . and M2 , M4 , M6 , . . . reveals the two following nesting properties: Nesting Property (1) If t is any element of T , the set of all Di in the sequence D1 , D3 , D5 , . . . that contain t are consecutive in the sequence. The same is true for D2 , D4 , D6 , . . .. Nesting Property (2) Given the consecutive sets D j , D j+2 , D j+4 , . . . , D j+2k , the element represented by position (k + 1, k + j) is in all these Di ’s, but in no others, for all j > 0 and k ≥ 0 such that j + 2k ≤ n. → → → v2 , . . . , − vk be (0, 1) n-vectors each of which has one 0 to 1 tranLemma 18. Let − v1 , − sition. Then their sum (over G F(2)n ) has at most k 0 to 1 transitions. We omit the easy proof of Lemma 18 by induction. Proof of Theorem 13. Let W be the set of all positions (i, j) in C where i + j is even (that is, the white squares of a chess board) and B be the set of all positions (i, j) in C where i + j is odd (that is, the black squares of a chess board). Suppose the → → number of 0 to 1 transitions in − v (odd) and − v (even) are r and s, respectively. If C has 1’s in precisely q positions in W where q < r , then by the Nesting → Property (1) and Lemma 18, − v (odd) could have at most q 0 to 1 transitions, a contradiction. So C has 1’s in at least r positions in W and at least s positions in B. That means wL(C) ≥ r + s. But by Nesting Property (2), there is a matrix in the orbit of C that has weight → r + s. To see this, we consider again the example where − v (odd) = [101110011] and − → v (even) = [00100110], so r = 3 and s = 2. By Nesting Property (2), the matrix with 1’s in positions (1, 1)(k = 0, j = 1), (3, 7)(k = 2, j = 5), (2, 16)(k = 1, j = 15), (1, 6)(k = 0, j = 6) and (2, 13)(k = 1, j = 12) and 0’s elsewhere is in the same orbit as C and has weight 5.  It is not hard to find a sequence of pushes that transforms a matrix with 1’s only in the first row to one with minimum weight in its orbit. To see how each maximal string

322

J. L. Goldwasser, W. F. Klostermeyer

→ → of 1’s in − v (odd) and − v (even) can be reduced to a single 1 consider, for example, − → v (odd) = [01111001110]. Moves at positions (1, 4), (1, 6), (1, 8), (2, 5), (2, 7), (3, 6) transform the string of four 1’s to a 1 in position (4, 6), while moves at positions (1, 16), (1, 18), (2, 17) transform the string of three 1’s to a 1 in position (3, 17) (both as promised in Nesting Property (2)). This same procedure works to find a canonical representative of minimum weight in each orbit on G m,n by using the top left d ×d submatrix, where d +1 = gcd(m +1, n + 1), as in the discussion preceding Theorem 15. Lemma

n+1 19. The number nof binary n-vectors that have precisely i 0 to 1 transitions is 2i for i = 0, 1, . . . ,  2 . Proof. The

 number of (0, 1) n-vectors that have precisely j 0 to 1 or 1 to 0 transitions is nj (choose j of the n symbols to be different than its predecessor). Since the first  n  is from

0 to 1, the number of n-vectors that have i 0 to 1 transitions

transition = n+1  is 2in + 2i−1 2i . We can use Theorem 13 and Lemma 19 to get the generating function for the number of orbits of weight i. Theorem 20. The generating function for the number of orbits of weight i in the regular σ -game on G n,n is ⎞⎛ ⎞ ⎛    n  + 1   n  + 1 2 2 ⎝ xi ⎠ ⎝ xi ⎠ . 2i 2i i≥0

i≥0

When n is even, this reduces to g(x) =



n +1 i 2 2 and, with some diffii≥0 2i x

culty, it can be shown that the coefficient of x i in g(x) is   n+2   1 n+2 i 2 + (−1) . 2 2i i This is the number of subsets of size 2i of an ordered set S of size n + 2 where you must choose an even number of elements from the first half of S and an even number from the second half. 3.3. Proof for Lit-only on m × 2 Grids Proof of Theorem 17. If m ≡ 2(mod 3) then W (G m,2 ) = 2 (see Theorem 15) and W L(G m,2 ) ≤ 2 (see Theorem 16), so W L(G m,2 ) = 2. Now suppose m ≡ 2( mod 3). Denote the left column as A and the right column as B and the elements of each column will be denoted as A1 , A2 , . . . , Am and B1 , B2 , . . . , Bm . Using the procedure from the proof of Theorem 16, we can reduce the grid to have at most two on vertices and those two vertices are either in the same row or in adjacent rows (if Ai and B j are

σ -game and Lit-only σ -game on Grids and Graphs

323

the only lit vertices, where j ≥ i + 2, the sequence of pushes B j , A j , A j−1 , . . . , Ai+1 reduces the highest 1 by one level). There are a number of cases to consider. We assume m ≥ 5, since the cases when m < 5 are easy except for the following: ⎡

0 ⎣1 0

⎤ 0 1⎦ 0

where the sequence of pushes A2 , A1 , A3 , A2 , B2 transforms it to ⎡ ⎤ 0 0 ⎣0 1⎦ 0 0 Case 1. The two on vertices are A3 , B3 . Pushing A3 , A2 , B2 , A1 , A2 , A3 (in that order) reduces the graph to one on vertex. This procedure actually works for m ≥ 3. Case 2. The two on vertices are A2 , B2 . Pushing A2 , A3 , B3 , A4 , A3 , A2 , A5 , A4 , A3 , B4 , A4 , A5 shifts the pair of 1’s down three rows to be in A5 , B5 . Note that we can then repeat this procedure to shift the pair of 1’s down another three rows, if necessary. This shifting is our primary tool in reducing the graph to one lit vertex. (A) Suppose 3|m and the i th row is 11 and all other rows are 00. If i ≡ 0( mod 3), then you can shift the row 11 up, three at a time, getting the 11 to row three, so we are done by Case 1. If i ≡ 1(mod 3), shift the 11 down three rows at a time to get the 11 into row m − 2, in which case we can again use Case 1, once we rotate the grid one hundred eighty degrees. If i ≡ 2(mod 3), we do the following (we can assume m ≥ 6). Pushing A2 , A1 , A3 , A2 , B2 takes us from configuration (i) to (ii) below in Table 4: Now by pushing A4 , B4 , B3 , B5 , B4 , B6 , B5 , A5 , we get the grid in Table 5. Note that we have shifted what appears in (ii) down three rows (in a reflected form). You can continue in this fashion down the grid and the lower 1 will be shifted off the grid, leaving but one 1 on the grid (in the (m − 1)st row). (B) Now suppose m ≡ 1(mod 3). Again suppose the i th row is 11 and all other rows are 00. If i ≡ 0(mod 3), we can shift the 11 up three rows at a time to get Table 4. m × 2 grid

324

J. L. Goldwasser, W. F. Klostermeyer Table 5. m × 2 grid

the 11 row into row three and then proceed as above. If i ≡ 2(mod 3), we can shift the 11 row down three rows at a time (and then rotate the grid one hundred eighty degrees) to get the 11 row in row 1 and then proceed as above. Now suppose i ≡ 1(mod 3). From what we described at the beginning of Case 2, we can move the 11 to row one. Then push B1 and we have rows one and two both equal to 01 (that is, the 1’s are in the same column in adjacent rows). Pushing B2 , B3 , A3 , A4 causes rows four and five to both be 10. So we have shifted the 1’s down three rows (and they switched columns). Continuing this process down the grid, if m ≡ 4(mod 6), you end with a 1 in row m, column 1 (the other 1 is shifted off the grid) and if m ≡ 1(mod 6), you end with a 1 in row m, column 2. This completes the case when you begin with two 1’s in the same row. Case 3. Suppose row i is 10 and row i + 1 is 01 (or vice versa). If i = 2 we simply push A2 , B2 , A1 , A2 and we are left with only one 1 on the grid in position A2 . If i = 2, pushing Bi+1 , Ai+1 , Bi+2 , Bi+1 , Bi+3 , Bi+2 , Ai+3 , Bi+3 shifts the rows 01 and 10 down three rows and reflects them: so row i + 3 is 01 and row i + 4 is 10. (A) Suppose m ≡ 0(mod 3). If i ≡ 2(mod 3), then we can shift the two rows (10 and 01) up three rows at a time to be on rows two and three (or rows three and two), which we can reduce to one on vertex by the procedure above. If i ≡ 1( mod 3), then we can shift the two rows (10 and 01) down three rows at a time to be on rows m − 1 and m − 2 (or rows m − 2 and m − 1), which we can then rotate and reduce to one on vertex by the procedure above. If i ≡ 0(mod 3), then we can shift them down three rows at a time using the procedure described above and one of the 1’s will be shifted off the grid. (B) Suppose m ≡ 1(mod 3) and row i is 10 and row i + 1 is 01 (or vice versa). If i ≡ 1(mod 3), then we can shift them down three rows at a time using the procedure described above and one of the 1’s will be shifted off the grid. If i ≡ 2( mod 3), we shift the pair of rows up three at a time to get 10 on row 2 and 01 on row 3 (or vice versa), which we can handle using methods described above. If i ≡ 0(mod 3), we shift the pair of rows up three at a time and one of the 1’s is shifted off the grid. This completes the proof.  Undoubtedly m × 3 grids could be analyzed by similar methods, though there are many cases to consider.

σ -game and Lit-only σ -game on Grids and Graphs

325

4. Open Problems We restate the two conjectures stated earlier: Conjecture 1. If G is a graph of order n with no isolated vertices, then W L(G) ≤  2n 3 . − → Conjecture 2. For every graph G with no isolated vertices, wL(θ ( 1 )) ≤ n2 . Wang and Wu showed that the gap between the maximum of W (T ) and the maximum of W L(R) among all trees T and R with the same number of leaves is one. Question 3. What is the maximum of W L(T ) − W (T ) among all trees T ? Conjecture 4. If G is a graph of order n with no isolated vertices, then W L(G) − W (G) ≤  n6 . Equality in the last conjecture holds if G is a complete tripartite graph with the same number of vertices in each part. Question 5. If C1 and C2 are configurations in the same orbit in the lit-only σ -game on a graph G of order n, we define the distance d(C1 , C2 ) to be the minimum number of pushes to go from C1 to C2 . What is the maximum of d(C1 , C2 ) over all graphs of order n? In the regular σ -game, if the nullspace is trivial, then the configuration obtained by starting with all vertices off and pushing every vertex is at distance n from the all-off configuration. Conjecture 6. If G is a bipartite graph of order n with no isolated vertices, then W L(G) ≤ n2 . Acknowledgements. We thank an anonymous referee for his/her helpful comments and the editors for their assistance.

References 1. Amin, A., Clark, L., Slater, P.: Parity dimension for graphs. Disc. Math. 187, 1–17 (1998) 2. Anderson, M., Feil, T.: Turning lights out with linear algebra. Math. Mag. 71, 300–303 (1998) 3. Cowen, R., Hechler, S., Kennedy, J., Ryba, A.: Inversion and neighborhood inversion in graphs. Graph Theory Notes XXXVII, 38–42 (1999) 4. Chang, G.: Vogan diagrams in the classification of real simple Lie algebras, plenary talk and the Third Pacific Conference of Mathematics, Shanghai China (2005)

326

J. L. Goldwasser, W. F. Klostermeyer

5. Chuah, M.K., Hu, C.C.: Equivalence classes of Vogan diagrams. J. Algebra 279, 22–37 (2004) ¨ 6. Eriksson, H., Eriksson, K., Sjostrand, J.: Note on the lamp-lighting problem. Adv. Appl. Math. 27, 357–366 (2001) 7. Goldwasser, J., Klostermeyer, W., Trapp, G.: Characterizing switch-setting problems. Linear Multilinear Algebra 43, 121–135 (1997) 8. Goldwasser, J., Klostermeyer, W.: Maximization versions of “lights out” games in grids and graphs. Cong. Num. 126, 99–111 (1997) 9. Goldwasser, J., Klostermeyer, W., Ware, H.: Fibonacci polynomials and parity domination in grid graphs. Graphs Comb. 18, 271–283 (2002) 10. Goldwasser, J., Klostermeyer, W.: Odd and even dominating sets with open neighborhoods. Ars Comb. 83, 229–247 (2007) 11. Goldwasser, J., Wang, X., Wu, Y.: Does the lit-only restriction make any difference for the σ -game and σ + -game? Eur. J. Comb. (2008). doi:10.1016/j.ejc.2008.02003 12. Sutner, K.: Linear cellular automata and the garden-of-eden. Math. Intell. 11, 49–53 (1989) 13. Hurlbert, G.: A survey if graph pebbling. Cong. Num. 139, 41–64 (1999) 14. Wang, X., Wu, Y.: Minimum light number of lit-only σ -game on a tree. Theor. Comput. Sci. 381, 292–300 (2007) 15. Wang, X., Wu, Y.: σ -game on a tree: covering radius and tree order. manuscript (2008) 16. Wu, Y.: Lit-only σ -game on a line-graph. Eur. J. Comb. (2008). doi:10.1016/j.ejc.2008. 02003 Received: February 22, 2008 Final version Received: February 18, 2009