9
$\begingroup$

A cuboid is composed by $81 \times 125 \times 128 $ cubes. How many cubes are crossed by a (main) diagonal of the cuboid?

(note: I chose the numbers for the sides so that the case of the diagonal passing through a vertex of an inner cube is not possible)

$\endgroup$
11
$\begingroup$

Suppose we

move along the diagonal, parameterizing our movement by a number t that runs from 0 at one corner to 1 at the opposite corner.

Then

we enter a new cube every time one of 81t, 125t, 128t crosses an integer. These all happen at different times except that at the very start (t=0) all three happen together but we are entering only a single cube.

So the total number of cubes is

81+125+128-2 = 332.

Here's another way of saying it that some may find more congenial:

Consider the planes, parallel to the sides of the cuboid, that divide it into those cubes. As we travel from one corner to the other, we enter a new cube every time we cross one of those planes. There are 80+124+127=331 planes in all; plus the one cube in which we start, for a total of 332 cubes.

$\endgroup$
  • $\begingroup$ You have to note that $\gcd(81,125,128)=1.$ $\endgroup$ – Display name Nov 24 '18 at 1:44
  • $\begingroup$ OP already did, in effect. "note: I chose the numbers for the sides so that the case of the diagonal passing through a vertex of an inner cube is not possible". $\endgroup$ – Gareth McCaughan Nov 24 '18 at 1:56
  • $\begingroup$ And, actually, so did I: "These all happen at different times except that at the very start (t=0) all three happen together". I mean, neither OP nor I used the words "greatest common divisor", but that's what we were both referring to. Incidentally, what matters isn't quite that gcd(81,125,128)=1 but that those three numbers are pairwise coprime. $\endgroup$ – Gareth McCaughan Nov 24 '18 at 1:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.