# How many triangles exist in the diagonals intersections of an heptagon?

In a heptagon (not necessarily regular) with all its diagonals marked, how many triangles exist with two vertex at two diagonals intersections and sharing one vertex with the heptagon?

To see how many diagonals intersections exist, we just need to know that we need 2 diagonals for one intersection,so we need 4 vertex in total there are $$\binom{7}{4}=35$$ diagonals intersections. So i though there were $$7\cdot35\cdot34$$ triangles sharing one vertex with the heptagon and having the other two on diagonals intersections. Actually i don't find this correct at all because there are non-collinear diagonals intersections that you can select, and you're counting them as triangles. So i was trying to count the diagonals intersections in each diagonal and there are some with 4 and 6 but i don't think this to be efficiently at all. So i was wondering for any hint,or answer. thanks.

## 1 Answer

Assuming that you're fine with triangles whose sides are not, themselves, parts of the diagonals, that will be fine for a heptagon whose vertices are in general convex position: we just need to subtract off triangles with two points on a diagonal.

To do this as generally as possible: if we fix a vertex $P$, the number of degenerate triangles including that vertex is $2\cdot \binom{7}{5}$ (and $2 \cdot \binom{n}{5}$ in general). The reasoning:

• We get a degenerate triangle from two intersection points on a diagonal out of $P$.
• Each intersection point lies on another diagonal with two endpoints - one to the left of the first diagonal, and one to its right.
• This determines five vertices: the other endpoint of the diagonal through $P$, and both endpoints of each of the other diagonals.
• If we choose five vertices $A_1, A_2, A_3, A_4, A_5$ in that order around the circle, the diagonal through $P$ must be $PA_3$, and the two vertices must lie either on $A_1A_4$ and $A_2A_5$, or else on $A_1A_5$ and $A_2A_4$.

We multiply this by $7$ (by $n$) for all the possible ways to choose $P$.

So you want to take your original answer of $7\cdot \binom{7}{4}\cdot \left(\binom{7}{4}-1\right)$ and subtract $2 \cdot 7\cdot \binom{7}{5}$ for the final answer.

Although you asked specifically for non-regular heptagons, it's worth pointing out that for a regular heptagon, the problem is much worse. The first concern is that there might be triple intersections of diagonals: there aren't any for the regular heptagon, but there are some for the regular $n$-gon with larger $n$. The other problem is degenerate triangles like $\triangle ABC$ in the diagram below:

It's not even immediately obvious that $A$, $B$, and $C$ are collinear (they are), let alone how to count all such triples without actually going through the diagram and dealing with every degenerate triangle one at a time.

• I put not necessarily regular because the original problem asked for an irregular and the same, but with a 22-gon. Sorry. – SonodaUmi Apr 18 '17 at 18:23