Here is the problem I was given: If $a, b, c, d$ are positive integers with both $b \leq 1000$ and $d \leq 1000$ and $\frac{a}{b}$ and c/d are distinct rational numbers (i.e. they aren’t equal to each other), what is the closest they can be to each other? That is, what is the smallest possible value for $$\left|\frac{a}{b}-\frac{c}{d}\right|\;?$$
Whatever your answer, give both an example to show that there really are two such rational numbers that close to each other and give a justification why there can’t be two such rationals any closer to each other than that.
What I have: I thought that maybe setting b and d to 1000 would be the best way to make the value small but I don't know.
$\frac ab - \frac cd = \frac {\frac{da - cb}{\gcd(b,d)}}{\frac {db}{\gcd(b,d)}}$. The absolute smallest that can be is $\frac 1{{\frac {db}{\gcd(b,d)}}}$ where ${\frac {db}{\gcd(b,d)}}$ is a large as possible.
If $\gcd(b,d) \ge 2$ then ${\frac {db}{\gcd(b,d)}}\le 500,000$ which may not be optimum. However if we have $\gcd(b,d)=1$ then ${\frac {db}{\gcd(b,d)}}=bd$ and it is a matter of finding the largest possible $b$ and $d$ that are relatively prime.
As $\gcd(1000,999) = 1$, then $b = 1000; d=999$ and ${\frac {db}{\gcd(b,d)}}= db = 999,000$ is clearly the largest such value. Provide we can minimize $|da - cb| = |999a - 1000c|$.
Which... obviously can be minimized to $1$ via $a=c=1$.
So $a = 1; c=1;b = 1000; d=999$ is the smallest. at $|\frac 1{1000} - \frac 1{999}| = \frac 1{999,000}$