Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lights-Out on Graphs Nadav Azaria. What is “ Lights-Out ” ? “ Lights-Out ” is a hand- held electronic game by Tiger electronics. It is played on a 5 ‰

Similar presentations


Presentation on theme: "Lights-Out on Graphs Nadav Azaria. What is “ Lights-Out ” ? “ Lights-Out ” is a hand- held electronic game by Tiger electronics. It is played on a 5 ‰"— Presentation transcript:

1 Lights-Out on Graphs Nadav Azaria

2 What is “ Lights-Out ” ? “ Lights-Out ” is a hand- held electronic game by Tiger electronics. It is played on a 5 ‰ 5 keypad of lightable buttons. “ Lights-Out ” is a hand- held electronic game by Tiger electronics. It is played on a 5 ‰ 5 keypad of lightable buttons. Other versions of the game exist. Other versions of the game exist.

3 On Start: Some random buttons are lit. Object: To turn all the lights out on the keypad. The difficulty is that each time you press a lit or an unlit button, it not only changes that button, but also all adjacent buttons!

4

5

6

7

8

9

10 The game gave inspiration to several researches. Some of the work done, will be presented today. From ToysRus to BGU

11 Lights-Out on Arbitrary Graphs Let G=(V,E) be a given graph. Suppose that at each vertex there is a light bulb and a switch. Toggling the switch at a vertex, we flip the light at this vertex and all its neighbors - those that were off are turned on and vice versa. Toggling the switch at a vertex, we flip the light at this vertex and all its neighbors - those that were off are turned on and vice versa. A configuration of the system is a point of {0,1} V, where a 0 coordinate indicates that the light at the corresponding vertex is off, while a 1 means that it is on.

12 Did you notice that … While solving the game: 1. There is no point pressing the same button more than once. 2. The order in which you press the buttons has no effect on the final configuration. Thus: A solution may be identified with a subset of V.

13 Question Given two configurations, decide whether it is possible to pass from one to the other by some sequence of switch toggles. Given two configurations, decide whether it is possible to pass from one to the other by some sequence of switch toggles.

14 Answer Let M(G) be the neighborhood matrix of G. Let M(G) be the neighborhood matrix of G. If C is some configuration and we press some vertex v, the resulting configuration is If C is some configuration and we press some vertex v, the resulting configuration is C+M(G) v, where M(G) v is the row of M(G) corresponding to v.

15 (0,1,0,0)(0,1,1,1)(0,0,1,1)(0,0,1,1)(1,1,0,0)(1,1,1,1) Press

16 Meaning …. We can pass from C 1 to C 2 if and only if there exists an x such that x Î {0,1} V such that C 1 + M(G)x= C 2 Or, equivalently: M(G)x= C 2 - C 1

17 Conclusions We can now always assume starting with the all-off configuration and only ask which configurations can be reached. All configurations can be reached M(G) is non- singular over Z 2

18 Which graphs have the property that one can pass from any configuration to any other? We are interested in: Which graphs have the property that one can pass from any configuration to any other? We are interested in:

19 Oh Yes, and find algorithms for evaluating light- deficiency for specific graph types. Naturally they need to perform better then O(n 2.376 ). Oh Yes, and find algorithms for evaluating light- deficiency for specific graph types. Naturally they need to perform better then O(n 2.376 ).

20 Definitions A 0-combination A 0-combination is a non-zero vector in Ker(M(G)). For example, in the graph, (1,1) is a 0- combination. light-transitive A graph is light-transitive if each configuration can be reached. v1v1 v2v2

21 light-deficiency The light-deficiency d (G) of G is the dimension of the kernel of M(G). Thus, there exist 2 |V| - d (G) reachable configurations.

22 Universal Configurations A universal configuration is a non-trivial configuration which is reachable for each graph. A universal configuration is a non-trivial configuration which is reachable for each graph. Theorem The all-on configuration is the only universal configuration. Theorem The all-on configuration is the only universal configuration.

23 Proof By considering the complete graph, we get the “ only ” part of the theorem.

24 We use induction on the number of vertices for the other direction. n=1 Now Let V={v 1,v 2, …,v n }. By the induction hypothesis we get: For each vertex v i there exist a set S v i Î V\{v i } such that after pressing all switches in S v i, all vertices in V\{v i } are on.

25 If n is even: For each vertex v, press all vertices in S v. Now, every vertex changes its state n-1 times meaning it is on. If n is odd: Let v be a vertex with an even degree. Let C be the set of all neighbors of v and v itself. For any u in V\C, press all vertices in S u.

26 Now, every vertex except the ones in C is on. Now by pressing on v we arrive to the all-on configuration.

27 Lights Out on a Path

28

29 Lights Out on Circles For n º0 (mod3) we have 0-combinations. Example (press the following vertices):  1,2,4,5,...,n-2,n-1  2,3,5,6,...,n-1,n Meaning light-deficiency is at least 2.

30 Remark - Note that if we press all the vertices we arrive at the all-on configuration. In case n º1,2 (mod3), we press vertices: 2,5,8, … Now all lights are on except one. Using the remark above we get a configuration where only one light bulb is on - meaning we can arrive at any configuration.

31 m ‰ n Grids Definition p 0 ( g )=1, p 1 ( g )= g, p 0 ( g )=1, p 1 ( g )= g, p n ( g )= g p n-1 ( g )+p n-2 ( g ) p n ( g )= g p n-1 ( g )+p n-2 ( g ) Theorem. The Lights Out game has a unique solution iff p m ( g ) and p n ( g+1 ) are relatively prime.

32 Let: A m + denote the m ‰ m tridiagonal matrix. A m + denote the m ‰ m tridiagonal matrix. A m be A m + A m be A m + +I. C be an m ‰ n matrix representing a configuration. C be an m ‰ n matrix representing a configuration. Then C has a unique solution iff the equation A m X+XA n + =C has a unique solution X in M(m,n,Z 2 ).

33 It is known that : The equation AX+XB=C has a unique solution iff the characteristic polynomials of A and B are relatively prime. And for similar reasons to the ones we saw in Paths det(A m - g I)=p m ( g ) thus det(A m - g +I)=p m ( g +1).

34 Invariant Graphs (soon) A rooted union of two rooted graphs G1G1 G1G1 G2G2 G2G2 Is X root of G 1 and G 2

35 Invariant Graphs I An invariant graph I satisfy d (G Ç I)= d (G), for any rooted graph G. Ç - rooted union. I An invariant graph I satisfy d (G Ç I)= d (G), for any rooted graph G. Ç - rooted union. r r r r

36 Q. When does a light-transitive rooted graph is invariant? A. A light-transitive rooted graph is invariant The configuration which all lights if off except for the root, must be lit using the root itself.

37 Example: rr rr rrrr rr


Download ppt "Lights-Out on Graphs Nadav Azaria. What is “ Lights-Out ” ? “ Lights-Out ” is a hand- held electronic game by Tiger electronics. It is played on a 5 ‰"

Similar presentations


Ads by Google