Solution:
We start with the equation
a3+b3≡ab(mod109)
If either a or b are 0, then we get a3≡0, implying that both are 0. Thus, {0,0} is a pair. For the rest of the problem, let's assume that neither a nor b are 0. Multiplying both sides by a−1b−2 yields
(ab−1)2+a−1b≡b−1
from which we make the substitution
ab=xy−1=y−1
to get the equation
y≡x2+x−1
Plugging this value back into (a,b), we get that all solutions must be of the form
(a,b)=((x+x−2)−1,(x2+x−1)−1)
where 1≤x≤108. It now suffices to find all nonzero unordered pairs {m,n} of the form {x+x−2,x2+x−1}, where 1≤x≤108. There are four values of x for which x+x−2≡x2+x−1, and of these values, three of them give x+x−2≡0. This is because we can re-arrange the equation at hand to get
x4−x3+x−1≡0
which factors into
(x−1)(x3+1)≡0.
If x=1, then {m,n}={2,2}, and if x3+1≡0 (which has three solutions: 46,64 and 108), then
{m,n}={x−1(x3+1),x−2(x3+1)}={0,0}
Therefore, we keep x=1 and discard x=46,64,108. Of the remaining 104 values of x, m=n, and neither are 0. We have to worry about collisions between distinct values of x. There are two ways a collision can occur: if there exists x=y such that
(x+x−2,x2+x−1)=(y+y−2,y2+y−1)
or if there exists x=y such that
(x+x−2,x2+x−1)=(y2+y−1,y+y−2)
The first case cannot occur: if x+x−2≡y+y−2, we have that x2+x−1=x(x+x−2)=y(x+x−2)=y(y+y−2)=y2+y−1. As a consequence of this, the second case only occurs if y=x−1. Therefore, the remaining 104 values of x can be partitioned into 52 pairs of (x,x−1), which ends up producing 52 distinct unordered pairs {m,n}. Adding this to the x=1 case and {0,0}, we get a total of
52+1+1=54
unordered pairs.