How many triangles can be formed by the vertices of a regular polygon of $n$ sides? 
How many triangles can be formed by the vertices of a regular polygon of $n$ sides? And how many if no side of the polygon is to be a side of any triangle ?

I have no idea where I should start to think. Can anyone give me some insight ?

Use Combination or Permutation
 A: total no of triangles formed by joining vertices of n-sided polygon
$$= \frac{n(n-1)(n-2)}{6}$$
i.e. selection of 3 points from n points = n(C)3
$\implies$ can also be written as sum of no of triangles formed in the following three cases,
1) no of triangles with only one side common with polygon,
if we take any one side of a n-sided polygon and join its vertices to the remaining vertices, except the vertices adjacent to vertices of the line taken above, we get triangles with only one side as common i.e. for 1 side we get (n-4) triangles $\implies$ n(n-4) triangles for n sides.
case I
2) no of triangles with two sides common,
if we take any one side of a n-sided polygon join its vertex with its opposite vertex required triangle is formed. Hence no of triangles= n
case II
3) triangles with no side common
$$= \text{total - (Case I + Case II)}$$
$$=\left[\frac{n(n-1)(n-2)}{6}\right]-\left[n(n-4) + n\right]$$
$$=\frac{n(n-4)(n-5)}{6}$$
A: Consider a regular polygon with $n$ number of vertices $\mathrm{A_1, \ A_2,\ A_3, \ A_3, \ldots , A_{n-1}}$ & $\mathrm{A_{n}}$
Total number of triangles formed by joining the vertices of n-sided regular polygon $$N=\text{number of ways of selecting 3 vertices out of n}=\color{}{\binom{n}{3}}$$ $$N=\color{red}{\frac{n(n-1)(n-2)}{6}}$$
$\forall \ \ \color{blue}{n\geq 3}$
Consider a side $\mathrm{A_1A_2}$ of regular n-polygon. To get a triangle with only one side $A_1A_2$ common (As shown in figure-1 below)
 (figure-1)
Join the vertices $A_1$ & $A_2$ to any of $(n-4)$ vertices i.e. $A_4, \ A_5,\ A_6, \  \ldots \ A_{n-1}$ to get triangles with only one side common. Thus there are $(n-4)$ different triangles with only one side $A_1A_2$ common. Similarly, there are $(n-4)$ different triangles with only one side $A_2A_3$ common & so on. Thus there are $(n-4)$ different triangles with each of $n$ sides common.
Therefore, number of triangles $N_1$ having only one side common with that of the polygon $$N_1=\text{(No. of triangles corresponding to one side)}\text{(No. of sides)}=\color{blue}{(n-4)n}$$
 (figure-2)
Now, join the alternate vertices $A_1$ & $A_3$ by a straight (blue) line to get a triangle $A_1A_2A_3$ with two sides $A_1A_2$ & $A_2A_3$ common. Similarly, join alternate vertices $A_2$ & $A_4$ to get another triangle $A_2A_3A_4$ with two sides $A_2A_3$ & $A_3A_4$ common & so on (as shown in above figure-2). Thus there are $n$ pairs of alternate & consecutive vertices to get $n$ different triangles with two sides common (Above fig-2 shows $n$ st. lines of different colors to join alternate & consecutive vertices). Therefore, number of triangles $N_2$ having two sides common with that of the polygon $$N_2=\color{blue}{n}$$
If $N_0$ is the number of triangles having no side common with that of the polygon then we have $$N=N_0+N_1+N_2$$ $$N_0=N-N_1-N_2$$ $$=\binom{n}{3}-(n-4)n-n$$ $$=\color{}{\frac{n(n-1)(n-2)}{6}-n^2+3n}$$
$$N_0=\color{red}{\frac{n(n-4)(n-5)}{6}}$$
The above formula $(N_0)$ is valid for polygon having $n$ no. of the sides such that $ \ \ \color{blue}{n\geq 6}$
A: The number of triangles with two sides common with regular polygon having $n$ number of sides $$=\text{number of sides in polygon}=n$$
There are $n-4$ options to form  triangle with one side common with polygon therefore the number of triangles with one side common with regular polygon having $n$ number of sides $$=n(n-4)$$
Total number of triangles formed by joining the vertices of regular polygon having $n$ number of sides $$=^{n}C_3$$
The number of triangles with no side common with regular polygon having $n$ number of sides $$=^nC_3-n-n(n-4)$$
A: To solve this lets break this problem into $3$ parts:
Part 1:
Total number of triangles that can form without any restrictions$=nC3$
[choosing three points from $n$ points]
Part 2:
Let us choose triangles with $1$ side common with the polygon.
Total number of such triangles$=nC1*(n-4)C1$
[By $nC1$ we are choosing any side of the polygon(which is going to be a side of the triangle) and by $(n-4)C1$ we are choosing the vertex of triangle opposite to the line chosen.There we have used $(n-4)$ as the points on the line and the neighbouring points are excluded,because we are not dealing with two common sides here]
Part 3:
Here we are choosing triangles with two sides common to the polygon.
We can do this by $nC1$ ways .
[We are choosing the vertex common to the two common sides,which can be done in $nC1$ ways.]
So if we subtract the part $2$ and $3$ from part $1$ we will get our desired result.
Thus the final result is $nC3-nC1*(n-4)C1-nC1$
