# Difference between revisions of "2018 AMC 12B Problems/Problem 17"

## Problem

Let $p$ and $q$ be positive integers such that $$\frac{5}{9} < \frac{p}{q} < \frac{4}{7}$$and $q$ is as small as possible. What is $q-p$?

$\textbf{(A) } 7 \qquad \textbf{(B) } 11 \qquad \textbf{(C) } 13 \qquad \textbf{(D) } 17 \qquad \textbf{(E) } 19$

## Solution 1

We claim that, between any two fractions $a/b$ and $c/d$, if $bc-ad=1$, the fraction with smallest denominator between them is $\frac{a+c}{b+d}$. To prove this, we see that

$$\frac{1}{bd}=\frac{c}{d}-\frac{a}{b}=\left(\frac{c}{d}-\frac{p}{q}\right)+\left(\frac{p}{q}-\frac{a}{b}\right) \geq \frac{1}{dq}+\frac{1}{bq},$$ which reduces to $q\geq b+d$. We can easily find that $p=a+c$, giving an answer of $\boxed{\textbf{(A)}\ 7}$.

## Solution 2 (requires justification)

Assume that the difference $\frac{p}{q} - \frac{5}{9}$ results in a fraction of the form $\frac{1}{9q}$. Then,

$9p - 5q = 1$

Also assume that the difference $\frac{4}{7} - \frac{p}{q}$ results in a fraction of the form $\frac{1}{7q}$. Then,

$4q - 7p = 1$

Solving the system of equations yields $q=16$ and $p=9$. Therefore, the answer is $\boxed{\textbf{(A)}\ 7}$

## Solution 3

Cross-multiply the inequality to get $$35q < 63p < 36q.$$

Then, $$0 < 63p-35q < q,$$ $$0 < 7(9p-5q) < q.$$

Since $p$, $q$ are integers, $9p-5q$ is an integer. To minimize $q$, start from $9p-5q=1$, which gives $p=\frac{5q+1}{9}$. This limits $q$ to be greater than $7$, so test values of $q$ starting from $q=8$. However, $q=8$ to $q=14$ do not give integer values of $p$.

Once $q>14$, it is possible for $9p-5q$ to be equal to $2$, so $p$ could also be equal to $\frac{5q+2}{9}.$ The next value, $q=15$, is not a solution, but $q=16$ gives $p=\frac{5\cdot 16 + 1}{9} = 9$. Thus, the smallest possible value of $q$ is $16$, and the answer is $16-9= \boxed{\textbf{(A)}\ 7}$.

## Solution 4

Graph the regions $y > \frac{5}{9}x$ and $y < \frac{4}{7}x$. Note that the lattice point (9,16) is the smallest magnitude one which appears within the region bounded by the two graphs. Thus, our fraction is $\frac{9}{16}$ and the answer is $16-9= \boxed{\textbf{(A)}\ 7}$.

Remark: This also gives an intuitive geometric proof of the mediant.

## Solution 5 (Using answer choices to prove mediant)

As the other solutions do, the mediant $=\frac{9}{16}$ is between the two fractions, with a difference of $\boxed{(A) 7}. Suppose that the answer was not$A$, then the answer must be$B$or$C$as otherwise$p$would be negative. Then, the possible fractions with lower denominator would be$\frac{k-11}{k}$for$k=12,13,14,15$and$\frac{k-13}{k}$for$k=14,15,$which are clearly not anywhere close to$\frac{4}{7}\approx 0.6\$