I have an assignment on permutations and combinations topics. In that there is a question- The number of interior angles of a regular polygon is $150^\circ$ each. The number of diagonals of the polygon is _____.
Attempt
I don't know about any thing about the P&C method for diagonals. So I found the side as per the formula $$(n-2)(360^\circ)=(\theta)n$$ where $n$ is the number of side and $\theta$ as interior angle.
But the main problem came to be the diagonal part because I was not able to understand the logic given on platforms like MSE itself. (Maybe it is due to language problem because I am still learning English language.)
But I tried to count the polygon diagonal one by one to generate some pattern which may be useful. So I observed this-
In quads, if we start making diagonals then for first it will be $1$, then again $1$ and $0$ and $0$.
In pents, the similar process gave $2$ then again $2$ then $1$ and then $0$, and $0$.
In hexes, $3$ then $3$ then $2$ then $1$ then $0$ and again $0$.
Also, I observed that for the last two vertices it came to be $0$ always.
So observing this I first did in same way for hepts and after doing this I checked the answers for above cases in that formula $$\frac{n(n-3)}{2}$$. (Though I didn't understand how it was formed. And to my surprise, it came to be same. I even checked for $12, 13, 50, 40 \ldots$ It all gave the same value as that formula.
Now my doubt is What I observed is right but how? Also I wrote it in terms of $$2(n-3)+(n-4)+...+1$$ to give $$\frac{n(n-3)}{2}$$.
You can use inclusion-exclusion principle. Let $A_1A_2...A_n$ be the $n$-gon. $A_1$ can connect with $n-1$ vertices, $A_2$ can connect with $n-2$ vertices (note connection with $A_1$ was already considered) and so on $A_{n-1}$ can connect with only $1$ vertex $A_n$. Hence: $$(n-1)+(n-2)+\cdots +1=\frac{n(n-1)}{2}.$$ Now to find the number of diagonals, we must exclude the lines between the neighboring vertices, which is $n$: $$\frac{n(n-1)}{2}-n=\frac{n(n-3)}{2},$$ which is pretty much the same as mlerma54's answer.