How many triangles are see in complete K5 graph

10.7k Views Asked by At

How many triangles are on picture below?

On yahoo answers I have found that numbers of triangles in complete graph with n nodes is: $\frac{n(n-1)(n-2)}{6}$

But how this formula has been estimated?

enter image description here

1

There are 1 best solutions below

4
On BEST ANSWER

Any set of three vertices forms exactly one unique triangle. How many of these sets exists? We can use the binomial coefficient $\binom{n}{3}=\frac{n!}{3!(n-3)!}=\frac {n\cdot(n-1)\cdot(n-2)}{6}$