Have you thought about the number of unit cubes crossed by a diagonal in a cuboid?

Consider a cuboid with dimensions 2cm\times 2cm\times 3cm divided into unit cubes as shown below,

Now, draw a diagonal of the cuboid and find the number of unit cubes through which the diagonal reaches its other end. Are you getting 4? You can consider the number of points of intersections of planes with the diagonal that are parallel to the faces and separated by 1cm. Note that each intersection leads you to a new unit cube and thereby we can find the number of unit cubes crossed by the diagonal. Number of planes = Number of horizontal planes along 3cm + Number of vertical planes along 2cm + Number of vertical planes along other 2cm. So, number of intersections = 3+2+2-(1+2)=4. We have subtracted 1+2=3 to account for overcounting because the diagonal and the planes are concurrent at two points (two planes at the center point and three planes at the corner end of cuboid).


We can now generalize this result for a cuboid with arbitrary integer dimensions, i.e., say the dimensions are L\times B\times H, where L, B, H are positive integers. Try to find the answer in terms of L, B, H and read this post further.......


The answer would be L + B + H - GCD(L, B) - GCD(B, H) - GCD(H, L) + GCD(L, B, H). We will here a discuss a short proof of this answer using almost the same logic as before by finding the number of points of intersections of diagonal with parallel planes to the faces.

L+B+H counts the number of planes intersected by the diagonal and GCD(L, B) counts the number of intersections of diagonal that has the 2 planes parallel to B\times H and L\times H passing through them and GCD(L, B, H) counts the the number of intersections of diagonal that has 3 planes parallel to all three non-parallel faces of cuboid passing through them.

So, GCD(L, B) + GCD(B, H) + GCD(H, L) counts the number of intersections of diagonal with 2 planes passing through them but again here, the number of intersections with 3 planes through them are counted thrice, so we subtract 3GCD(L, B, H) to get the above expression. Hence, we have accounted for the overcounting due to concurrency at the intersections.

Now, you can try to give a rigid proof of this idea in the comments for further discussions. Join us at SuMON Slow Math Program to solve more exciting problems like this every fortnight, which require only logical thinking rather than conceptual prerequisites making math fun! These kind of problems are not available in wide range of math text books. We also provide detailed solution to each problem for every fortnight.

Leave a Reply

Your email address will not be published. Required fields are marked *