Python 3.4 Beta 1 Released
python.org89 pointsby alxv28 comments
101
010
100
The first and second rows are solved. However we cannot solve the last row without re-doing the first and second rows. The two solutions of this board shows this: solution #1:
110
100
000
solution #2:
110
110
000
Actually, seeing my mistake made me challenge my assumption that a singular matrix over the reals might not be over integers modulo 2. This is likely wrong too. I don't know much about abstract algebra (and I am not a mathematician). Wikipedia (https://en.wikipedia.org/wiki/Determinant#Square_matrices_ov...) states "the reduction modulo m of the determinant of such a matrix is equal to the determinant of the matrix reduced modulo m." 101 010
010 or 101
101 010
where 1 is a white square and 0 is a black square. 010
101 = 010101010 = y
010
At the beginning of the game, the board is at some random initial pattern. 110
111 = 110111010 = y0
010
The goal of the game is to find the necessary moves to form the chessboard pattern. Hence, we want to solve the equation (y - y0) = Mx
where M is a N²×N² matrix representing the effect of every possible moves. Pressing on a tile is equation to addition by 1 modulo 2. 1 + 1 = 0 (mod 2)
0 + 1 = 1 (mod 2)
For example, pressing the top left tile is the same as adding this effect vector to the board vector: 110110000
If we do this for all 9 tiles of the 3x3 board, we find the matrix M to be: 110110000
111111000
011011000
110110110
111111111 = M
011011011
000110110
000111111
000011011
where the i-th row is the effect of pressing the i-th tile. Now, we can just solve for x (assuming M is not singular). Re-using our above example, we find (y - y0) = Mx
(010101010 - 110111010) = Mx
100010000 = Mx
111100100 = x (by Gaussian elimination)
This means we can press the following tiles (in any order) on the board to solve it: 111
100
100
If you are interested, I wrote some quick demo code that shows how this could be implemented in Python: https://gist.github.com/avassalotti/7452318c9e9b8dec637bc7c0...
It's large enough for the double-Gauss lens (a.k.a. normal prime lens) to have a nice shallow deep of field wide open. f/1.2 is close to the limit of a typical SLR mount. So a normal 50mm f/1.2 lens gets us 42mm of aperture. This means we can get the same depth of field and angle of view as a 6x7 medium format with a 110mm f/2.8 lens or a 4x5 large format with a 180mm f/4.5 (but with a much smaller system!) And we get a faster lens as a bonus.
Smaller formats lose some of that versatility of composition. The focal length of the normal lens on APS-C is 32mm. We would need f/0.8 lens to the same DOF. That's not possible on an SLR mount. Mirrorless systems with their shorter flange distances could get us there. But even then there are limits to how short the flange can be because image sensors become much less efficient as the angle of incidence of the light hitting them increases.