3

Suppose we have a cuboid with dimensions $A\times B\times C$ composed of $1\times 1\times 1$ cubes with $\gcd(A,B)=gcd(A,C)=gcd(B,C)=1$.

Considering any vertex of the cuboid as origin, say $O$, we select $3$ vertices $P$,$Q$ and $R$ such that $OP$, $OQ$ and $OR$ are mutually perpendicular. If we cut the cuboid along the plane $PQR$ in two parts, how many $1\times 1\times 1$ cubes will be cut?

I have till now solved the problem in $2D$ system with a line slicing an $A\times B$ rectangle through the diagonal. In that case the answer turns out to be $A+B-1$. With similar logic I established that any needle through the diagonal of cuboid will pierce through $A+B+C-2$ cubes (correct me if I'm incorrect). But I could not wrap my head around the cuboid and plane problem.

prateek
  • 63

1 Answers1

1

Let's start with the 2D case. Consider an $A \times B$ rectangle with a line through $(0, A)$ and $(B, 0)$. The line contains all points $(x,y)$ satisfying $Ax+By = AB$. We will say that points $(x,y)$ such that $Ax + By < AB$ are below the line. Notice that there is a one-to-one correspondence between squares intersected by the line, and lattice points on the boundary of the rectangle below the line!

2D example

This approach generalizes to $n$ dimensions. For the $A \times B \times C$ cuboid, the answer is:

$(AB+BC+AC-1)/2$

augurar
  • 1,856