What's the highest number of edges that a simple undirected graph with $n$ vertices can have, without having any cycle smaller than $k$?
I'm looking for the case where $n$ is "unbounded", or "$\lim n\rightarrow \infty$", i.e. where $n$ is "large enough". The given $k$ may be a function in $n$.
The inverted case is that I'm looking for the behavior of $f_n(m)$. Informally, we're looking to construct a graph with $n$ vertices and $m$ edges while avoiding small cycles. $f_n(m)$ is then the size of the smallest cycle in the optimal case:
Of all simple graphs with $n$ vertices and $m$ edges, select the one where its smallest cycle is as large as possible. $f_n(m)$ is then the size of that cycle. Note that $f_n$ should be a monotonically decreasing function.
Yet another way to look at it: all graphs with n vertices and m edges have a cycle of size $k=f_n(m)$ or smaller.
For $k=4$, I think the answer is $n^2/4$: the complete bipartite graph with $n/2$ vertices on both sides. But I don't have a final proof that more than $n^2/4$ is impossible.
So I think we have (for $n$ even):
- $f_n(n^2/4) = 4$
- $f_n(n^2/4+1) = 3$ (edit: definitely, see saulspatz's comment)
Some trivial cases:
- $f_n(n) = n$ (If a graph with $n$ vertices and $n$ edges there must a cycle?)
- $f_n(m_{<n}) = \infty$ or undefined (There exist graphs with less edges than vertices that have no cycles)
- $f_n(n(n-1)/2) = 3$. (complete simple graphs have all cycles and cycles in simple graphs in general have a minimum length of 3).
Upper-bounds for $f_n(m)$ in terms of $m$ (and $n$) might be useful for my application, but asymptotic bounds (big-O notation) aren't good enough. Such an upper bound simply guarantees that my graph with $m$ edges has a cycle of a certain small-enough size.