Gaussian Elimination when Order of Operations Matters

49 Views Asked by At

I've been self studying linear algebra and was hoping that someone could provide some insight and/or direct me to the right resource here.

Let's say that we are playing the game lights out.

Math.SE post: https://stackoverflow.com/questions/19795973/lights-out-game-algorithm

Blog with code to solve: https://www.keithschwarz.com/interesting/code/?dir=lights-out

The important thing to recognize with the game described above is that if you have a valid sequence of buttons to press, it doesn't actually matter what order you do it in. Now let's say that there was an added constraint such that you could only press a button if it was in a specified state (either on or off- I would have to think about which would make more sense for the game, but it doesn't really matter).

Given these new rules, Gaussian elimination no longer works (from my understanding). Because let's say that if you can only press a light once it's already on, if there is a light that you need to press that starts in the off state, that button needs to be pressed at a later point in time.

Is there something else that solves a system of equations but takes into account the order in which things are done?