We know about two fractions that their numerators and denominators are positive integers, and that the sum of both the numerators and the denominators is 1000. Between what limits can the sum of the two fractions vary?
Let $\frac{a}{b}$ and $\frac{c}{d}$ be the two fractions, where $a+c=1000=b+d$; we can assume, for example, that $b \geq d$. Since

$$
\left(\frac{1}{b}+\frac{999}{d}\right)-\left(\frac{a}{b}+\frac{c}{d}\right)=\frac{999-c}{d}+\frac{1-a}{b}=(999-c)\left(\frac{1}{d}-\frac{1}{b}\right) \geq 0
$$

and

$$
\left(\frac{a}{b}+\frac{c}{d}\right)-\left(\frac{999}{b}+\frac{1}{d}\right)=\frac{c-1}{d}+\frac{a-999}{b}=(c-1)\left(\frac{1}{d}-\frac{1}{b}\right) \geq 0
$$

the sum of the two fractions is the largest, or the smallest, if the numerator of one of the fractions is 1.

If $a=1$ and $d=1$, then the sum is $\frac{1}{999}+999>999$, while $a=1f(499)>\ldots>f(32)>f(31)
$$

and

$$
f(1)>f(2)>\ldots>f(30)>f(31)
$$

Let's form the values of $f$ at two consecutive integers:

$$
\begin{aligned}
f(d)-f(d-1)= & \left(\frac{999}{1000-d}+\frac{1}{d}\right)-\left(\frac{999}{1001-d}+\frac{1}{d-1}\right)= \\
& =\frac{999}{(1000-d)(1001-d)}-\frac{1}{d(d-1)}= \\
& =\frac{998 d^{2}+1002 d-1001000}{(1000-d)(1001-d) d(d-1)}
\end{aligned}
$$

The "denominator" of the obtained quotient is positive. Since the quadratic function $g(x)=998 x^{2}+1002 x-1001000$ has one negative root and the other between 31 and 32, the difference $f(d)-f(d-1)$ is positive for $d \geq 32$ and negative for $d=2,3, \ldots, 31$.

The smallest value of the sum of the two fractions is therefore $\frac{999}{969}+\frac{1}{31}$, and this occurs only when $c=1, d=31$.