For the set $\{x \mid a \leqslant x \leqslant b\}$, we call $b-a$ its length. Let set $A=\{x \mid a \leqslant x \leqslant a+1981\}$, $B=\{x \mid b-1014 \leqslant x \leqslant b\}$, and both $A$ and $B$ are subsets of set $U=\{x \mid 0 \leqslant x \leqslant 2012\}$. Then the minimum length of the set $A \cap B$ is $\qquad$.
Solution: 983.
Since $A$ and $B$ are subsets of set $U$, we have $0 \leqslant a \leqslant 31, 1014 \leqslant b \leqslant 2012$.
Therefore, $A \cap B=\{x \mid b-1014 \leqslant x \leqslant a+1981\}$, or $A \cap B=\{x \mid a \leqslant x \leqslant b\}$.
Hence, the length of set $A \cap B$ is minimized if and only if $a=0, b=2012$, or $a=31, b=1014$, with the minimum value being $1981-998 = 1014-31 = 983$.