3

On a circle there are $n$ evenly spaced points (i.e., they form a regular polygon). How many triangles can be formed when congruent triangles are considered the same?

This question is closely related to How many triangles can be formed by the vertices of a regular polygon of $n$ sides?, but here congruent triangles are considered to be the same.

maomao
  • 1,289
  • Have you attempted any examples for small $n$? Do you see a pattern? For each triangle type, can you find a standard form for that triangle? – Michael Burr Jun 16 '21 at 23:10
  • for n=3,4, clearly 1; for n=5, should be 2; for n=6, should be 3; etc. I think n=12 (clock), it should be 12, but I am not sure – maomao Jun 16 '21 at 23:31
  • http://oeis.org/A001399 – bof Jun 17 '21 at 00:13

2 Answers2

3

For each triangle $A_iA_jA_k$, the angles $\angle A_iOA_j$, $\angle A_jOA_k$ and $\angle A_kOA_i$ are respectively equal to $|j-i|\frac{2\pi}{n}$, $|j-k|\frac{2\pi}{n}$ and $|k-i|\frac{2\pi}{n}$ with $1\le i\ne j\ne k \le (n-1)$.

Let denote $$ \begin{cases} x=|j-i|\\ y=|k-j|\\ z=|k-i| \end{cases} $$

Then $$ \begin{cases} x+y+z = n \\ x,y,z \in \Bbb N^* \\ \end{cases} \tag{1} $$

The number of triangles when congruent triangles are considered the same is equal to the number of solutions of $(1)$ (Two solutions that differ only in the order of their summands are considered the same, for example, with $n = 4$: $1+1+2$ is the same as $2 +1 +1$).

The problem $(1)$ is solved here and the number of solutions of $(1)$ is the number of partitions $p(3,n)$ of $n$ into $3$ non-zero parts. The number of partitions $p(k,n)$ satisfies $$ \begin{cases} p(0,0) &= 0 \\ p(k,n) &= p(k,n-k)+ p(k-1,n-1) & \text{otherwise}. \\ \end{cases} \tag{2} $$ Remark: It seems that the recurrent formula in the answer is not correct, the recurrent formula $(2)$ is taken from the wikipedia here. From $(2)$, we can deduce the general formula of $p(3,n)$ as follows

  • For $k = 1$, it's obvious that $$p(1,n) = 1$$
  • For $k =1$, we have $$p(2,n) = p(2,n-2)+1 =... \implies p(2,n) = \left\lfloor \frac{n}{2} \right\rfloor$$
  • For $k = 3$, we have $$p(3,n) =p(3,n-3)+\left\lfloor \frac{n-1}{2} \right\rfloor=...$$

$$ \begin{align} \implies p(3,n) &=\left\lfloor \frac{n-1}{2} \right\rfloor+\left\lfloor \frac{n-4}{2} \right\rfloor+...+\left\lfloor \frac{n-1-3i}{2} \right\rfloor+... \\ & =\sum_{0 \le i \le \left\lfloor \frac{n-1}{3}\right\rfloor}\left\lfloor \frac{n-1-3i}{2} \right\rfloor \end{align} $$

Hence, the number of triangles is equal to $$p(3,n)=\sum_{0 \le i \le \left\lfloor \frac{n-1}{3} \right\rfloor}\left\lfloor \frac{n-1-3i}{2} \right\rfloor$$

Remark: The last steps have a lot of calculation, please feel free to correct if you find any mistake.

NN2
  • 20,162
  • $$\left\lfloor\frac{n^2+3}{12}\right\rfloor$$ – bof Jun 17 '21 at 00:54
  • @bof: does your formula come from oeis.org/A001399 ? If yes, perhaps, there is a way to simplify my formula to yours and a proof by recurrence will work. – NN2 Jun 17 '21 at 00:58
  • The formula in my comment is from my notebook from a combinatorics class I took many years ago. It was homework and I think I proved it by cases: $n\equiv0\pmod6$, $n\equiv1\pmod6$, etc. – bof Jun 17 '21 at 01:06
  • 1
    @bof Your formula can indeed be proved by cases for $n$ modulo $6.$ I've posted this as an answer. – David K May 10 '25 at 06:39
