Let $G$ be an arbitrary simple graph on $2k$ vertices with $k^2$ edges, where $k \geq 2$. Let $F$ be a $3$-flag, i.e., three triangles that share a single edge (this graph has 5 vertices and 7 edges). I want to find an upper bound for the number of $3$-flags $F$ in $G$.
One trivial upper bound is $(2k)^5$, but this is too crude and I want a smaller upper bound than this. Any ideas? Thank you in advance!
The most compact number of 3-flags would occur in a complete graph. There, any edge forms a three flag with any other vertex in the complete graph. In $K_n$, there are $\binom{n}{2}$ edges. Multiply this by the $\binom{n-2}{3}$ possible vertices which create a 3-flag with given edge.
So, for a quick upper bound, given $e$ edges, find the smallest $n$ for which constructing $K_n$ is impossible, and then $\binom{n}{2}\binom{n-2}{3}$ is your upper bound.