COMC 2011 C Problem 4

Let f(x)=x^{2}-a x+b, where a and b are positive integers.

(a) Suppose a=2 and b=2. Determine the set of real roots of f(x)-x, and the set of real roots of f(f(x))-x.

(b) Determine the number of pairs of positive integers (a, b) with 1 \leq a, b \leq 2011 for which every root of f(f(x))-x is an integer.