1

I find the language of counting triangles when congruent triangles are the same to be confusing, so I will rephrase the problem:

The set $T$ contains all triangles formed by selecting the vertices of a triangle from the vertices of a regular $n$-gon. Two triangles in $T$ are in the same equivalence class if and only if they are congruent. This partitions the set $T$ into $f(n)$ non-empty equivalence classes. What is $f(n)$?

Triangles without considering congruence

First of all, if we count every triangle separately (even if it is congruent to a triangle already counted), there are $\dbinom n3 = \dfrac{n(n-1)(n-2)}{6}$ triangles.

Now let's consider separately the equilateral triangles, non-equilateral isosceles triangles, and scalene triangles. I will count each subset by distinct triangles before counting equivalence classes, although the first step may seem unnecessary for some of the triangles. I think doing it this way makes the count of scalene equivalence classes easier.

Equilateral triangles

If $n$ is a multiple of $3$ there are $\dfrac n3$ equilateral triangles, counting distinct congruent triangles as individuals. Otherwise there are no equilateral triangles. Result:

$$ Q_\text{equilateral} = \begin{cases} \dfrac n3 & \text{$n$ divisible by $3$}, \\ 0 & \text{$n$ not divisible by $3$}. \end{cases} $$

All equilateral triangles of an $n$-gon are congruent, so the number of equivalence classes is $$ C_\text{equilateral} = \begin{cases} 1 & \text{$n$ divisible by $3$}, \\ 0 & \text{$n$ not divisible by $3$}. \end{cases} $$

Non-equilateral isosceles triangles

For $n$ not a multiple of $3,$ choose a vertex of the $n$-gon to be the apex of an isosceles triangle. If $n$ is even there are $n - 2$ remaining vertices that can be the two vertices of the base of the triangle; picking one such vertex determines the other vertex of the base, giving $\dfrac{n-2}{2}$ triangles with a given apex. Since the apex can be chosen $n$ ways, this is $\dfrac{n(n-2)}{2}$ triangles altogether. If $n$ is odd there are $n - 1$ remaining vertices for the base, giving $\dfrac{n-1}{2}$ triangles with a given apex, $\dfrac{n(n-1)}{2}$ altogether.

If $n$ is a multiple of $3$ then the previous method of choosing an isosceles triangle chooses each equilateral triangle in three ways. (It uses each vertex of the equilateral triangle as the apex of an isosceles triangle once.) Therefore the previous method overcounts the non-equilateral isosceles triangles by three times the number of equilateral triangles, that is, it overcounts by $n,$ and we must subtract $n$ from that result.

Over all cases this gives the result $$ Q_\text{isoscelesNE} = \begin{cases} \dfrac{n(n-2)}{2} & n \equiv \pm 2 \pmod 6, \\ \dfrac{n(n-1)}{2} & n \equiv \pm 1 \pmod 6, \\ \dfrac{n(n-4)}{2} & n \equiv 0 \pmod 6, \\ \dfrac{n(n-3)}{2} & n \equiv 3 \pmod 6. \end{cases} $$

Note that the sum $Q_\text{equilateral} + Q_\text{isoscelesNE}$ matches the result in this answer, which counts all isosceles triangles without excluding equilateral triangles.

There are $n$ triangles in each equivalence class containing an isosceles triangle, since such a triangle can be rotated in $n$ orientations on the $n$-gon, producing a distinct triangle each time. The number of equivalence classes is therefore $$ C_\text{isoscelesNE} = \frac{Q_\text{isoscelesNE}}{n} = \begin{cases} \dfrac{n-2}{2} & n \equiv \pm 2 \pmod 6, \\ \dfrac{n-1}{2} & n \equiv \pm 1 \pmod 6, \\ \dfrac{n-4}{2} & n \equiv 0 \pmod 6, \\ \dfrac{n-3}{2} & n \equiv 3 \pmod 6. \end{cases} $$

