How to get the maximum perimeter in a set of straight squares? The problem is as follows:

Rudy has a toy set which consists of $11$ squares. All of them are equal
in size. The lenght of each edge is equal to $\textrm{1 cm.}$ Assuming
he's been given the instruction to make with those, plane figures that
are made up of squares joined by a complete side. If at the end of the
day he succeeds and builds one such figures whose perimeter is
maximum. What is the value of such perimeter?

The alternatives given in my book are as follows:
$\begin{array}{ll}
1.&\textrm{24 cm}\\
2.&\textrm{26 cm}\\
3.&\textrm{28 cm}\\
4.&\textrm{22 cm}\\
\end{array}$
I'm not very sure on this question. The situation is that the kid has been given the task to make different figures using 11 squares, given that these must share a full side or in other words two squares must be glued together not counting corners then he succeeds into making those figures. But it just happens that he makes one peculiar figure which has the largest possible perimeter.
But how to get that?. My first guess is that the only possible way to make a figure given those conditions is to put the squares one next to each other.
Given this it would follow that:
$1*11*2+2=24\,cm$
But I don't know if this should be the right answer?. Is it possible to make a larger figure with those requirements?. Is there any way to ensure that's the only way to maximize the perimeter?.
Can someone help me here?. Please try to include a figure in the answer I don't know but it seems that this may need it to justify the situation.
 A: The perimeter will be
$$(11 \times 4) - 2j$$
where $j$ is the number of joins.  That is, each time one square is joined with another, 2 of the sides become internal and thus not part of the perimeter.  Since you start with 11 squares, there must be at least 10 joins.
Addendum
Responding to the OP's comment/question:
I do agree with the OP's solution, since the minimum value for
$j$ is $10$, and since $(11 \times 4) - (2 \times 10) = 24.$  I actually just made up the formula from intuition.  Suppose that two squares are joined.  Then the perimeter has changed from $8$ to $6$, because the (two) joined edges have become internal.
Imagine using 9 squares to form a $3 \times 3$ larger square.
The perimeter, which is equal to $(4 \times 3),$ can be computed by noticing
that in each row there are $2$ joins and that there are $3$ joins between both
the 1st and 2nd row and between the 2nd and 3rd row.  Therefore, the  perimeter
will equal $(9 \times 4) - \{2 \times [(3 \times 2) + (2 \times 3)]\} = 12.$
The underlying idea is merely that each join causes exactly two sides to become internal.
A: There are $4 \times 11 = 44$ edges in total. To attach two squares uses up two edges. You must make $10$ attachments. That leaves
$44-2\times 10 = 24$ edges for the perimeter.
That will be the perimeter of any figure made from all the squares that does not circle back on itself.
A: The "one such figure" with maximum perimeter should obviously use all squares - otherwise you can add a square somewhere and increase the perimeter.
And you should expose as much of each square's edges as possible on that perimeter. With two joined squares, you don't have an option; both squares show three of their edges of the figure perimeter for a total of $6$ cm. However whenever you add another square, you always lose at least the side that you connect it with and one of the edges in the smaller figure. So every additional square can only gain you $2$ cm of perimeter. (and you can gain less than $2$ cm, or even lose perimeter length, if you connect a new block to more than one side of the smaller figure, such as when you "fill a gap" in some way, e.g. to make a $2\times2$ block or form a loop).
So for three squares you can get $8$ cm of perimeter; for four squares $10$ cm, etc. but not more. Most straightforwardly you can do this with the squares attached in a straight line, but this is not required - any figure that doesn't close a loop or form a $2\times2$ block should work.
A: Think of the classic "Snake" game. As long as the snake does not have any part of its body adjacent to any other part, then it will be a figure with maximum perimeter. The straight line is just one option. If any part of its body does become adjacent to another part, you lose that part of the perimeter. And since all 11 pieces have to be connected, this is indeed the best you could do.
A: You would think the greatest perimeter would be when they are all in a row. That way, there would be $11$ on each side plus $2$ ends for a total of $24$.
If you arrange them as in the picture below where each internal corner counts as $2$ sides, you can see that we have a total of $9$ corners, $2$ tops, $1$ bottom, and $3$ ends for a total of $24$

I believe that, no matter how you arrange them, the greatest perimeter is $24$ because the total number of sides is $44$, each $9$ of them must have $2$ side hidden for $-18$ and $2$ will have only $1$ side hidden for $-2$ giving $\quad 44-18-2=24.\quad $ Other arrangements yield the same MAX.

