Please share your thinking for how you solved this—I am more interested in your thinking and your problem solving approaches then in just the answer.

Turns out, the video I saw was about a similar but not the same problem. The video still contains some ideas on how to approach this problem - but I think I've thought about it enough in the last 24 hours to provide my own take on it. :)

First, I like to check that I've completely understood the problem, and that the hints given are complete as well. In this case, there's a drawing with five pairs of circles, with the following configurations:

1. Separate

2. One containing the other

3. Touching on the outside

4. Touching on the inside

5. Intersecting

I can imagine one of the two circles being fixed, and the other being moved across it - and can't think of any other configuration unless they are a rotated or mirrored variant of an existing one. Apparently, these symmetries are supposed to be ignored, as is the relative sizes of both circles.

Then, I consider adding a third circle to the mix - and it occurs to me that this can be done in a generative way by taking the existing configurations for two circles and trying to add a third circle in all possible ways.

I like to think about the simplest possible example first, so instead of solving the problem for 3 circles, I try to create a ruleset that leads to all 2-circle configurations when applying it to the only configuration of one circle. Basically:

1. Draw a circle A

2. For all of the five possible ways for a circle to be positioned relative to A, draw that circle B.

I (obviously) get all the five results we already had, so this ruleset seems to work. How does it need to be rephrased to get from two to three circles?

1. Instead of having one circle A, we have a set of five configurations for circles A and B, so we change our first rule to "Iterate over all five configurations."

2. When placing a third circle, we need to check all five configurations relative to A, **AND** all five configurations relative to B. This means that our second rule needs to become "For all 5*5=25 ways for a circle to be positioned relative to A and B, draw this circle."

It seems to be possible to apply the same pattern to any number of circles: Take all configurations of n-1 circles, then iterate over all possible positions of the n-th circle relative to all n-1 others to get a new set of configurations.

At this point, it occurs to me that not all configurations are actually possible. For example, if A and B are in the "separate" configuration, it isn't possible to add a circle C so that A includes C and B includes C. I currently see no way to solve this other than to check each possible configuration manually. I wonder if this could be solved by some clever form of notation, but I don't really see it.