Triangles in the grid

How many triangles can you make using points on this 5 × 5 5\times 5 square grid as their vertices?

Note : Some of the triangles can be congruent, and they can overlap one another.

Three possible triangles are shown. Three possible triangles are shown.


The answer is 2148.

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.

5 solutions

Δrchish Ray
May 6, 2018

There are ( 25 3 ) {25 \choose 3} or 25 24 23 3 2 1 \frac{25*24*23}{3*2*1} which is 2300 ways to choose 3 points in a 5 by 5 grid. However, there could be points in a straight line like this:

So, we must find how many such combinations there are on one line.

  • For a line with 5 points, there are ( 5 3 ) {5 \choose 3} or 5 4 3 3 2 1 \frac{5*4*3}{3*2*1} or 10 total ways
  • For a line with 4 points, there are ( 4 3 ) {4 \choose 3} or 4 3 2 3 2 1 \frac{4*3*2}{3*2*1} or 4 total ways
  • For a line with 3 points, there are ( 3 3 ) {3 \choose 3} or 3 2 1 3 2 1 \frac{3*2*1}{3*2*1} or 1 way

Now, we must find the total number of each type of line.

For lines with length 5, there are 12 total lines (5 horizontal, 5 verticle, 2 diagonal)

For lines with length 4, there are a total of 4 llines (4 diagonal)

For lines with length 3, there are a total of 16 (4 through the center, 8 through the points directly horizontal or vertice from the center, 4 on the edges)

That gives us a total of 2300 12 10 4 4 16 1 = 2148 2300-12*10-4*4-16*1=\boxed{2148} total triangles

Two errors here even though the final answer is correct.

You missed accounting for 4 lines of length 3 (they are parallel to the blue lines but closer to the corners.) So there are a total of 16 lines of length 3.

Your final calculation should be 2300 12 10 4 4 16 1 = 2148 2300-12*10-4*4-16*1=2148

Jeremy Galvagni - 3 years, 1 month ago

Log in to reply

Thank you, I have fixed my mistake.

Δrchish Ray - 3 years, 1 month ago

Yes, I worked it out the same way. However, surely triangles that have zero area are also triangles? It didn't specify in the question so I originally entered 2300, which is the correct answer with the question how it is, and then worked out for just non-degenerate triangles

Stephen Mellor - 3 years, 1 month ago

Log in to reply

Yes maybe It has to say "non-degenerate" triangles but it is left as obbyess. If it wasn't like that then it wouldn't be an Advanced.

Pau Cantos - 3 years, 1 month ago

If degenerate triangles are allowed then your answer is still wrong since you also need to consider the situations where two or more points are the same. Thus you would have to add the 25 triangles based on a single point and the 25 * 24 = 600 triangles where two vertices are the same and the third is distinct, to give 2925 in total.

Richard Farrer - 3 years, 1 month ago

Log in to reply

n choose r doesn't allow the same thing to be chosen twice, it takes it into account

Stephen Mellor - 3 years, 1 month ago

line with 3 lenght is difficult to find totally

ollder New - 3 years, 1 month ago

here triangle can be made using more points than 3. why only choosing 3? I.don't get that

ridoy k - 3 years ago

Why oh why oh why do these questions have to be so tedious...

Zoe Codrington - 2 years, 9 months ago
Pedro Cardoso
May 6, 2018

For three points to not form a triangle, they must be colinear, so we'll count how many ways there are to choose 3 3 colinear points, and subtract that from the number of ways to choose 3 3 points without any conditions. To do this, we'll consider every possible line in which the 3 3 points can be:

In the red line, there are ( 5 3 ) = 10 \binom{5}{3}=10 ways to pick 3 3 points, and there are 10 10 "similar" lines ( 5 5 horizontal, and 5 5 vertical)

In the green line, again, there are ( 5 3 ) = 10 \binom{5}{3}=10 ways to pick 3 3 points, and there are 2 2 similar lines (each one is a diagonal)

For the blue line, there are ( 4 3 ) = 4 \binom{4}{3}=4 ways, for the green line there is ( 3 3 ) = 1 \binom{3}{3}=1 , and there are 4 4 similar lines to each of those ( 2 2 parallel to each diagonal of the square)

Finally, for the orange line, there is ( 3 3 ) = 1 \binom{3}{3}=1 way to pick 3 3 points, and there are 12 12 of those ( 3 3 with slope 2 2 , 3 3 with slope 2 -2 , 3 3 with slope 1 2 \frac{1}{2} and 3 3 with slope 1 2 \frac{-1}{2} )

This makes our total

10 10 + 2 10 + 4 ( 4 + 1 ) + 12 1 = 152 10\cdot10+2\cdot10+4\cdot(4+1)+12\cdot1=152

There are ( 25 3 ) = 2300 \binom{25}{3}=2300 ways to pick 3 3 points in the 5 × 5 5\times5 grid, so the number of triangles is 2300 152 = 2148 2300-152=2148

Sweet,simple,perfect!

Satyam singh - 3 years, 1 month ago

In the line about the blue and green lines, you mean the blue and yellow lines.

Paul Cockburn - 2 years, 12 months ago
John Ross
May 8, 2018

There are ( 25 3 ) = 2300 {25 \choose 3}=2300 ways to choose 3 points. We need to subtract from this the number of ways the 3 points would be colinear. We will count these by the point that is between the other two. There are 6 possible types of points that might be between the other two; A: the center, B: a unit distance from the center, C: one diagonal distance from the center, D: the midpoint of an edge, E: between the midpoint of an edge and its corner, and F: a corner. If we use the lowercase of a point to denote the number of colinear triplets with that point between the other two, our answer can be written as 2300 a 4 b 4 c 4 d 8 e 4 f 2300-a-4b-4c-4d-8e-4f . It does not take long to calculate that f = 0 , e = 3 , d = 4 , c = 10 , b = 13 , a = 20 f=0, e=3, d=4, c=10, b=13, a=20 giving us the answer 2148.

Mark Emerton
May 12, 2018

I did this with brute force code after too much head-scratching. I wrote code with three nested FOR loops, one for each point of the triangle, each loop running through the possible 25 positions.

Inside the inner loop I calculated the area formed by every possible combination of three points in the grid and if non-zero, I added it to a counter.

Finally, I divided the total count by 6, as there are 6 possible orders that each valid triangle can be formed by three points. (ABC, ACB, BAC, BCA, CAB or CBA).

Jake Zweifler
May 6, 2018

In order for a triangle to exist, it must be defined by three points. Thus, we can find the total number of triangles by finding the number of ways to choose three points out of the 25 total points. This is equal to ( 25 3 ) = 2300 \binom{25}{3}\ = 2300 .

But of course, this includes the many degenerate triangles that occur when the three chosen points are collinear. In order to find the actual number of triangles, we must subtract the many sets of three collinear points. In order to do this, we can use more counting methods:

First, note that there are ten lines of five points each, five horizontal lines and five vertical lines. Then, the two major diagonals are also lines with 5 points. In a single line of five points, there are ( 5 3 ) \binom{5}{3} ways of choosing 3 collinear points. In total, this is 12 ( 5 3 ) = 120 12\cdot\binom{5}{3}\ = 120

Now let's look at lines with four points. There are only four of them (they all have slopes 1 1 or 1 -1 ). Each line contains ( 4 3 ) \binom{4}{3} collinear dots of three. In total, this makes 4 ( 4 3 ) = 16 4\cdot\binom{4}{3}\ = 16

Finally, there are the lines of length three. Again, there are four of these with slopes 1 1 or 1 -1 . However, there are also many triples of points that make lines with slopes 1 2 \frac{1}{2} , 2 2 , 1 2 \frac{-1}{2} , or 2 -2 . In total, this adds 12 more lines or 16 total lines made of three dots. This means 16 ( 3 3 ) = 16 16\cdot\binom{3}{3}\ = 16

Altogether then, the total number of degenerate triangles made of three collinear points is 120 + 16 + 16 = 152 120 + 16 + 16 = 152 .

Subtracting from the total number of ways to choose three points, 2300 152 = 2300 - 152 = 2148 \boxed{ 2148 }

Thus, 2148 2148 triangles can be made by using three points on a 5 × 5 5 \times 5 square grid.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...