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)

- rational

- Stacey Warren - Expert brainly.com

Hey! We 've verified this expert answer for you, click below to unlock the details :)

- schrodinger

I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!

- rational

|dw:1433078173205:dw|

- anonymous

12 clicks?

- rational

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

Looking for something else?

Not the answer you are looking for? Search for more explanations.

## More answers

- anonymous

##### 1 Attachment

- rational

Excellent!

- anonymous

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

##### 1 Attachment

- rational

Haha it took me more than 1 hour the first time

- ParthKohli

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

- mathmath333

##### 1 Attachment

- rational

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

- rational

congrats mathmath ! you took 12 clicks too ?

- mathmath333

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

- anonymous

hi Nnesha

- 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

- anonymous

i fanned you!!

- ParthKohli

oh my god how is this about linear algebra

- ParthKohli

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

- anonymous

me neither

- anonymous

@rational, for your case of 11 moves, you start with all on or all off?

- anonymous

I can't get it lower than 5 =(

- Kainui

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

- Kainui

|dw:1433088580950:dw|

- Nnesha

nice! ^^

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

- mathmath333

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

- dan815

http://prntscr.com/7bm4fw

- Nnesha

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

- dan815

nnesha plz dont mock me

- dan815

http://prntscr.com/7bmdzh

- dan815

yay i found the 11 move one now

- mathmath333

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

- dan815

nvm i think its 12 again i counted wronglul

- Kainui

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

- mathmath333

the middle square is a pain

##### 1 Attachment

- Kainui

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

- Kainui

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

- mathmath333

lol i got the nazi symbol by that

##### 1 Attachment

- mathmath333

finally got the chess board

##### 1 Attachment

- Nnesha

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

- geerky42

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

- ikram002p

http://gyazo.com/22a70730e41a8ab2ebb5c26113921b12

- geerky42

|dw:1433123980982:dw|
Same solution though.

- geerky42

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

- ikram002p

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

- anonymous

This is so interesting!!

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

- ParthKohli

How do you people do this? :(

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

- ParthKohli

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

- rational

https://ideone.com/8543R3

- rational

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

##### 1 Attachment

- rational

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

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

- Kainui

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

- rational

XD

- anonymous

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

- 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

- Kainui

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

- 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

- anonymous

@rational excellent link to the method

- Kainui

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

- ikram002p

wow javing :P

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

- 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

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

Looking for something else?

Not the answer you are looking for? Search for more explanations.