![]() ![]() (That's just an example, not my solution to this specific instance.)įurthermore, the v1.v9 part of the matrix on the left will have rows that are all zero except for a single 1 the stuff on the right will be instructions for how to "kill" this single 1. 11.1111, which says that to clear out the bottom row, you need to click on lights 3, 4, 6, 7, 8, and 9. ![]() When you're all done, the bottom row will contain all zeros, and to the right will be some sequence like. Note that when I used the second row to clear out another row, I need to add 110000000 to the right hand side of each row I clear out: 100011000 11 (I could swap the 2nd and 3rd rows, but I'm not going to bother in general, to clear out the $k$th column, I'll use the first not-yet-used row that has a "1" in its $k$th entry). Next, I'll use the 2nd row to clear out the 3rd entry in every other row. Note that on the right-hand side, this means adding 001000000 to any row that needs a 1 in the second column cleared out!: 101101000 1 1 Now I'll use the third row to kill the second entry in every row (including the bottom row). I use the first row to clear out the first bit in all rows below it (namely the second and 4th) to the right of my matrix I'll write another matrix indicating how each row is currently composed (i.e., when I add v1 to v2, it becomes v1 v2, hence has "1"s in both the first and second slot to the right, like this: 110100000 1 Let's first do some row-reduction to the matrix consisting of v1 through v9, with the target row stuck on the bottom. Suppose we want to solve the puzzle above, i.e., writeĪs linear combination of v1 through v9. So what are v1 through v9 for this case? v1 = 110100000 and *, where * is "on") by reading it out row-by-row to get a vector of 0s and 1s, which I'll write without blanks. We'll convert a board-state (indicated by. (The order in which you click doesn't matter.) For each $i$ for which $v_i$ has a coefficient of $1$ in the linear combination, click on square $i$. ![]() Write your starting state as a vector $w$, and then express $w$ as a linear combination of the $v_i$s, using Gaussian elimination or whatever technique you like. This gives you $n^2$ vectors, $v_1, \ldots, v_N$, where $N = n^2$. If that's square $i$, build a vector $v_i$ that has ones in each entry corresponding to the square and its neighbors. Treat the state of the board as a vector of length $n^2$ with binary number entries: a 1 for each light that's on, a 0 for each light that's off.Ĭlicking on a square toggles the state of that square and its neighbors. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |