# Lights-Out on Graphs - PowerPoint PPT Presentation Download Presentation Lights-Out on Graphs

Lights-Out on Graphs Download Presentation ## Lights-Out on Graphs

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
##### 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‰5keypad of lightable buttons. • 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. From ToysRus to BGU The game gave inspiration to several researches. Some of the work done, will be presented today.

5. 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. 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.

6. Did you notice that… While solving the game: • There is no point pressing the same button more than once. • 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.

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

8. Answer • Let M(G) be the neighborhood matrix of G. • 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.

9. Press (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

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

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

12. The End ?! We are interested in: We are interested in: Which graphs have the property that one can pass from any configuration to any other? Which graphs have the property that one can pass from any configuration to any other?

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

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

15. Thelight-deficiencyd(G) of G is the dimension of the kernel of M(G). Thus, there exist 2|V|- d(G) reachable configurations.

16. Universal Configurations • A universal configuration is a non-trivial configuration which is reachable for each graph. • TheoremThe all-on configuration is the only universal configuration.

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

18. We use induction on the number of vertices for the other direction. n=1 Now Let V={v1,v2,…,vn}. By the induction hypothesis we get: For each vertex vithere exist a set SviÎV\{vi} such that after pressing all switches in Svi, all vertices in V\{vi} are on .

19. If n is even: For each vertex v, press all vertices in Sv. 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 Su.

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

21. Lights Out on a Path

22. 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.

23. 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.

24. m‰n Grids Definition p0(g)=1, p1(g)=g, pn(g)=gpn-1(g)+pn-2(g) Theorem.The Lights Out game has a unique solution iff pm(g) and pn(g+1) are relatively prime. SO

25. Here is how.. קצת סימונים... Let: • Am+ denote the m‰m tridiagonal matrix. • Am be Am++I. • C be an m‰n matrix representing a configuration. Then C has a unique solution iff the equation AmX+XAn+=C has a unique solution X in M(m,n,Z2).

26. 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(Am-gI)=pm(g) thus det(Am-g+I)=pm(g+1).

27. Invariant Graphs (soon) A rooted union of two rooted graphs G2 G1 Is X root of G1 and G2

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

29. 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.

30. Example: r r r r r