# Making regions with 6 joined lines

What is the most number of enclosed regions^ you can produce by drawing 6 straight lines that are all joined end to end in sequence?

^ an enclosed region is the maximal region whose perimeter is formed by straight lines and contains no other enclosed regions.

I got

Ten.

I drew the pointy version of the heptagram and left a line out.

This maximises the number of line crossings (every line segment crosses all other line segments except its neighbours), and there are no coincident crossing points, so this should give the maximal number of enclosed regions.

## Post Scriptum (optimality, etc.)

The "Euler characteristic for a stick chain" is an interesting geometrical feature: essentially you can say that the number of enclosed areas is always going to be equal to the number of stick intersections. (Yeah, I went back and counted the ten intersections in the previous picture too.)

To show that property, let's start with a 2-stick chain. It's pretty obvious we can't get any intersections, and neither will we be able enclose any area with two straight lines.

When we add a third stick, we can choose to intersect two of the sticks. If we do, we enclose an area, and if we don't, well, then we don't. So at least up to three sticks, we're ok.

For the fourth stick, we have even more options, but now it's pretty easy to see that as long as we keep things sensible (no multi-stick crossing points, no (even partially) overlapping sticks), each new intersection either creates a new enclosed area outside the existing areas, or else it splits an existing enclosed area into two. This happens regardless of the position of the end of the stick chain we're extending, be it outside all areas, or enclosed within.

This keeps the number of intersections always equal to the number on enclosed areas.

## General Solution

To calculate the maximum number of separate enclosed areas with n sticks joined end to end, we should cross every stick pair we can. Naturally, we cannot cross any two sticks that are attached to each other at one end, but it turns out we can always build a pointy star shape like the one above, which will cross all the other pairs.

So now we only need to count the crossable stick pairs. n sticks can form $$\frac{n(n-1)}{2}$$ pairs, out of which $$n-1$$ are made of two sticks directly connected to each other. Subtracting those, we get that the maximum number of intersections, and thus, the maximum number of enclosed areas, is

$$\frac{n(n-1)}{2} - (n-1) = \frac{n(n-1) - 2(n-1)}{2} = \mathbf{\frac{(n-2)(n-1)}{2}}$$

• Is this the Krusty Krab? xD Jul 9, 2023 at 8:13
• No, this is 6 straight lines that are all joined end to end in sequence. ;-)
– Bass
Jul 9, 2023 at 8:39
• I believe this is optimal. Well done! Jul 9, 2023 at 11:35
• @DmitryKamenetsky It's maximum because each line is drawn successively in such a way so as to have a must intersection with all other previous lines, leading to maximum possible intersections. Jul 9, 2023 at 14:28
• @An_Elephant to be fair to OP, that argument is still missing the crucial step, where we'd demonstrate the "Euler characteristic for non-degenerate multi-hinge nunchucks", which says that the number of enclosed areas is always going to be exactly equal to the number of crossings. But yeah.
– Bass
Jul 9, 2023 at 21:29