# How many triangles can be made with those holes?

A 5 by 5 square lattice is formed by drilling holes in a piece of wood. Three pegs are placed in this lattice at random.

Find the probability that three randomly chosen points of a 5 by 5 lattice will form a triangle.

-
Can you count the number of ways to place three collinear pegs in the lattice? (Hint: there are 12 lines that go through 5 lattice points, 4 lines that go trough exactly 4 lattice points, and ___ lines that go through exactly 3 lattice points). – Henning Makholm Oct 19 '13 at 17:29
hmm of course why not – user100315 Oct 19 '13 at 17:32
^I find that reply to be quite lacking. – The Chaz 2.0 Oct 21 '13 at 3:28

$\binom{25}{3} - 12\binom{5}{3} - 4\binom{4}{3} - 16\binom{3}{3}$
Total combos -
(12 lines of five)(10 ways to choose 3 from 5) -
(4 lines of four)(4 ways to choose 3 from 4) -
(16 lines of three)(1 way to choose 3 from 3)

-

Three pegs placed in the lattice will form a traingle unless they are in a straight line.

There are a number of straight lines with room for three pegs:

• Of length 5
• 5 horizontal
• 5 vertical
• 2 diagonal
• Of length 4 (that are not on one of length 5)
• 4 in a 45° angle (next to the main diagonals)
• Of length 3 (that are not on an earlier line)
• 4 in a 45° angle (next to those of length 4)
• 6 in a about 26° angle ($\{(1,1), (2,3), (3,5)\}$ is an example)
• 6 in the same angle, but rotated 90°

$$\small(\text{number of triangles}) = (\text{number of total combinations}) - (\text{number of combinations on straight lines})$$ The probability of finding a triangle, is of course that number divided by the total number of combinations. $$\frac{{25 \choose 3} - \left(12 \cdot {5 \choose 3} + 4 \cdot {4 \choose 3} + 16 \cdot {3 \choose 3}\right)}{25 \choose 3} = 1 - \frac{152}{2300}$$

-