Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Could anybody explain to my why the asymptotic upper bound for the number of triangles in a graph with n vertices is O(n^3). I could not imagine a graph with n vertices which can contain indeed n^3 triangles.

share|improve this question

1 Answer 1

up vote 5 down vote accepted

Consider the complete graph $K_n$. Here, choosing any three vertices yields a triangle; and the number of ways of choosing three vertices is $$ \binom{n}{3}=\frac{n(n-1)(n-2)}{6}\sim\frac{n^3}{6}\text{ as }n\to\infty. $$ It is true that you can't ever actually have $n^3$ triangles; but, that is not what the claim says.

Instead, it says, essentially, that there is a constant $C$ and a bound $N$ so that the number of triangles in a graph on $n$ vertices is bounded by $Cn^3$ for $n\geq N$... that is, that the number of triangles is eventually bounded by a multiple of $n^3$. That's what being $O(n^3)$ means.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.