10.5. Natural numbers $a, b, c, d$ are such that $a+c=1000, b+d=500$. Find the maximum value of the sum $\frac{a}{b}+\frac{c}{d}$.
Answer. $\frac{1}{499}+\frac{999}{1}$.

Solution. Due to symmetry, we can assume that $b \geq d$. Then, by replacing the pair $a, c$ with the pair $a-1, c+1$, we get $\left(\frac{a-1}{b}+\frac{c+1}{d}\right)-\left(\frac{a}{b}+\frac{c}{d}\right)=\frac{1}{d}-\frac{1}{b} \geq 0$ - an increase in the desired expression, so the maximum should be sought among fractions $\frac{1}{b}+\frac{999}{d}$. By replacing the pair $b, d$ with the pair $b+1, d-1$, we get $\left(\frac{1}{b+1}+\frac{999}{d-1}\right)-\left(\frac{1}{b}+\frac{999}{d}\right)=\frac{999}{d(d-1)}-\frac{1}{b(b+1)}$. Given that $b \geq d$, we have $b(b+1) \geq d(d+1)>d(d-1)$, so $\frac{999}{d(d-1)}>\frac{1}{d(d-1)}>\frac{1}{b(b+1)}$ and the difference in the previous statement is positive. Therefore, the maximum of the expression is achieved at $a=1, b=499, c=999, d=1$ and is equal to $\frac{1}{499}+\frac{999}{1}$.

Instructions. Correct answer with the right $a, b, c, d: 1$ point. Each of the two steps in the proof: 3 points each.