## rational one year ago Do you have linear algebra in you to solve this puzzle Starting with 5x5 off squares, get the configuration in which all except the center square is on. Each click on a square toggles that particular square and its adjacent squares. (A square is adjacent if it is immediate left/right/top/bottom)

• This Question is Open
1. rational

|dw:1433078173205:dw|

2. anonymous

12 clicks?

3. rational

thats very fast! I took 11 clicks, please attach the screenshot of your final configuration

4. anonymous

5. rational

Excellent!

6. anonymous

Nope I can't get it, @thomasker you're fast

7. rational

Haha it took me more than 1 hour the first time

8. ParthKohli

WHAT THE HELL IS THIS, RATIONAL? HOW DID YOU DO THAT?

9. mathmath333

10. rational

just some javascript code... im still working on it... will share once it is fully ready :)

11. rational

congrats mathmath ! you took 12 clicks too ?

12. mathmath333

i forgot the exact pattern but it was less than 12 clicks,

13. anonymous

hi Nnesha

14. rational

ohkk.. the exact pattern is kinda neat it can be shown that the final configuration doesn't depend on the order of moves because matrix addition is commutative

15. anonymous

i fanned you!!

16. ParthKohli

oh my god how is this about linear algebra

17. ParthKohli

i don't even know how i should begin modelling this

18. anonymous

me neither

19. anonymous

20. anonymous

I can't get it lower than 5 =(

21. Kainui

I started with them all off and was playing around with just hitting out patterns and found this solution haha: |dw:1433088537580:dw|

22. Kainui

|dw:1433088580950:dw|

23. Nnesha

nice! ^^

24. Kainui

My answer is pretty simple, I was just doing symmetrical things randomly and started out with all lights off, then I clicked through this diamond shape and then the four corners were obvious, try it yourself. =P|dw:1433093748348:dw|

25. mathmath333

here is another one in 12 moves |dw:1433102935327:dw|

26. dan815
27. Nnesha

http://prntscr.com/7bm77v o^_^o :3

28. dan815

nnesha plz dont mock me

29. dan815
30. dan815

yay i found the 11 move one now

31. mathmath333

i would like to see if any one can make a 5*5 chessboard with alternate squares colored

32. dan815

nvm i think its 12 again i counted wronglul

33. Kainui

I made the chess board, but I forgot how I did it.

34. mathmath333

the middle square is a pain

35. Kainui

if the middle square is all you need, then do the pattern we just described above!!!!!

36. Kainui

|dw:1433106806531:dw| Does this pattern help at all for solving the all on to only the middle off?

37. mathmath333

lol i got the nazi symbol by that

38. mathmath333

finally got the chess board

39. Nnesha

$$\color{blue}{\text{Originally Posted by}}$$ @dan815 nnesha plz dont mock me $$\color{blue}{\text{End of Quote}}$$ >.<

40. geerky42

Interactive canvas?! |dw:1433120245025:dw| :)

41. ikram002p
42. geerky42

|dw:1433123980982:dw| Same solution though.

43. geerky42

@rational Can it really be done with 11 clicks? Share solution please!

44. ikram002p

sounds cool to surround any square http://gyazo.com/ebca79f34ddc44894ef7363c67226eaf

45. anonymous

This is so interesting!!

46. Kainui

I made some thing for people to play around with, I made this as part of something to help me solve the general solution of this puzzle... =) https://bitbucket.org/api/2.0/snippets/Kainui/Kb4e/8c0200c97075a361f2b0a0a63c6f3e85455d9d59/files/Box%20game If you just run it, you should be able to figure out what the main method is doing, but if you don't feel free to ask. =)

47. ParthKohli

