5

Prove that a graph with $n$ ($n \geq 3$) vertices, and $m$ ($m \gt \frac{n^2}{4}$) edges always contains a triangle.
Also, the graph is simple, but not necessarily connected.

I thought of induction on $n$, in each step removing a vertex with the minimum degree, but couldn't get anywhere useful.

Also since for $n \geq 4$, $\frac{n^2}{4}$ is greater than $n-1$, thus the graph contains a cycle, So I tried to remove a cycle in the induction step and in the induction we assume the condition for $n \in \{1, 2, ..., k\}$ holds, and try to prove for $n = k+1$, when we remove a cycle of length $x$ from the graph; If we prove: $$ m - x \gt \frac{(n - x)^2}{4}$$ then for $n = k+1$ we've proven that the graph contains a triangle, But I unfortunately couldn't prove the inequality.

Appreciate any helps

I also visited Every graph with $n\ge3$ vertices and more than $\frac{n^2}{4}$ edges contains a triangle, but it didn't help

Behrad
  • 482
  • This is a direct corollary from Turán's Theorem, so if you already saw that, maybe you can make your life easier :-) – Immanuel Aug 05 '24 at 10:07
  • @Immi thank you, But I'm trying to prove this using induction (I kinda have to :) ) – Behrad Aug 05 '24 at 10:10
  • 2
    How about the following: Suppose you do it via induction, over the vertices. Let $n\ge 4$ and $G$ a triangle-free $n$-vertex graph. Fix an edge $uv$ in $G$ then the neighbourhoods of $u$ and $v$ have to be disjoint. Can you see why? Now delete the vertices $u$ and $v$ and apply the induction hypothesis on the remaining $n-2$-vertex graph. This could be an easier induction, I think. @BGOPC – Immanuel Aug 05 '24 at 10:19
  • @Immi thank You, I'll think about it, it indeed is easier than removing the cycle from the graph induction, thank u – Behrad Aug 05 '24 at 10:43
  • You're welcome, let me know, if you have further questions @BGOPC – Immanuel Aug 05 '24 at 11:04

2 Answers2

3

We use induction on $n$ to prove that for every graph G s.t. $n \geq 3$ and $m > \frac{n^2}{4}$ contains a triangle.

For the Base of The induction: assume we have a graph with 3 vertices and $\lceil\frac{3^2}{4}\rceil = \lceil2.25\rceil = 3$ edges. Since the graph is simple the only possible graph is a triangle.

Induction Hypothesis: assume for every graph with $n \in \{1 \cdots k\}$ s.t $m > \frac{n^2}{4}$ there exists a triangle.

Take any graph with $k+1$ vertices satisfying the condition on $m$.
Let's find an edge $uv$ such that $N(u) \bigcap N(v) = \emptyset$.
If there exists no such, take any edge $xy$, let $w$ be any vertex $\in N(x) \bigcap N(y)$, then $xy$, $xw$ and $yw$ form a triangle.

So take the vertices $u$ and $v$, and remove both from the graph.
let $d(v)$ be the degree of $v$;
Now let's prove that if $m \gt \frac{n^2}{4}$ the
$$ m - (d(u) + d(v) - 1) > \frac{(n-2)^2}{4} $$ holds: $$4m - 4\cdot(d(u) + d(v) - 1) \gt (n-2)^2$$ $$4m - 4\cdot(d(u) + d(v) - 1) \gt n^2 - 4n + 4$$ $$4m - 4\cdot(d(u) + d(v) - 1) \gt n^2 - 4(n+1)$$ And since we already know $4m \gt n^2$ proving $d(u) + d(v) - 1 \leq n+1$ is sufficient.
Since $N(u) \bigcap N(v) = \emptyset$ thus $d(u) + d(v)$ doesn't exceed $n$ and $n - 1$ is less than $n + 1$. Thus the new graph satisfies the condition of $m^\prime > \frac{{n^\prime}^2}{4}$ where $n^\prime$ and $m^\prime$ are the properties of the new graph. Thus according to the induction hypothesis, this graph contains a triangle, So the original graph contains a triangle.

Thanks to the user @Imma for helping me solve this.

EDIT: $d(u) + d(v) - 1$ is the number edges removed by removing $u$ and $v$. since the edge $uv$ is recounted.

Behrad
  • 482
  • Your reasoning is correct, but you missed the case $n=4$. If $n=4$, then $n'=n-2=2<3$. – kabenyuk Aug 07 '24 at 04:45
  • Yes, You're correct I didn't notice that, But since the maximum number of edges in the $n = 4$ graph is 6, we can check all possible cases and show that in all of them, there exists a triangle. – Behrad Aug 07 '24 at 06:24
1

I think you can do induction on the number of vertices of a graph this way.

So we prove that if $|V(G)|=n\geq3$ and $|E(G)|=m>n^2/4$, then $G$ has a triangle.

  1. If $n=3$ and $m>3^2/4>2$, then $G$ is a triangle.

  2. Let $n>3$ and for all graphs with less than $n$ vertices our statement is true.

  3. As already noted, we can assume that $\deg(u)+\deg(v)\leq n$ for any two adjacent vertices $u,v\in V(G)$ (otherwise $G$ has a triangle). It follows that here exists a vertex $v\in V(G)$ for which $\deg(v)\leq [n/2]$.

  4. Let $v\in V(G)$ be chosen such that $\deg(v)\leq [n/2]$. Then $$ |E(G-v)|=m-\deg(v)\geq n^2/4+1-n/2>(n-1)^2/4, $$ if $n$ is even, and $$ |E(G-v)|=m-\deg(v)\geq (n-1)^2/4+(n-1)/2+1-(n-1)/2>(n-1)^2/4, $$ if $n$ is odd.

  5. Let $G'=G-v$. We see that in any case the inequality $m'=|E(G')|>(n-1)^2/4$ is satisfied. Hence by inductive assumption the graph $G'$ has a triangle.

kabenyuk
  • 12,395