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 ‰

Slides:



Advertisements
Similar presentations
Algebra Problems… Solutions
Advertisements

5.1 Real Vector Spaces.
Walks, Paths and Circuits Walks, Paths and Circuits Sanjay Jain, Lecturer, School of Computing.
Midwestern State University Department of Computer Science Dr. Ranette Halverson CMPS 2433 – CHAPTER 4 GRAPHS 1.
Gibbs sampler - simple properties It’s not hard to show that this MC chain is aperiodic. Often is reversible distribution. If in addition the chain is.
1 Lecture 5 (part 2) Graphs II Euler and Hamiltonian Path / Circuit Reading: Epp Chp 11.2, 11.3.
1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA.
Representing Relations Using Matrices
Tirgul 8 Graph algorithms: Strongly connected components.
Applied Discrete Mathematics Week 11: Graphs
IERG5300 Tutorial 1 Discrete-time Markov Chain
Algebra Problems… Solutions Algebra Problems… Solutions © 2007 Herbert I. Gross Set 22 By Herbert I. Gross and Richard A. Medeiros next.
The number of edge-disjoint transitive triples in a tournament.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
The Characteristic Equation of a Square Matrix (11/18/05) To this point we know how to check whether a given number is an eigenvalue of a given square.
Totally Unimodular Matrices Lecture 11: Feb 23 Simplex Algorithm Elliposid Algorithm.
Boolean Algebra cont’ The digital abstraction Graphs and Topological Sort מבנה המחשב + מבוא למחשבים ספרתיים תרגול 2#
5.II. Similarity 5.II.1. Definition and Examples
Complexity1 Pratt’s Theorem Proved. Complexity2 Introduction So far, we’ve reduced proving PRIMES  NP to proving a number theory claim. This is our next.
Ch 7.3: Systems of Linear Equations, Linear Independence, Eigenvalues
Introduction Polynomials
Toward NP-Completeness: Introduction Almost all the algorithms we studies so far were bounded by some polynomial in the size of the input, so we call them.
Elementary Linear Algebra Anton & Rorres, 9 th Edition Lecture Set – 08 Chapter 8: Linear Transformations.
Linear Equations in Linear Algebra
Applied Discrete Mathematics Week 10: Equivalence Relations
Boyce/DiPrima 9th ed, Ch 7.3: Systems of Linear Equations, Linear Independence, Eigenvalues Elementary Differential Equations and Boundary Value Problems,
Wei Wang Xi’an Jiaotong University Generalized Spectral Characterization of Graphs: Revisited Shanghai Conference on Algebraic Combinatorics (SCAC), Shanghai,
Exam 2 Review 8.2, 8.5, 8.6, Thm. 1 for 2 roots, Thm. 2 for 1 root Theorem 1: Let c 1, c 2 be elements of the real numbers. Suppose r 2 -c 1.
The Quasi-Randomness of Hypergraph Cut Properties Asaf Shapira & Raphael Yuster.
The Effect of Induced Subgraphs on Quasi-randomness Asaf Shapira & Raphael Yuster.
Graph Theory Topics to be covered:
Chapter 2 Simultaneous Linear Equations (cont.)
Advanced Counting Techniques CSC-2259 Discrete Structures Konstantin Busch - LSU1.
A matrix equation has the same solution set as the vector equation which has the same solution set as the linear system whose augmented matrix is Therefore:
Chapter Content Real Vector Spaces Subspaces Linear Independence
Based on slides by Y. Peng University of Maryland
Computing Eigen Information for Small Matrices The eigen equation can be rearranged as follows: Ax = x  Ax = I n x  Ax - I n x = 0  (A - I n )x = 0.
Discrete Structures Lecture 12: Trees Ji Yanyan United International College Thanks to Professor Michael Hvidsten.
2.4 Irreducible Matrices. Reducible is reducible if there is a permutation P such that where A 11 and A 22 are square matrices each of size at least one;
Elementary Linear Algebra Anton & Rorres, 9 th Edition Lecture Set – 02 Chapter 2: Determinants.
Markov Chains and Random Walks. Def: A stochastic process X={X(t),t ∈ T} is a collection of random variables. If T is a countable set, say T={0,1,2, …
Advanced Counting Techniques CSC-2259 Discrete Structures Konstantin Busch - LSU1.
Chap. 4 Vector Spaces 4.1 Vectors in Rn 4.2 Vector Spaces
The Dominating Set and its Parametric Dual  the Dominated Set  Lan Lin prepared for theory group meeting on June 11, 2003.
1 Decomposition into bipartite graphs with minimum degree 1. Raphael Yuster.
 Quotient graph  Definition 13: Suppose G(V,E) is a graph and R is a equivalence relation on the set V. We construct the quotient graph G R in the follow.
NPC.
CSC 413/513: Intro to Algorithms
Great Theoretical Ideas in Computer Science for Some.
 2004 SDU 1 Lecture5-Strongly Connected Components.
Chapter 5 Chapter Content 1. Real Vector Spaces 2. Subspaces 3. Linear Independence 4. Basis and Dimension 5. Row Space, Column Space, and Nullspace 6.
Theory of Computational Complexity Probability and Computing Lee Minseon Iwama and Ito lab M1 1.
Modeling the Game of Brain Cube Leslie Muzulu, Kristal Jameson, and Kathy Radloff; St. Catherine University Game Description Brain Cube is a puzzle game.
1 Lecture 5 (part 2) Graphs II (a) Circuits; (b) Representation Reading: Epp Chp 11.2, 11.3
Lecture 12 Algorithm Analysis Arne Kutzner Hanyang University / Seoul Korea.
Math 3121 Abstract Algebra I Lecture 6 Midterm back over+Section 7.
Tutorial 6. Eigenvalues & Eigenvectors Reminder: Eigenvectors A vector x invariant up to a scaling by λ to a multiplication by matrix A is called.
De Bruijn sequences 陳柏澍 Novembers Each of the segments is one of two types, denoted by 0 and 1. Any four consecutive segments uniquely determine.
P & NP.
Lap Chi Lau we will only use slides 4 to 19
Prüfer code algorithm Algorithm (Prüfer code)
Topics in Algorithms Lap Chi Lau.
(xy)(yz)(xz)(zy)
Eulerian tours Miles Jones MTThF 8:30-9:50am CSE 4140 August 15, 2016.
Lecture 12 Algorithm Analysis
Lecture 12 Algorithm Analysis
Problem Solving 4.
Lecture 12 Algorithm Analysis
Instructor: Aaron Roth
Locality In Distributed Graph Algorithms
Presentation transcript:

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

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!

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

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.

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.

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.

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.

(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

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

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

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:

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

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

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.

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.

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

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.

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.

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

Lights Out on a Path

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.

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.

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.

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

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

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

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

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.

Example: rr rr rrrr rr