Counting Triangles From Straight Lines

question

Solution:

1. consider all lines are infinite long. 12 lines => at most C(12,3) = 220 triangles

2. there are two situations that 3 lines do not form triangles
2.1 three lines join a one point
2.2 any two lines are parallel

3. There are 7 points that 4-lines join together and 2 points that 3 lines join together.
=> remaining: 220 – 7*C(4,3) – 2*C(3,3) = 220 – 28 – 2 = 190 triangles

4. There are 3 lines vertically parallel, 3 lines horizontally parallel, 2 lines 30-degree parallel and 2 lines 150-degree parallel. By inclusion exclusion principle, 3 parallel line account for (12-2)+(12-2)+(12-2)-1-1-1+1 = 28 triangles.
=> 190 – 2*28 – 2*(12-2) = 114

5. There are 4 corners outside the square, but counted in. Each should account for (12-2) = triangle, but 3 among the 10 has already subtracted in parallel part above and also there are two common triangle.
=> 114 – (4*7 – 2) =  88

Therefore there are 88 triangles in the above figure.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s