TITLE: $G$- simple graph. Show that it has a path of length at least $\dfrac{2m}{n}$ where $m=|E|$ and $n=|V|$
QUESTION [7 upvotes]: Let $G$ be simple graph. I need to show, that it has a simple path of length at least $\dfrac{2m}{n}$ where $m=|E(G)|$ and $n=|V(G)|$. 
I tried induction on $n$. Then With $n=1$ we have single vertex and since it's a simple graph then $\dfrac{0}{1}=0$ and all is fine. Trivially $n=2$ also applies. But I fail with the induction step. 
I tried something along this lines. Since $\dfrac{2m}{n}$ is an average of degrees, so let's take $x$ such that $deg(x) \leq$ average. If we erase it from the graph along with the edges adjacent to it, we will get a graph, for which the average is $\dfrac{2(m-deg(x))}{n-1}=\dfrac{2m}{n-1}-\dfrac{2deg(x)}{n-1} \geq \dfrac{2m}{n-1}-\dfrac{4m}{(n-1)(n)}$, and I would like it to be bigger $\dfrac{2m}{n}$ but I'm not sure it is...

REPLY [4 votes]: As in the blog entry by Chao Xu (note that I copy this for the case that the blog might not be reachable in the future):

$G$ is a simple graph, then $d(G) = \frac{2e(G)}{|G|}$ be the average degree of a simple graph.
Lemma 1
If $G$ is a connected graph, then it contain a path of length $\min(2\delta(G), |G|-1)$, where $\delta(G)$ is the minimum degree of $G$. (exercise 1.7. in Graph Theory by Diestel)
Lemma 2
Every graph $G$ has a component $H$, such that $d(H)\geq d(G)$.
Proof
Fact: If $x_i,y_i>0$ and $\frac{x_i}{y_i} < t$ for all $1\leq i\leq k$, then $\frac{\sum_{i=1}^k x_i}{\sum_{i=1}^k y_i} < t$. Assume the lemma is false, then consider all it's components $H_1,\ldots,H_k$, $d(H_i) = \frac{2e(H_i)}{|H_i|} < d(G)$, then $d(G) = \frac{\sum_{i=1}^k 2e(H_i)}{\sum_{i=1}^k |H_i|} < d(G)$, a contradiction.
Theorem
A simple graph $G$ must contain a path of length at least $d(G)$.
Proof
Proof by induction. It is true for graph with 1 vertex. Assume it is true for all graphs with $k$ vertices, $k < n$. Consider graph $G$ of $n$ vertices. If the graph has more than 1 component, then we use [Lemma 2] and show there exist a subgraph $H$ with strictly smaller number of vertices, such that $d(H)\geq d(G)$, and just apply the induction hypothesis.
Otherwise, the graph is connected. If there exist a vertex $v$ with degree at most $\frac{1}{2}d(G)$, we can remove it, and $d(G-v) \geq d(G)$, then by inductive hypothesis, in $d(G-v)$ there will be a path of length at least $d(G)$. If there is no such vertex. then we must have $\delta(G) > \frac{1}{2} d(G)$. By [Lemma 1], we have it has a path of length $\min(2 \delta(G) ,|G|-1)$. $2\delta(G) \geq d(G)$ and $d(G)\leq |G|-1$, thus it contain a path of length at least $d(G)$.