The question is in the title. I can see why the bound is sharp (for example, a lot of triangles sharing one common vertex if n is odd, or the same but with one spare edge hanging out if n is even). But I can't prove why the bound is the best possible.
I know that each edge must belong to at most one cycle. I was thinking that you could take any path or odd big odd cycle and turn it into bunch of triangles wherever possible, but I think that might not be valid because a lot of greedy local optimums isn't necessarily the global optimum. So what do I do?
I tried looking online for an answer before posting this and all I could find is this: Link Is the reasoning faulty there? I couldn’t make sense of it after it talked about decomposing into cycles.
Thanks for any help
This is not true if graph is not simple, for example take a single vertex and a loop, there is one edge, but your bound equals zero.
On the other hand, if the graph in question is simple then here are some hints:
I hope it helps ;-)