# Largest rectangle from 20 Lego bricks

You have twenty 2x4 Lego bricks, like the one shown below

What is the area of the largest rectangle you can make satisfying the following conditions:

• All bricks must be connected in a single structure that holds together when lifted.
• The bottom layer of the structure must form the rectangle that can lie flat on a table. The rectangle cannot have any gaps (must be filled).
• A pair of bricks is connected if they are interlocked by at least 2 studs per brick.
• Are we assuming no physics complications where the structure is interlocked by not strong enough to hold itself? Jun 23 '21 at 14:03
• Yes you can ignore physics. Assume that studs interlock strongly like with super glue. Jun 23 '21 at 14:04
• Just to clarify if I attach the corner of one piece under the corner of another piece, those two pieces are considered 'not connected' because they are joined by only a single stud, correct? Jun 23 '21 at 14:33
• Does the rectangle have to be solid or can it be just an outline? Jun 23 '21 at 15:31
• @hexomino that's correct. I chose this rule to avoid pieces swiveling freely. Jun 23 '21 at 17:50

Assuming the rectangle is meant to be filled we can do

15

bricks or

120

studs.

    aaaABbbBCccc
aaaABbbBCccc
ddeEFfgGHhii
ddeEFfgGHhii
dDEefFGghHIi
dDEefFGghHIi
jJKklLMmnNOo
jJKklLMmnNOo
jjkkllmmnnoo
jjkkllmmnnoo


shown are studss of the base layer; same letter means same brick; small means free, capital means brick on top

This is optimal because

each linking brick can link a maximum of 4 base bricks. Incrementally, that means it can link a maximum of 3 new blocks to an existing structure. If we had four or fewer linking bricks the base layer could therefore contain no more than 13 bricks. Five or more connecting bricks leave 15 or fewer base layer bricks.

• Nice. I had missed the hybrid combination and had assumed only regular arrangements of the base. Jun 23 '21 at 15:43
• Brilliant answer as always! Jun 23 '21 at 18:14

112 studss

Reasoning

You can do 4 (wide) x 28 (high) studs (112 studs) with 2x7 (portrait) blocks which are held in the middle by 6 blocks in the same orientation.

Let's try for an upper bound on possible solutions.

if you had 16 2x4 blocks on the ground, you would need at least 32 studs for blocks on the second layer to hold them. That immediately takes 4 more blocks (total 20). But those connecting block would be full, e.g they only link 4 blocks together which are themselves not linked to anything else. So it would fall apart.

if you want 15 blocks on the ground, the only rectangles are 3x5. By manual inspection I failed to find one solution. Maybe I missed it and there's a 15 blocks solution.

• Because they're 2x4 blocks, wouldn't 2x7 bricks = 4x28 studs? Jun 23 '21 at 14:49
• lol, math fail. Corrected. Jun 23 '21 at 14:50
• It should be hidden, I added an edit to do so. Jun 23 '21 at 15:58