Given two blank rulers, measure any length

4.6k Views Asked by At

Say, you are given ruler $A$ of length $72.84 \text{ cm}$ and ruler $B$ of length $86.63\text{ cm}$. Neither of them have any marking/gradation of any sort on them. They are blank, except for their total length written on them.

Using only A and B, can you measure a length of $31.23\text{ cm}$?

Also, is it possible to generalize this concept further?

That is to say:

Given any two blank rulers, measure any given length.

4

There are 4 best solutions below

1
On

This all boils down to (using 0.01 cm as the unit) as

Does $\gcd(7284,8663)$ divide 3123?

The answer is yes: the gcd turns out to be 1. The generalisation is obvious: two blank rulers of lengths $a$ and $b$ units ($a,b$ are natural numbers) can measure any length that is a multiple of $\gcd(a,b)$ units.

6
On

Yes. It is Possible

Here's a useful fact: If $a$ and $b$ are integers with $\gcd(a,b) = d$, then there exist integers $x$ and $y$ such that $ax + by =d$. In fact, one can compute exactly what $x$ and $y$ are by the extended Euclidean algorithm.

In this case, we have $$ 3539 \times 8663 - 4209 \times 7284 = 1$$

Or, $$ 3539 \times 86.63 - 4209 \times 72.84 = 0.01 $$

So, in theory, you could measure $0.01$ cm by marking off $3539 \times 86.63$ cm along a line, and then marking off $4209 \times 72.84$ cm along the same line; the difference in the markings will be $0.01$ cm.

Of course, now that you can measure $0.01$ cm, you can measure any multiple thereof.

For your generalization, given two blank rulers, you can measure any length that is a multiple of the gcd of their lengths. (Make sure you choose units where the lengths of the rulers are integers. Here, we chose 0.01 cm)


Edit: As noted by Silverfish in the comments, the interesting fact I mention above is Bézout's identity

8
On

We can write it as the equation $7284y - 8663x = 3123$

or $y = \frac{8663x + 3123}{7284}$

From this we can see that $8663x\equiv 7284-3123 \mod 7284$

$8663x \equiv 4161 \mod 7284$

$8663 \equiv 1379 \mod 7284$

So, $x \equiv \frac{4161}{1379} \mod 7284$

$x \equiv 4161\cdot \frac{1}{1379} \mod 7284$

$x = 4161\cdot 3539 = 14725779$........ where $3539$ is the multiplicative inverse of $1379$

So, $x = 14725779$ and $y = 17513650$

So, if we measure out $17513650$ lengths of the $72.84$ stick and then measure back with $14725779$ lengths of the $86.63$ stick, we achieve a distance of $31.23$ from our starting point.

5
On

The other answers are in the affirmative and consider measuring multiples of the GCD of the two rulers, or $0.01\text{ cm}$ in the original problem.

For really small problems, it would be better to have an irrational ratio between the two lengths, e.g. a ruler of length $1$ and a ruler of length $\pi$. One can get multiples of $\pi$ arbitrarily close to the integers and thus construct basic units of measurement arbitrarily small.

Doing so, you can measure ANY non-negative real length to ANY desired positive degree of accuracy. Contrast such a ruler with the $0.01\text{ cm}$ ruler mentioned above which can only measure any non-negative real within $0.01\text{ cm}$ of accuracy ($0.005$ really, but there's an uncertainty in the measurement in which side it is actually closer to, so you wind up with up to $0.01$ from the further side).