2020 USOMO Problems/Problem 4
Problem 4
Suppose that are distinct ordered pairs of nonnegative integers. Let
denote the number of pairs of integers
satisfying
and
. Determine the largest possible value of
over all possible choices of the
ordered pairs.
Solution
Let's start off with just and suppose that it satisfies the given condition. We could use
for example. We should maximize the number of conditions that the third pair satisfies. We find out that the third pair should equal
or
We know this must be true:
So
We require the maximum conditions for
Then one case can be:
We try to do some stuff such as solving for with manipulations:
We showed that 3 pairs are a complete graph, but 4 pairs are not a complete graph. We will now show that
This is clearly impossible because RHS must be even.
OK, so we done. Not yet. We not solve answer yet. The answer is clearly that:
has
subtractions that follow condition while
has
and then the rest has
.
There are
terms, so our answer be
and in case of
that means
~Lopkiloinm
-in collaboration with WONGBOB