We analyze the problem of packing squares in an online fashion: Given an semi-infinite strip of width 1 and an unknown sequence of squares with side lengths in [0, 1] that arrive from above, one at a time. The objective is to pack these items as they arrive, minimizing the resulting height. Just like in the classical game of Tetris, each square must be moved along a collision-free path to its final destination; in addition, we may have to account for gravity in both motion and position (i.e, squares are not allowed to move up and any final destination has to be supported from below). This problem has been considered before; the best previous result is by Azar and Epstein, who gave a 4-competitive algorithm in a setting without gravity, based on ideas of shelf-packing, with the possibility of letting squares “hang in the air” in order to assign them to different levels, allowing an analysis that is reminiscent of some bin-packing arguments. We present an algorithm with competit...
Sándor P. Fekete, Tom Kamphans, Nils Schwee