Points arranged in array...!

There is a 4 × 5 4 \times 5 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.


Try more combinatorics problems.


The answer is 1056.

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.

2 solutions

Pratik Shastri
Nov 12, 2014

image image

We proceed by negation. First we select 3 3 points from the 5 × 4 = 20 5 \times 4=20 points. This can be done in ( 20 3 ) \binom{20}{3} 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 \pm 1/2 (for example, the line segment formed by joining A4, C3, and E2).

Number of horizontal degenerate triangles = 4 ( 5 3 ) =4 \cdot \binom{5}{3}

Number of vertical degenerate triangles = 5 ( 4 3 ) =5 \cdot \binom{4}{3}

Number of diagonal degenerate triangles = 4 ( ( 4 3 ) + 1 ) =4 \cdot \left(\binom{4}{3}+1\right)

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 \pm 1/2 = 4 =4

Therefore, number of non-degenerate triangles = ( 20 3 ) [ 4 ( 5 3 ) + 5 ( 4 3 ) + 4 ( 4 3 ) + 4 1 + 4 ] = 1056 \begin{aligned} &=\binom{20}{3}-\left[4 \cdot \binom{5}{3}+5 \cdot \binom{4}{3}+4 \cdot \binom{4}{3}+4\cdot 1+4\right]\\ &=\boxed{1056} \end{aligned}

Very nice solution. thank u for posting it. :)

Sandeep Bhardwaj - 6 years, 7 months ago

I was too close. Anyway nice solution.

swapnil rajawat - 6 years, 5 months ago

Was completely defeated with slope +-1/2. Good solution

Chandrachur Banerjee - 6 years, 4 months ago
Canwen Jiao
Aug 1, 2018

Here's a python implementation of this problem:

def find(A):
    result = []
    for i in A:
        for j in A:
            for k in A:
                if valid(i, j, k):
                    result.append([i,j,k])
    return len(result) / 6   # divide by 6 since each triangle is counted 3! times

def valid(a, b, c):
    if a == b or a == c or b == c:
        return False
    if a[0] == b[0] == c[0]:  # three points are on the same horizontal line
        return False
    elif b[0] == a[0] or c[0] == b[0] or a[0] == c[0]:  # to avoid division by 0 in the next step
        return True
    # three points are on the same line
    if (b[1] - a[1])/(b[0] - a[0]) == (c[1] - b[1])/(c[0] - b[0]):
        return False
    return True

def generate(): # generate all 20 coordinates
    result = []
    for i in range(4):
        for j in range(5):
            result += [(i,j)]
    return result

A = generate()
print(find(A))

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...