How many triangles are determined by the vertices of an octagon?

what is the best answer to

Question by Nick: How many triangles are determined by the vertices of an octagon?
(a) How many triangles are determined by the vertices of an octagon?
(b) How many if the sides of the octagon are not to be sides of any triangle?

Explain, please. Thanks!


Best answer:

Answer by MathMan TG
a)
Since none of the points are collinear (in threes),
you can choose any 3 points:
8c3 = 8 * 7 * 6 / 3! = 56

b)
Now it gets tricky!
I can't think of a simpler way to count them other than enumeration,
because the constraints are so tight, and overlapping.

AC {E, F, G} = 3
AD {F, G} = 2
AD {G} = 1

BD {F, G, H} = 3
BE {G, H} = 2
BF {H} = 1

CE {G, H} = 2
CF {H} = 1

DF {H} = 1

6 + 6 + 3 + 1 = 16

We can check by counting those *with* the outside edges:

AB {C - H} = 6
BC {D - H} = 5
CD {E - A} = 5
DE {F - B} = 5
EF {G - C} = 5
FG {H - D} = 5
GH {A - E} = 5
HA {C - F} = 4
Total = 40 which together with the other 16 make the right total of 56.

There's a pattern there:
for each point on the "with sides" count there are (8 - 3) = 5 triangles,
and one 6 and one 4, so altogether, 8 * 5 = 40.

For smaller figures:
...... .... ... all .. no sides .. with sides
Triangle: ...... 1 ... ..0 ....1
Square: .... ...4 .... .0 ... 4
Pentagon: ...10 ... ..0 ... 10
Hexagon: ....20 ... ..2 ... 18
Heptagon: ...35 ... ..7 ... 28
Octagon: .....56 ... 16 ... 40

And from there I turn to the OEIS ... which coughs up a formula,
and more numbers:
polygon ... total .. no sides ... sides
9 ... ... ... ... 84 ... 30 ... 54
10 ... ... ... . 120 ... 50 ... 70
11 ... ... ... . 165 ... 77 ... 88
12 ... ... ... . 220 ... 112 ... 108
13 ... ... ... . 286 ... 156 ... 130
14 ... ... ... . 364 ... 210 ... 154
15 ... ... ... . 455 ... 275 ... 180
16 ... ... ... . 560 ... 352 ... 208
17 ... ... ... . 680 ... 442 ... 238
18 ... ... ... . 816 ... 546 ... 270
19 ... ... ... . 969 ... 665 ... 304
20 ... ... ... . 1140 ... 800 ... 340

n-gon: .... ...nC3 ... x ... nC3-x
x = (n-5)*(n-4)*n / 6

nc3 = n * (n-1) * (n-2) / 6
and if we subtract those two,
we get
(n^3 - 3n^2 + 2n) minus
(n^3 - 9n^2 + 20n) =
6n^2 - 18n =
6n (n - 3)
and since we are dividing by 6,
that leaves n (n-3) as the formula for "using one or more sides",
(Note 8 * 5 = 8 * (8 - 3) above.)



What do you think? Answer below!



More How Many Were Articles