# Cutting a $n$-dimensional cubic cake

Given a cubic cake, defined as $\{(x,y,z)|0\leq x,y,z\leq 1\}$.

We cut it by the planes

$p_1\leftrightarrow x=y$

$p_2\leftrightarrow y=z$

$p_3\leftrightarrow x=z$.

How many pieces will we have after cutting?

And the 4-dimensional case: $\{(x,y,z,u)|0\leq x,y,z,u\leq 1\}$

How many pieces will we have after having cut by the spaces

$x=y$, $x=z$, $x=u$, $y=z$, $y=u$, $z=u$?

And the $n$-dimensional case...

-
Hint: What are the conditions on the two subsets after cutting along $x=y$? That is, how do you determine if $(x,y,z)$ is in one subset or the other? – Thomas Andrews Oct 4 '12 at 15:30
I have a solution, but i wanted to share this with others. Because i find it a beautiful problem. – barto Oct 4 '12 at 15:37
This is not a puzzle site, it is a site for answering questions so that later people with the same question can find the answer. So if you have an answer, then post it. @barto – Thomas Andrews Oct 4 '12 at 15:41

When cutting by the space $x=y$, we divide the cake in two parts:
One part with $x>y$ and one part with $x<y$.
The same holds for spaces like $y=z$, $z=u$, ...
That means, that every ordering of the variables $x$, $y$, $z$, ... defines a part. And since there are $n!$ orderings, there are $n!$ pieces after cutting.