Pythagorean circles

Here’s yet another Catriona Shearer problem:

But let’s start with a related picture, one with only two circles:

Again, the circles have unit radius. What are the dimensions of the rectangle?

The key to figuring this out is that if you have two lines through a point both tangent to a circle, then the line segments from the intersection point to the tangent points are congruent. We know the distance from the top right corner of the rectangle to the top tangent point on the yellow circle is 3. We don’t know the distance from the bottom right corner of the rectangle to the left tangent point on the yellow circle; call it x. Then the length of the diagonal is 3+x. By Pythagoras,

(3+x)^2 = 4^2+(1+x)^2

whose solution is x=2. So the height of the rectangle is 3, its width is 4, and its diagonal is 5: the diagonal and two sides make a 3:4:5 triangle, where 3:4:5 is a Pythagorean triple.

You can do the 3-circle problem the same way; here the length of the diagonal is 5+x, the equation is

(5+x)^2 = 6^2+(1+x)^2

whose solution is x=3/2. The rectangle then is 2.5 by 6 with diagonal 6.5. Those three numbers are in the proportion 5:12:13, another Pythagorean triple!

Coincidence? No. Of course if x is rational then the lengths of the sides and diagonal are in the proportion of a Pythagorean triple. But in general, with n circles, does x have to be rational? You might expect not. However, the solution for n circles is given by

(2n-1+x)^2 = (2n)^2+(1+x)^2

whose solution is

x = \frac{n}{n-1}

So the rectangle height:width:diagonal is

1+\frac{n}{n-1} : 2n : 2n-1+\frac{n}{n-1}


\frac{2n-1}{n-1} : \frac{2n(n-1)}{n-1} : \frac{2n(n-1)+1}{n-1}

which is the integer proportion 2n-1 : 2n(n-1) : 2n(n-1)+1, scaled by n-1. That’s a Pythagorean triple, and in particular it’s a triple in which the hypotenuse is one greater than the longer side. For four circles, for example, the triple is 7:24:25 and the rectangle’s dimensions are 7/3 by 8.

Semicircles, semi mysterious

This puzzle by Catriona Shearer has been driving me nuts today:

I stared at a while, didn’t come up with anything good, and finally gave up and started looking at the solutions people were posting. They fell into three categories: Answers with no real attempt to show reasoning; algebraic solutions that were kind of opaque and didn’t really give any insight; and geometric solutions that depended on assertions I couldn’t see a justification for.

I still haven’t seen a solution that makes me particularly happy.

The geometric solutions in particular mostly looked like they assumed the left small semicircle’s base makes a 45° with the large semicircle’s base (or something equivalent). Which it does, but how do you know it does? In particular, it appeared people were assuming the square diagonal and the perpendicular bisector shown below are the same; in this diagram they’re not, because the large “semicircle” is really a semiellipse, but how do you know they do coincide when it’s a semicircle?

The clearest solution posted which I felt didn’t make any unjustified assumptions was Bilal Aydin’s. Here’s my version of it.

Let the radii of the small and large semicircles be r and R. In the following diagram D is the center of the large semicircle, B is the center of the small one on the left, and E is the center of the small one on the right. C is the point where the base of the large semicircle is tangent to the angled semicircle, and radius BC is perpendicular to that base. Since the base of the angled semicircle is a chord of the large one, its perpendicular bisector passes through B and D.

Then BE=2r and BC = r so CE = \sqrt{3}r. Let DE=x=R-r. Now (BD)^2 = r^2+(\sqrt{3}r-x)^2. AB=r, so AD^2 = r^2+r^2+(\sqrt{3}r-x)^2. But AD = R. So

r^2+r^2+(\sqrt{3}r-x)^2 = (r+x)^2

2r^2+3r^2-2\sqrt{3}rx+x^2 = r^2+2rx+x^2

4r^2= 2rx(1+\sqrt{3})

x = 2r/(1+\sqrt{3}) = r(\sqrt{3}-1)

And then R = x+r = \sqrt{3}r. So the large semicircle is three times the area of each small one; the shaded area is 2/3 of the whole.

That works, but it’s very mysterious. Stuff cancels on both sides for no obvious reason. And if you try to figure out CD = \sqrt{3}r-x you find it’s just r, which means triangle BCD is isosceles and the angled semicircle’s base is 45° from the large semicircle’s base. Those seem like things that should be easy to prove geometrically, and yet… how?

Four hexagons

I had to stare at this puzzle a good long time before I got it:

I had a very hard time figuring out where to start. What finally broke it for me was getting rid of unnecessary complications. For instance, in both the white and the yellow hexagons, three of the vertices don’t enter into the problem. You can replace those hexagons with triangles.

