Hi everyone,
I noticed a recurring confusion (including mine) regarding counting triangles in polygons, especially in DS questions.
There are TWO very different questions that often get mixed up:
1) Triangulation of an n-sided polygon
This asks: Into how many triangles can the polygon be split WITHOUT overlap?
Rule:
Number of triangles = n − 2
Examples:
• Square (4 sides) → 2 triangles
• Pentagon (5 sides) → 3 triangles
2) Total number of triangles formed by choosing vertices
This asks: How many different triangles can be formed using the polygon’s vertices?
Rule:
Number of triangles = C(n,3)
Example:
Pentagon:
C(5,3) = 10 triangles
Important DS trap:
• n − 2 counts decomposition triangles
• C(n,3) counts ALL possible triangles (many overlap)
Similarly:
• Number of quadrilaterals = C(n,4)
→ A pentagon has C(5,4) = 5 quadrilaterals
This distinction helped me avoid wrong conclusions in DS where the question asks for “total number” vs “minimum decomposition”.
Hope this helps others avoid the same trap.
Happy to hear if anyone has seen this tested in a tricky way.