TITLE: An ant walks on a cube over the diagonals of little cubes. Can it visit all little faces exactly once?
QUESTION [8 upvotes]: I have got this task at high-school math-contest seminar.
The theme is graphs.
Let us have $n \in \mathbb{N}$ and the cube $ n \times n \times n$. An ant can go over a diagonal of little cubes, but it can't turn at the intersection of two little diagonals.
Is it true that if $n$ is odd then an ant can't visit every little facet (all of $6 n \times n$) exactly once? I didn't find the path for $n = 1,3$
I don't see a particular method to solve this task, because you can't treat facets as vertices. You can't treat them as edges also. It isn't an Euler or Hamilton cycle. I don't see an invariant that should be saved as well. The graph is planar.

REPLY [3 votes]: Another explanation in the same vein as @Especially Lime placing in evidence an invariant.
This invariant is the parity of the sum of coordinates of the two endpoints of a given diagonal edge.
Case $n=1$ : Think to the cube as being $\{0,1\}^3$.
A diagonal path connects a vertex to another vertex by changing two coordinates (a change equivalent to a boolean complementation) ; this induces a partitionning of the 8 vertices into 2 classes of 4 that cannot be connected between themselves :
$$\begin{matrix}(0,0,0) \ \ &\|& \ \ (1,1,1)\\
(1,1,0) \ \ &\|& \ \ (0,0,1)\\
(0,1,1) \ \ &\|& \ \ (1,0,0)\\
(1,0,1) \ \ &\|& \ \ (0,1,0)
\end{matrix}$$
This vertices' partitionning induces a partitionning of diagonals.
Another way to say this is that the left set has a parity-check (sum of coordinates) $0$ whereas it is $1$ for the second.
Case $n=2$ : This time, the vertices a subset of $\{0,1,2\}^3$ (we must take out interior point $(1,1,1)$). We have the same principle : if a diagonal in one face connects two points it means that

one coordinate remains fixed
the two others move by one unit.

Let us consider the cases where the coordinate with a fixed value is $z=z_0$ (with $z_0=0$ or $z_0=2$); the only possible "moves" are of type 
$$(x,y,z_0) \leftrightarrow (x + e_1,y+e_2,z_0) \ \ \text{where} \ e_1,e_2=\pm1.$$
In all cases, the sum of coordinates of connected points either staies the same or is changed by $2$ units.
(same reasoning if the fixed coordinate is $y$ or $x$).
Therefore the $3^3-1=26$ vertices can be separated in the same way as for the case $n=1$ into two subsets that cannot "communicate", according to the parity of the sum of their coordinates. As a consequence, we have an induced partionning of the diagonal segments.   
What we have done for these two cases extends immediately to the general case. 
I am indebted to @Misha Lavrov who has spotted a default in my presentation.