Likewise only two vertices of each of the other two hexagons are important; you can replace them with line segments.

Once you’ve done that the solution becomes obvious, in the sense of “I only had to stare at it another five minutes before saying ‘oh duhh'”. These two line segments are congruent.

As are these two.

These two angles are congruent, since both differ from 60° by the same amount.

So these triangles are congruent.

Now put back the original hexagons.

A side of one hexagon is congruent to a diameter of the other, so it’s twice a side of the other, so the areas of the two hexagons are in a 4:1 ratio. The “pink” (or I’d call it magenta) hexagon’s area is 48.

Identity 2

This is prompted by another Catriona Shearer puzzle. Would you say it’s at all obvious that

2 \arctan (\sqrt{3}/7) = \arccos (23/26) ?

Me neither. True, though. Look at this triangle:

By the law of cosines, 3 = 13 + 13 - 2\times13\cos(\theta) so \theta = \arccos (23/26). But if you slice that triangle in half, you find its height is 7/2 and so \theta = 2\arctan(\sqrt{3}/7).

More generally, the half angle formula for the tangent is

\tan(\theta/2) = \frac{\sqrt{1-\cos\theta}}{\sqrt{1+\cos\theta}}


\cos\theta = \frac{1-\tan^2(\theta/2)}{1+\tan^2(\theta/2)}.

Then if \theta/2 = \arctan(a/b),

2\arctan\left(\frac{a}{b}\right) = \arccos\left(\frac{b^2-a^2}{b^2+a^2}\right)

and with a=\sqrt{3}, b=7 you get 2\arctan(\sqrt{3}/7) = \arccos(46/52) = \arccos(23/26).


While struggling with a Catronia Shearer problem I stumbled across a proof of the trig identity

\cos^2\theta = \frac{1}{2}(1+\cos 2\theta)

which I hadn’t seen and probably wouldn’t have thought of if I’d been looking for it, though there’s nothing non-obvious about it in retrospect. Here it is. Draw a unit semicircle centered on O, with A and C the endpoints of the diameter. Draw chords AD and DC. (Angle ADC is a right angle.) Let angle CAD be \theta. By the Inscribed Angle Theorem, angle COD is 2\theta. Drop a perpendicular from D to the diameter at B.

Now \mathrm {AO} = 1 and \mathrm {OB} = \cos 2\theta, so \mathrm {AB} = 1+\cos 2\theta. But \mathrm {AC} = 2 so \mathrm {AD} = 2 \cos \theta, so \mathrm {AB} = 2 \cos^2 \theta. Therefore \cos^2\theta = \frac{1}{2}(1+\cos 2\theta).

Skew your Legos

The Lego architecture photo blog Archbrick Daily recently featured this Micropolis City Swim Center by Little Brick Root:

Unusually for a Lego model (or for a real world building, for that matter) the structure is at an angle relative to the base. Of course you can do that sort of thing by covering the base with flat tiles, except for one single stud:

Then the structure can be at any angle, rotating around that stud. For that matter you could cover the entire base with flat tiles and just put the structure on top in any position or orientation, but that’s rather susceptible to jostling, isn’t it? So is the single stud connection, though less so.

(There also are Lego pieces with built in angles, such as this one:

But let’s just consider normal rectilinear bricks and plates for now.)

But maybe you want a rigid connection. If you happen to want an angle of, oh, I don’t know, let’s say 36.87°, you can do that, Make a base with two studs three rows and four columns apart:

The distance in stud units between the two studs is \sqrt{3^2+4^2}=5, an integer, so for instance a 1 by 6 brick can be placed on the two studs. If you want other angles you can look for other primitive Pythagorean triples to use. (Primitive meaning it’s not just another triple scaled up: (6, 8, 10), for instance, is a triple, but it’s just twice (3, 4, 5), and makes the same angle.)

The angles you get have rational values for their sine, cosine, and tangent. If you want 45°, you’re out of luck; sin(45°) is irrational. You can get pretty close, though, with for instance the triple (20, 21, 29). That gives an angle of 43.60°.

But if you want a small angle, like the Swim Center model, what do you do? Another way to think about it is, you want a triangle where the long side is nearly as long as the hypotenuse. With Pythagorean triples, the best you can get is a hypotenuse 1 unit longer than the long side.

A general formula for triples is a=v^2-u^2, b=2uv, c=v^2+u^2 where u and v>u are coprime and opposite parity (one even, one odd). Here obviously the smallest difference between a and c is 2, so we want c-b = 1 = v^2+u^2-2uv = (v-u)^2. So v=u+1 and a=2u+1, b=2u^2+2u, c=2u^2+2u+1. The first several of these are:


You can see you have to make a fairly large model if you want a rigid angle of less than 10° — more than 40 studs wide, if you use conventional plates and bricks. There are “jumper” plates, though, that give access to half integer spacing, meaning you’d need only half the width.

You can get smaller angles by stacking triples. For instance, you can mount a plate at 36.87° to the base using (3, 4, 5), then mount a plate to that at -16.26° using (7, 24, 25), then mount a plate on top of that also at -16.26° giving a net angle of 4.35°. The stacked plates can hide inside the structure so all you see is the base and the structure rotated 4.35°.

The ground floor of the Swim Center is 24 studs wide, meaning the largest distance between stud receivers is 46 half studs, accommodating no triples with angles smaller than 12.68°. The actual angle of the model is about 5°. So maybe Little Brick Root used angled Lego pieces (I don’t know of any with that small an angle, but maybe) or stacked triples, or maybe (mostly likely is my guess) only a single stud connection to the base. But not a rigid connection based on a single triple, that’s for sure.

Euler plays Ingress

In the game Ingress you capture portals (by visiting real world locations), and then you can link pairs of portals together. You get points for doing that. If three portals are mutually linked with three links, forming a triangle, then they make a control field, and that’s a good thing if only because you get a lot of points for doing that. So if you’re trying to level up, one way is to find a lot of portals close together and circulate between them, capturing them and linking them.

One rule of linking, though, is that links can’t cross. If you want to link two portals, and a straight line segment between them intersects some other link, then tough luck: you can’t link them.

(Technically, if the Earth is regarded as a sphere, presumably links are great circle segments and control fields are spherical triangles. But for our purposes we pretend we’re working in a plane. Links are line segments, control fields are Euclidean plane triangles.)

So a question you might ask is, for some collection of portals, is there an optimal way to link them? Can you make more links or more control fields if you do it one way than if you do it another?

Answer: No. If you start creating links, and keep adding links until no more links are possible, then regardless of how you decide which links to make, you always get the same number of links, and the same number of control fields.

And how many is that?

You get the answer using the Euler characteristic. For any convex polyhedron,

F - E + V = 2

where F, E, and V are respectively the number of faces, edges, and vertices the polyhedron has. A cube, for instance, has 6 faces, 12 edges, and 8 vertices:

6 - 12 + 8 = 2 .

What do polyhedra have to do with portals? Well, the same idea applies to any connected planar graph (a graph with non crossing edges), which can be thought of as the shadow of a polyhedron, provided you realize every region of the plane bounded by edges is a face, including the region extending to infinity. So this graph

also has 6 faces, 12 edges, and 8 vertices, if you count as faces the central quadrilateral, the four quadrilaterals surrounding it, and the infinite region surrounding them.

Viewed as linked Ingress portals, though, it’s not maxed out; in fact, there are no control fields because none of the polygons are triangles. So you can add more links until you have, for instance

and now there are 11 faces, 17 edges, and 8 vertices; 11-17+8=2.

But to maximize links and control fields, all the polygons in the graph, except the external one, must be triangles. Each of the F-1 triangular faces has 3 edges. But E\ne 3(F-1), because where two triangles adjoin, a single edge is one of the bounding edges of both triangles. It serves as two edges, in a way. On the other hand, edges of triangles along the boundary are shared with the external polyhedron. So if we regard the external polyhedron as contributing zero edges then each internal triangle (not along the boundary) contributes 3/2 edges, and each boundary triangle contributes 2 edges. Or

E = \frac{3}{2}N + \frac{1}{2}N_b

where N=F-1 is the number of triangles and N_b is the number of boundary triangles, which is the same as the number of edges or vertices in the bounding polygon (which is the convex hull of all the vertices). Solving for N,

N = \frac{2}{3}(E-\frac{N_b}{2})

Then combining with the Euler characteristic,

\frac{2}{3}(E-\frac{N_b}{2})+1-E+V = 2



In the above diagram, V = 8 and N_b = 4 so E = 24-4-3 = 17, which is what we see. This tells us no matter how we link portals, once we’ve made all possible links, the number of links we end up with is the same. And the number of control fields, N, is

N = \frac{2}{3}(3V-N_b-3-\frac{N_b}{2}) = 2V-N_b-2

And again in the above diagram, N = 2\times 8-4-2 = 10 which is correct. No matter how we link a given set of portals, we end up with a fixed number of control fields. All that matters is the number of portals, and the number in the convex hull.