How do you people do this? :(

48. Kainui

Hey if you wanna learn some Java I could help you, but I don't know much else other than what I picked up on a as-needed basis mostly. Project Euler is a great place to start learning to program since it gives you fun problems to solve.

49. ParthKohli

No, I mean... you people are good at what you do and have fun in general. How do you do that?

50. rational
51. rational

Kai, the general solution i have uses a system of 25 linear equations with 25 unknowns here is the coefficient matrix

52. rational

this explains the method http://mathworld.wolfram.com/LightsOutPuzzle.html

53. Kainui

Well it starts out like a game (quite literally in this case!) and it seems kind of impossible. I just tried guessing stuff and the only thing to guide me was I figured that since it starts symmetric and ends symmetric, maybe I should limit myself to only doing symmetrical things? That'll at least cut down on some stuff while I play around randomly trying to find some other thing. But it's sorta frustrating, I think I enjoy being frustrated to an extent, if I leave math for too long like a week I get bored and it pulls me back in because it's a challenge and every time I seem to learn something, even if it's just a slightly new way to look at an old concept. A lot of this is just based on how I feel, and everyone's different I imagine. For instance, when learning calculus I really tried to struggle through the formalism because I held the belief that beneath it all there was some common sense argument, some simple concept that once you find it, everything becomes clear from there. And often times that's what drives me, I want that understanding because I feel like it's worth it since it gives me satisfaction. Understanding a mathematical concept is probably one of the only things that brings me pride, since once I understand it I have it, it's mine, and I've acquired it. I don't even fully know what math is. Is it understanding reality? Is it understanding our own minds? What is symmetry? When I learn mathematics I think, "Someone was in a common-sense state of mind when they discovered this, so I should be able to see all math concepts from that perspective too if I just try to understand how." But not only that, every time I learn a new math concept I have a realization that I am thinking, at least in some way, the same exact thought as Newton or Gauss or any of these great people. I guess in that sense it excites me to in some sense see through their eyes, like owning a tiny piece of their mind inside of your own mind. I guess I just love collecting all the interesting tricks and techniques. Also, I spend most of my time solving math problems I create myself, investigating questions I care about no matter how stupid or frivolous since this is where my originality and understanding really grow from. So yeah I do it and have fun but I have fun because I think I'm doing something that matters. This is like fundamental nature of reality stuff, even though this only appears to be a simple game every little logical thing like this might actually be part of a portal to deeper understanding of reality or something lol. At the very least you can acquire some way of thinking through this that you might not have had before to add to your collection of perspectives with which to apply to other problems.

54. Kainui

Yeah that's what I was making my program generate, that matrix and then I was gonna invert it in matlab lol.

55. rational

XD

56. anonymous

|dw:1433167472553:dw| 20 clicks but at least it's original =(

57. rational

matlab is cussing when i ask it to solve because determinant of that matrix is 0... looks we need to solve it in mod2 using gaussian elimination w/o doing any division.. .but idk much about finite field linear algebra the matlab commands to use

58. Kainui

I was afraid of that, I'm gonna make something in Java I guess to try to figure this out lol...

59. Kainui

Here's the updated code with the method that generates the coefficient matrix, but I'm gonna go eat breakfast and think about how to invert this in mod 2, or maybe I don't have to. https://bitbucket.org/api/2.0/snippets/Kainui/Kb4e/3ba22b3de3e488785614c886822210de3c782452/files/Box%20game

60. anonymous

@rational excellent link to the method

61. Kainui

@LegendarySadist Awesome! I didn't know if it was possible or not, interesting.

62. ikram002p

wow javing :P

63. Kainui

I was playing around and I think the fact that the determinant of this matrix being equal to zero really does imply that it's not invertible. After all, we see that there are two separate ways to get to this solution which implies that we have something that isn't a basis set. So one way around this might be to just try to find out which columns are linearly dependent and try to remove them so we get a nonzero determinant. Then depending on which moves we allow we can find the possible moves maybe.

64. Kainui

Interesting, combining @LegendarySadist 's solution and mine I was able to show the linear dependence by only doing the moves we didn't have in common!|dw:1433629388078:dw| |dw:1433629406387:dw| This is all the moves in the union of both of our moves with their intersection removed: |dw:1433629284236:dw| Try this combo out to see what happens. ;D

65. Jaynator495

Rational... seems im not the only one who knows how to do this, however DO NOT SHARE THIS! this feature is very incredibly abusable, for the same reason they had to put the safe extension in mathml, they will fix the canvas if we make it to abusable (fixing means in this case, either A: parsing it to make sure no invalid data is provided or B: transfer it to a canvas element!)