Question 167
Let $n \ge 3$ be an integer and let $K_n$ be the complete graph on $n$ vertices. Each edge of $K_n$ is colored either red, green, or blue. Let $A$ denote the number of triangles in $K_n$ with all edges of the same color, and let $B$ denote the number of triangles in $K_n$ with all edges of different colors. Prove that
$$
B \le 2A + \frac{n(n-1)}{3}.
$$
$$
B \le 2A + \frac{n(n-1)}{3}.
$$