
The Mathematics of Tetris (2011) - jimsojim
http://math.stackexchange.com/questions/80246/the-mathematics-of-tetris?rq=1
======
jedberg
The top two answers are each interesting in their own way. The second answer,
about the alternating colors, shows an elegant proof by induction.

The first (And accepted) answer, shows how important it is to account for edge
cases! It also shows why legal contracts can be very long.

------
nitin_flanker
The first answer (5 Ts and 5 Ls) is quite interesting. Has anyone tried it
with only using Ts and not using any other piece? Can we clear the game with
even number of Ts?

------
cousin_it
I recently learned that the rules of Tetris are surprisingly subtle. For
example, depending on how piece rotation is implemented, it may or may not be
possible to clear three lines with a T piece ("T-spin triple").

~~~
Someone
I guess you are thinking of other orientations than straight up, as it is
trivial to clear three lines with a T-piece:

    
    
       .....TTT..
       ......T...
       ......T...
       ..........

~~~
zeeboo
That's not a T piece. It has 5 blocks. The subtlety is about a board like

    
    
        .XXXXXXXXX
        ..XXXXXXXX
        .XXXXXXXXX
    

and if you can put a T piece inside of the gap on the left.

~~~
Someone
Oops. My mind is more pentomino-oriented, I guess.

------
pavel_lishin
I don't understand this answer:
[http://math.stackexchange.com/a/80814](http://math.stackexchange.com/a/80814)

~~~
0xcde4c3db
Perhaps you had the same misunderstanding that I initially did: I thought that
the scenario was supposed to be a perfect clear with _exclusively_ T pieces,
but it actually allows any combination of other pieces. The answer is placing
five T pieces in a way that clears the line containing their "odd color"
tiles, then placing five L pieces to fill the remaining gaps.

~~~
T-hawk
Yes What happens is that blocks dropping from above a cleared line counteract
the parity problem created by the odd number of T's. 5 blocks (an odd number)
switch parity by moving one position orthogonally.

More generally, any odd number of line clears will reverse the parity of all
remaining blocks above, which can be an odd number.

