1 / 42

Lights Out for Fun and Profit! Parity Domination: Algorithmic and Graph Theoretic Results

Lights Out for Fun and Profit! Parity Domination: Algorithmic and Graph Theoretic Results. William F. Klostermeyer University of North Florida. Introduction. Green Vertex Pushed. Introduction cont. Of the 2 16 initial configurations of 4 X 4 grid, 2 12 can be changed to all-off

yosefu
Télécharger la présentation

Lights Out for Fun and Profit! Parity Domination: Algorithmic and Graph Theoretic Results

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lights Out for Fun and Profit!Parity Domination:Algorithmic and Graph Theoretic Results William F. Klostermeyer University of North Florida

  2. Introduction

  3. Green Vertex Pushed

  4. Introduction cont. • Of the 216 initial configurations of 4 X 4 grid, 212 can be changed to all-off • How many can be changed to all-off in N X N grid?

  5. History • Lights Out! (~ 1995) • Button Madness (PC Game) • ACM Programming Contest • Cellular Automata (1989) • Parity Domination (1990’s)

  6. Overview • Complete Solvability • Fibonacci Polynomials • Maximization Problems • Complexity • Approximation Algorithm • Fixed Parameter Problems

  7. Parity Domination 1 1 0 1 0 1 p(v) indicated for each v

  8. Parity Domination cont. • Even Dominating Set: • Non-empty set of vertices D s.t. each vertex is adjacent to an even number of vertices of D • Odd Dominating Set: • Defined accordingly

  9. Parity Domination cont. • Theorem (Sutner): Every graph has an odd dominating set • Theorem (folklore): Every initial configuration of G can be turned off iff G has no even dominating set

  10. Even Dominating Sets • If G has even dominating set, D, closed neighborhood matrix is singular • Pushing D and empty set have same effect : no change! • Which graphs have even dominating sets?

  11. Even Dominating Set cont. 0 0 0 0 1 0 1 1 1 0 0 0 Nullspace Matrix

  12. Basics • Can decide in polynomial time if G has an even dominating set • use Gaussian elimination • If G does not have an even dominating set we say G is completely solvable

  13. Basics cont. • If G has an even dominating set: • Can decide in polynomial time if a given configuration can be turned off (use linear algebra methods)

  14. 3 X 3 Grid

  15. Linear Equations 1 1 0 1 0 0 0 0 0 x1 = 1 1 1 1 0 1 0 0 0 0 x2 = 0 0 1 1 0 0 1 0 0 0 x3 = 0 1 0 0 1 1 0 1 0 0 x4 = 0 0 1 0 1 1 1 0 1 0 x5 = 0 0 0 1 0 1 1 0 0 1 x6 = 1 0 0 0 1 0 0 1 1 0 x7 = 0 0 0 0 0 1 0 1 1 1 x8 = 1 0 0 0 0 0 1 0 1 1 x9 = 0

  16. Grids • 3 X 3 grid completely solvable • 4 X 4 grid not completely solvable (= has even dominating set) • Test if Closed Neighborhood Matrix is singular • O((nm)3) SLOW!

  17. Nullspace Matrices 1 0 0 1 1’s = Even Dominating 1 1 1 1 Set of 4 X 4 Grid 1 1 1 1 1 0 0 1 “Linearize” this matrix to get a 16 X 1 vector in nullspace of closed neighborhood matrix of 4 X 4 grid

  18. Building Nullspace Matrices 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 0 0 0 1 0 1 0 0 0 1 1 1 0 0 0 1 1 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 • Thus 4 X 9 grid is not completely solvable. • Likewise 9 X 9, 4 X 14, 9 X 14, etc.

  19. Nullspace Recurrence 1 0 0 1 1’s = Even Dominating 1 1 1 1 Set of 4 X 4 Grid 1 1 1 1 1 0 0 1 r[I, j]=r[I-1,j]+r[I-1,j-1]+r[I-1,j+1]+r[I-2,j] mod 2

  20. Recurrence cont. Theorem: r[I]=fi(B)w • r[I] : ith row of nullspace matrix • fi : ith Fibonacci polynomial • B : Closed Neighborhood Matrix • w : initial non-zero vector

  21. Fibonacci Polynomials • Fn(x) is nth Fibonacci polynomial: f0=0, f1=1, f i=xf i-1(x) + fi-2(x) f2=x, f3=x2+1, f4=x3

  22. Example 0 0 0 1 0 0 <-- w 1 1 0 1 0 1 = 1 1 0 1 1 0 1 0 0 ( 1 1 1 * 1 1 1 + 0 1 1) * 1 0 0 = w 0 1 1 0 1 1 0 1 1 f3=x2+1

  23. Factored Fibonacci Polynomials • Implemented (randomized) algorithm to factor polynomials over GF(2) in polynomial time

  24. Factored cont. • f_2: x (x)^1 • f_3: x^2 +1 (x +1)^2 • f_4: x^3 (x)^3

  25. Fibonacci Polynomials cont. • f_5: x^4 +x^2 +1 (x^2 +x +1)^2 • f_6: x^5 +x (x +1)^4 (x)^1 See my web page for thousands more

  26. More on the Recurrence • Period: number of rows until row of 0’s • Recurrence is periodic • Theorem: Maximum period generated by initial vector <1 0 0 0 …> • Theorem: Length of period is less than 3*2n/2

  27. Periods • n=5 24, 12, 8, 6, 4, 3, 2 • n=6 9 • n=7 12, 6, 3 • n=8 28, 14, 7, 4, 2 • n=9 30, 15, 10, 5, 3 • n=10 31 • n=12 63 • n=13 18, 9, 3

  28. More Periods Maximum periods: • n=39 120 • n=40 1,048,575 • n=41 4680 • n=46 over 8 million

  29. Divisibility Properties • Theorem: All periods divide the maximum period • Theorem: If fn+1(x) has only one non-trivial factor, then there is only one period for vectors of length n

  30. Characterization • Theorem: m x n grid is completely solvable iff GCD(fn+1(x+1), fm+1(x))=1 over GF(2)

  31. Fast Algorithm • Can determine if m X n grid is completely solvable in O(n log2 n) time, n>= m • Obvious method: O((nm)3) time

  32. Square Grids • Lemma: f2^k+1(x)f2^k-1(x) is equal to square of product of all irred. polynomials with degree dividing k except for x, over GF(2) • Theorem: 2k x 2k and 2k-2 x 2k-2 grids not completely solvable for all k > 3

  33. Maximization Problems • Theorem: Can always get at least mn-m/2 off in m X n grid, n >= m • Theorem: Exist m X n grids for which some initial configurations can get at most mn - (m/log m) off, n >= m

  34. Graphs • Play Lights Out! in graph • Closed neighborhood matrix non-singular iff completely solvable iff no even dominating set • Maximization problems in graphs

  35. Complexity Results • Theorem: NP-complete to decide if G can be made to have at least k lights out • Also NP-complete for planar graphs • Simple approximation algorithm with performance ratio 2

  36. Max-SNP Hard • Theorem: Exists e > 0 s.t. no approximation algorithm can have performance ratio less than 1+e unless P=NP • Is there a better approximation algorithm for planar graphs?

  37. Fixed Parameter Problems • Can decide in polynomial time if a configuration can be made to have n-c off, for constant c • Gaussian elimination + brute force

  38. Fixed Parameter cont. • Can decide in polynomial time if all configurations can be made to have n-c off, for a constant c • Treat all-off state as codeword of binary code • Test if covering radius of code is at most c

  39. Large grids, 5 by 5 and larger: Theorem.(Counting argument). Unsolvable implies not all initial configurations can be made to have at most one light on. Trees:always at most leaves/2 on.

  40. Conjecture • Let fn+1 equal square of irred. Polynomial and m be maximum period of n. Then all initial configurations of m X n grid can be made to have at most 2 vertices on. • Verified for 8 X 6, 30 X 10, 62 X 12, 512 X 18 using Coding Theory algorithm

  41. Publications • Characterizing Switch-Setting Problems, Lin. and Mult. Alg. 1997 • Maximization Versions of Lights Out …, Cong. Num. 1998 • Fibonacci Polynomials…, Graphs and Combinatorics, to appear

  42. Related Work • “The Odd Domination Number of a Graph” Y. Caro and W. Klostermeyer, to appear in J. Comb. Math. & Comb. Comput. • Study size of smallest odd dominating set in graph

More Related