Scalene triangles

The number of scalene triangles is the total number of triangles minus the number of non-scalene triangles. Considering all the cases for equilateral triangles and non-equilateral isosceles triangles, when we remove all of these triangles from the $\dbinom n3$ triangles in $T$ we are left with $$ Q_\text{scalene} = \begin{cases} \dbinom n3 - \dfrac{n(n-2)}{2} & n \equiv \pm 2 \pmod 6, \\ \dbinom n3 - \dfrac{n(n-1)}{2} & n \equiv \pm 1 \pmod 6, \\ \dbinom n3 - \dfrac{n(n-4)}{2} - \dfrac n3 & n \equiv 0 \pmod 6, \\ \dbinom n3 - \dfrac{n(n-3)}{2} - \dfrac n3 & n \equiv 3 \pmod 6. \end{cases} $$

Simplifying each case, $$ Q_\text{scalene} = \begin{cases} \dfrac16 n (n - 2) (n - 4) & n \equiv \pm 2 \pmod 6, \\ \dfrac16 n (n - 1) (n - 5) & n \equiv \pm 1 \pmod 6, \\ \dfrac16 n (n^2 - 6 n + 12) & n \equiv 0 \pmod 6, \\ \dfrac16 n(n - 3)^2 & n \equiv 3 \pmod 6. \end{cases} $$

Each equivalence class contains $2n$ triangles, $n$ triangles that are rotations of a given scalene triangle and $n$ rotations of a reflection of that triangle. The number of equivalence classes is therefore $$ C_\text{scalene} = \frac{Q_\text{scalene}}{2n} = \begin{cases} \dfrac1{12} (n - 2) (n - 4) & n \equiv \pm 2 \pmod 6, \\ \dfrac1{12} (n - 1) (n - 5) & n \equiv \pm 1 \pmod 6, \\ \dfrac1{12} (n^2 - 6 n + 12) & n \equiv 0 \pmod 6, \\ \dfrac1{12} (n - 3)^2 & n \equiv 3 \pmod 6. \end{cases} $$

Equivalence classes

Now we can add up the equivalence classes of each kind: $C = C_\text{equilateral} + C_\text{isoscelesNE} + C_\text{scalene}.$ The result is $$ C = \begin{cases} \dfrac12 (n - 2) + \dfrac1{12} (n - 2) (n - 4) & n \equiv \pm 2 \pmod 6, \\ \dfrac12 (n - 1) + \dfrac1{12} (n - 1) (n - 5) & n \equiv \pm 1 \pmod 6, \\ 1 + \dfrac12 (n - 4) + \dfrac1{12} (n^2 - 6 n + 12) & n \equiv 0 \pmod 6, \\ 1 + \dfrac12 (n - 3) + \dfrac1{12} (n - 3)^2 & n \equiv 3 \pmod 6. \end{cases} $$

Simplified, this is $$ C = \begin{cases} \dfrac1{12} (n^2 - 4) & n \equiv \pm 2 \pmod 6, \\ \dfrac1{12} (n^2 - 1) & n \equiv \pm 1 \pmod 6, \\ \dfrac1{12} n^2 & n \equiv 0 \pmod 6, \\ \dfrac1{12} (n^2 + 3) & n \equiv 3 \pmod 6. \end{cases} $$

These are very similar formulas, just adding or subtracting different constants from $n^2$ before dividing by $12.$ This suggests that we can combine the formulas using the greatest integer (aka floor) function, something like $$ C = \left\lfloor\frac{n^2+q}{12}\right\rfloor. $$ If $q \geq 8$ this will give an incorrect result in the case $n \equiv \pm 2 \pmod 6$; if $q < 3$ this will give an incorrect result in the case $n \equiv 3 \pmod 6.$ But we get correct results in all four cases if $3 \leq q < 8.$ In particular, $$ C = \left\lfloor\frac{n^2+3}{12}\right\rfloor. $$

David K
  • 108,155