GATE / CS ARCHIVE

GATE CSE 1998 / QUESTION 10(a)

Induction for polygon diagonals

Discrete Mathematics · Proof Techniques & Number Theory · Full GATE CSE 1998 paper

GATE 1998, Q10(a) Descriptive
Report issue

Proof Techniques & Number Theory

Question 10(a), GATE 1998: Prove by induction that an n-sided polygon has n(n−3)/2 diagonals.
Question 10(a), GATE 1998: Prove by induction that an n-sided polygon has n(n−3)/2 diagonals.
Tap to enlarge
Answer & solution

Answer: D_n=n(n−3)/2 for n≥3. (no official key was published)

A diagonal joins two nonadjacent vertices; count all such vertex pairs, regardless of where segments lie for a nonconvex polygon. Let Dn be their number. A triangle has no diagonals, and 3(3−3)/2=0, establishing the base case.

Assume Dn=n(n−3)/2 for an n-gon. Insert a new vertex v between two formerly adjacent vertices u and w, replacing the boundary edge uw by the two boundary edges uv and vw. All old diagonals remain diagonals. The former edge uw becomes one additional diagonal. The new vertex v can be joined by diagonals to the n−2 old vertices other than its two neighbors u and w. Thus the increase is 1+(n−2)=n−1, not merely n−2.

Therefore Dn+1=Dn+n−1=n(n−3)/2+n−1=(n²−n−2)/2=(n+1)(n−2)/2. This is the required formula with n replaced by n+1, completing induction.

As a consistency check, choosing any pair of vertices gives n(n−1)/2 segments; subtract the n boundary edges to obtain n(n−3)/2. For n=4 the count is 2 and for n=5 it is 5, agreeing with the recurrence. The insertion argument's old-edge contribution is the usual subtle point in this induction.

Original paper, page 6