# How many triangles are there?

The question is how many triangles are there in the following picture?

I have thought to solve it by creating a formula based on the angles of the lines starting from the bottom of each side. I don't get it right though. Any clues/ideas would be appreciated.

-
(+1) Good question. I used to wondered whether there was a relatively systematic way of doing those questions. –  Ragib Zaman Nov 10 '11 at 11:14
I found 110 up till now. How many are there? –  Raskolnikov Nov 10 '11 at 11:25
Still figuring it out. –  Dimme Nov 10 '11 at 12:25
"...there was a time when the study of configurations was considered the most important branch of all geometry." Anschauliche geometrie, Hilbert & Cohn-Vossen, p. 95. –  Robert Haraway Nov 10 '11 at 22:33
you can easily solve by: www.dillber.com/findtriangles –  user153627 May 27 '14 at 10:22

@Sp3000 is right, this is actually $PE-163$, and your particular case is given in the problem statement $T(2) = 104.$

But if you are looking for a general formula to count the number of triangles in higher order then check here, (spoiler for the original PE problem).

-
Thank you it was very helpful. –  Dimme Nov 10 '11 at 18:38

You can model this using the graph theory. Then make an algorithm that will solve the problem.

Every line that ends connecting more than one line is a node. Find all nodes. Then start from one and look for graphs that contain 3 elements.

-
Good answer. But solving this on paper seems taking quite some time. What if we try to create a formula. Each lines creates at least 2 triangles. The question is which lines to count? End-to-end? Hmmm thanks for your answer anyway. I will give it a try when getting home. –  Dimme Nov 10 '11 at 12:22

I think I found an easier solution for this specific problem without complicating it too much.

We have one basic kind of triangle, and that is the one that our big triangle contains 4 of. Let's call that order 1.

If we count the triangles inside order 1, we find out that they are 16. They are not so many so we can actually count them manually.

So long we have 16 triangles times 4, 64 triangles.

Now by combining 4 order-1 triangles we get new triangles that originate from the combination.

Lets count the new triangles for ONE side only. Be careful because some of them can be mirrored and some cannot. Actually there is only one that cannot be mirrored.

That gives us 13 new triangles for ONE side only from the combination of order 1 into order 2.

Now we have 13 more for every time we turn the big triangle around. So now we have:

16*4 + 13*3 = 103


Don't forget the big triangle!

16*4 + 13*3 + 1 = 104


Woho, solved! =)

-

Another longish way would be to label all vertices and check if all triples give you triangles.

-
+1, interesting approach. –  Emmad Kareem Nov 10 '11 at 14:09

This forms part of a problem on the Project Euler website and as you can see your particular example is $T(2) = 104.$

-
Thought I recognised it as a PE problem. –  Peter Taylor Nov 10 '11 at 13:10

Using Burnside's lemma, the number of triangles is equal to $6n-22$ where $n$ is the number of orbits of the action of $D_3$ on the set of triangles.

To count them, notice that :

• Every orbit contains one the four triangles in the bottom right-hand corner of the big triangle.
• Two triangles in the same orbit are isometric.

So you only need to count twenty-one orbits rather than one hundred and four triangles.

-