array of points, each of which is 1 unit away its nearest neighbours . Determine the number of non-degenerate triangles ( i.e. triangles with positive area ) whose vertices are points in the given array.
There is a
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
image
We proceed by negation. First we select 3 points from the 5 × 4 = 2 0 points. This can be done in ( 3 2 0 ) ways. From this we will subtract the degenerate cases, that is, the line segments.
There are four types of degenerate triangles.
Horizontal
Vertical
Diagonal
With slope ± 1 / 2 (for example, the line segment formed by joining A4, C3, and E2).
Number of horizontal degenerate triangles = 4 ⋅ ( 3 5 )
Number of vertical degenerate triangles = 5 ⋅ ( 3 4 )
Number of diagonal degenerate triangles = 4 ⋅ ( ( 3 4 ) + 1 )
For this, count their number in the triangle with vertices (E1 , B4, E4) and multiply by four as there are four such triangles.
Number of degenerate triangles with slope ± 1 / 2 = 4
Therefore, number of non-degenerate triangles = ( 3 2 0 ) − [ 4 ⋅ ( 3 5 ) + 5 ⋅ ( 3 4 ) + 4 ⋅ ( 3 4 ) + 4 ⋅ 1 + 4 ] = 1 0 5 6