The meaning of pairwise non-adjacent triangles Let $P$ be a convex n-gon, where $n \ge 6$. Find the number of triangles formed by any 3 vertices of $P$ that are pairwise non-adjacent in $P$.
(Question 34 in Exercise 1, Principles and Techniques of Combinatorics by Chen Chuan_Chuong,Koh Khee Meng)
The answer is $\frac {n}3 \binom{n-4}{2}$.
My questions are:


*

*What is the meaning of pairwise-non-adjacent in $P$, and

*How to derive that formula?


Thanks!
Best Regards, Michael.

Pairwise non-adjacent: When you select the three vertices of $P$, no pair of them can be next to each other.

Let us number the vertices in order $1,\ldots,n$. Suppose you choose vertex $1$. You have $n-3$ choices for your second vertex (anything except $3,4,\ldots,n$).


*

*Case 1: second vertex is $3$ or $n-1$. Then you have $n-5$ choices for your third vertex.

*Case 2: second vertex is among $4,\ldots,n-2$. Then you have $n-6$ choices for your third vertex.


So, if you choose vertex $1$ first, then you have $2(n-5) + (n-5)(n-6) = (n-5)(n-4)$ ways to choose the other two vertices.
However, we can choose any vertex first, and the same argument works, so there are $n(n-5)(n-4)$ possible ordered outcomes of selecting three vertices.
Finally, we do not care about the ordering, so we divide by $3!$ to get
$$\frac{n(n-5)(n-4)}{6} = \frac{n}{3} \binom{n-4}{2}.$$
