A 150x324x375 cuboid
is made by gluing together 1x1x1 cubes.
An internal diagonal of this cuboid passes through the interiors of how many 1x1x1 cubes?
The below is wrong;see the next comment.
Each time the line goes through an integral x, y or z coordinate it passes into the body of another unit cube. If the dimensions had been all relatively prime, the number of unit cubes would have been the total of the dimensions, but the dimensions are not relatively prime, as, if more than one dimension is integral at a given point, only one new cube is entered.
gcd(150,324) = 6 = 2*3
gcd(324,375) = 3
gcd(150,375) = 75 = 3*5*5
I've arbitrarily labeled the coordinates as x, y and z.
There are 150 x-coordinate entries (we don't count the final exit). At this point let's count them all, but remember not to count them again at simultaneous integral y or z points.
There are 324 integral y points, but 1/6 of them are shared with x so we can count only 270.
There are 375 integral z points, but 1/3 of them are shared with y. Some of these are also shared with x but none are shared with x alone, so nothing else need be subtracted, and we get 375 - 125 = 250.
The total is 150 + 270 + 250 = 670 unit cube bodies are passed through.
Edited on September 1, 2014, 9:55 pm
Posted by Charlie
on 2014-09-01 17:55:48