Every side and diagonal of a polygon (n-sided) is colored in red or blue. If there are no triangles with all sides colored in blue, prove that the number of red sides is always greater than $\frac{n^{2}-2n}{4}$
My idea is to define the number of red and blue sides x,y and use Pigeonhole principle.
Then $x+y=\frac{n.(n-1)}{2}$
With each side, there are $n-2$ times that it is part of a triangle.
the number of triangle is $\frac{n.(n-1)(n-2)}{6}$
This is all I know. Help me to solve this problem.
Consider a graph associated with the $n$ vertices . Draw an edge between two vertices if the corresponding edge in the polygon is blue .
We know this graph is triangle-free so from Mantel's theorem (see here : https://en.wikipedia.org/wiki/Tur%C3%A1n%27s_theorem#Mantel.27s_theorem ) it has at most $\lfloor \frac{n^2}{4} \rfloor $ edges . The total number of edges is $\binom{n}{2}$ so there are at least $$\binom{n}{2}-\lfloor \frac{n^2}{4} \rfloor$$ red edges .
$$\binom{n}{2}-\lfloor \frac{n^2}{4} \rfloor \geq \frac{n^2-n}{2}-\frac{n^2}{4}=\frac{n^2-2n}{4}$$ so there are always at least $$\frac{n^2-2n}{4}$$ red edges .