I am currently coding an algorithm which places a list of Tetrominos (tetris pieces) in the smallest square possible.
My question is : is there a mathematical way to know the maximum size (upper bound) of the square knowing that :
Tetrominos consist of 4 squares, each one being adjacent to at least 1 other one
I do not get to rotate the Tetrominos
The square can have holes, it does not get to be perfect
For now I assumed that max_size = min_size + 2, where min_size = sqrt(nbr_pieces * 4) (rounded up), but I do not see how to prove it right or wrong.
PS : as it is my first post in this forum, please tell me if I need to change tags for this question
No, because there is no maximum size that works for all combinations of tetraminoes.
If you have two T-tetraminoes in the same orientation, you need a $4 \times 4$ square to fit both, but if you have two L-tetraminoes with opposite rotations, you only need a $3 \times 3$ square.