The girth of a graph is the length of its smallest cycle.

For $m \ge n \ge 3$, let $g(n,m)$ denote the maximal girth over all graphs with $n$ vertices and $m$ edges.

Is it true that if $m > c n $ and $c > 1$, then the girth is $O( \log n)$? (I.e. is there a constant $C$ which depends on $c$ but not on $n$ such that $g(n,m) < Cn$?)

Here is a sketch of a proof if $m > cn$ and $c > 2$. Such a graph has average degree $$d = 2m/n > 4.$$ Than a standard fact in graph theory (e.g. by repeatedly deleting vertices of small degree) gives that there is a subgraph $H$ with minimum degree $\delta [H] \ge d/2 > 2$. Since $\delta$ is an integer, $\delta [H] \ge 3$. Now consider a vertex $v \in H$ as a root, consider neighbors of $v$ and their neighbors, etc. Until there is a cycle, every vertex at distance $d$ from $v$ has at least two neighbors at distance $d+1$. So the number of vertices doubles at each step, and the diameter is at most $\log_2 n$. The girth is at most $2 \log_2 n + 1$.

  • $\begingroup$ I take it you are restricting this to graphs with at most one edge connecting any two given vertices. $\endgroup$ May 12, 2017 at 18:38
  • $\begingroup$ Yes, I am only talking about simple graphs, no loops or multiple edges. $\endgroup$ May 12, 2017 at 18:46
  • $\begingroup$ Doesn't your argument for $c>2$ only show that the diameter of subgraph $H$ is at most $\log_2 n$? I don't see that this constrains the girth of the whole graph. $\endgroup$ May 12, 2017 at 18:49
  • $\begingroup$ Never mind, I see why it constrains the girth -- it shows that there must be a cycle of length $\leq$ $2\log_2 n +1$ within the subgraph $H$, and that in turn is a cycle within the full graph. $\endgroup$ May 12, 2017 at 18:52

2 Answers 2


Take a graph $G$ with $n$ vertices and $m$ edges, satisfying $m > cn$. By deleting vertices with degree at most $1$, we get a graph $G'$ with $n' = n-k$ vertices and $m' \ge m-k$ edges, which means $m' > cn'$.

The resulting graph $G'$ has minimum degree $2$ (and some vertices of higher degree), which means we can think of it as a subdivision of a multigraph $H$ with minimum degree $3$. We'd like to pass to that multigraph by smoothing out all degree $2$ vertices, but before we do that, we'd like to make sure that no edges of $H$ correspond to very long paths in $G'$.

Suppose $G'$ contains a path with $t > \frac{c}{c-1}$ edges, all of whose vertices, except the endpoints, have degree $2$. Deleting this path reduces the number of vertices by $t-1$ and the number of edges by $t$, producing a graph $G''$ with $n''=n'-(t-1)$ vertices and $m''=m'-t$ edges. If $t > \frac{c}{c-1}$, then $t < c(t-1)$, which means $m'' > cn''$.

Once no such paths are left, we can smooth out $G''$ to get a multigraph $H$ with minimum degree $3$, all of whose edges correspond to paths in $G''$ of length at most $\frac{c}{c-1}$. We can actually assume $H$ is a graph: it might have loops or parallel edges, but if it does, then they correspond to a cycle in $G''$ of length at most $\frac{2c}{c-1}$.

Now, by the argument in the question, $H$ has a cycle of length at most $2\log_2n + 1$. This corresponds to a cycle in $G''$ (and therefore a cycle in $G$) of length at most $\frac{c}{c-1}(2\log_2n +1)$, because each edge of the cycle in $H$ corresponds to at most $\frac{c}{c-1}$ edges in $G$.


In a cycle of n vertices, the girth is of n. Hence, an upper bound of O($log_{2}n$) on girth size won't exist. The problem with answer given by Misha Lavrov is that when we remove vertices with degree equal to 1, there might be a decrease in degree of remaining vertices.

  • $\begingroup$ I do take that into account; the number of vertices and edges goes down by the same amount. The cycle $C_n$ doesn't actually satisfy the condition in the question: it has $m=n$, so $c=1$, but we assume $c>1$. $\endgroup$ Apr 7, 2020 at 22:08
  • $\begingroup$ If you add a single chord to $C_n$, you do get a graph with girth up to $\frac n2$, which my bound doesn't appear to work for. But it does: for this graph, $c = \frac mn = \frac{n+1}{n}$, so the factor of $\frac{c}{c-1} = n+1$ in the front of my bound actually tells us that the girth is at most $(n+1)(2 \log_2n + 1)$. This is not a good upper bound for this graph, but you'll agree that it's valid. $\endgroup$ Apr 7, 2020 at 22:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .