Introduction
Some of the most delightful puzzles in mathematics spring from the simplest of beginnings. No need for complicated formulas or exotic machinery—just a few well-chosen rules, a familiar setting, and suddenly, you are stepping into a world where intuition alone is not enough. A cube of cheese, a hungry mouse, and a humble grid of possible moves may seem like ingredients for a children’s story, but they conspire here to form wonderfully rich and challenging mathematical puzzles.
These are the kinds of puzzles that capture the imagination: they invite you to play, to explore, to experiment. You might start sketching paths, building 3D mazes, and soon enough, you’re caught up in questions of movement, symmetry, and strategy.
In this post, we’ll explore two delightful puzzles—these ones that lie at the intersection of spatial reasoning, combinatorics, and a touch of graph theory. "A touch of graph theory" here must be taken literally since the solutions provided for each puzzle involved more logical reasoning than formal theory. They do, however, hint at some of the types of arguments used in formal settings, such as coloring parity checks. Thus, even though the reader may not be familiar with any advanced math, he would still be able to solve these problems by using their unaided logic and spatial insight alone.
We recommend that the reader attempt all the problems on their own before peeking at the solutions. It should be emphasized that an attempt at solving the problem is of great value even if it is unsuccessful: it helps the solver to penetrate to the essence of the problem and its difficulty, and thus to understand and to better appreciate the solution presented here.
We’ll walk through the structure of two similar puzzles, explore their hidden patterns, and uncover the beauty that lies beneath their modest surface. Come along, and let’s see where the mouse’s journey leads.
Warm-up Puzzle
1. \(27\) identical cubic chunks of cheese are piled together to form a \(3\times3\times3\) large cube, as shown below. A mouse of negligible size starts at the center of the face of any one of the outside cubes and eats its way through the large cube by tunnelling through all of these \(1\times1\times1\) cheese chunks. It always travels along the grid of \(27\) straight lines that pass through the centers of the chunks, parallel or perpendicular to their sides, and never enters any chunk more than once.
Can the mouse traverse each of the \(26\) outside chunks once and only once, then finish its trip by entering the central chunk for the first time? If so, then demonstrate how it can be done; if not, then prove it is impossible.\(^{1}\)
A Harder Puzzle
However, readers may still wish to test their three-dimensional pathfinding prowess on this exceedingly tricky, yet beautiful, problem. Consider a far more challenging situation, this time involving our original mouse’s little brother. He was the runt of the litter and, unfortunately, didn’t grow up to be particularly bright, though, to be fair, he’s a most agreeable fellow. As a result, our new scenario unfolds as follows:
2. Suppose that \(27\) cubic chunks of cheese of identical size are piled together to form a \(3\times3\times3\) cubical stack, as shown above. A mouse of negligible size starts at the center of the face of any one of the outside cubes and eats its way through the large cube by tunnelling through all of these \(1\times1\times1\) cheese chunks. He always travels along the grid of \(27\) straight lines that pass through the centers of the chunks, parallel or perpendicular to their sides, always makes a \(90°\) turn at the center of each chunk, and never enters any chunk more than once. How many cheese chunks at most (out of the 27) can the mouse munch before exiting the stack?\(^{2}\)
I've left a spoiler sign below as a last barrier between the reader and the answer.
Answers
The mouse cannot traverse all \(26\) outer chunks of cheese and end its journey in the central one. This can be demonstrated elegantly using a coloring argument based on parity. Color the small cubes or the \(1\times1\times1\) subcubes in a three-dimensional checkerboard pattern: Without loss of generality, number the centers of the \(27\) subcubes by coordinates \(\left(x,y,z \right)\), \(x,y,z\in \{0,1,2\}\) so that the central cube has coordinates \(\left( 1,1,1\right)\). Then, color each subcube white if the sum of its coordinates \(\left( i,j,k \right)\) is odd, and black otherwise, thereby having any two cubes that share a face oppositely colored. Intuitively, since each subcube must be surrounded by subcubes of the opposite color, once the first \(3\times3\) layer of subcubes of the large cube is colored in a checkerboard pattern, each subsequent layer follows as an inverted coloring of the previous one. This alternating pattern continues until the third layer is reached, completing the three-dimensional checkerboard structure within the chosen frame of reference, as illustrated below.
1. The large cube, then, will consist of \(13\) white and \(14\) black subcubes. Since the mouse always moves from one subcube to an adjacent one, its path must alternate between black and white. Thus, any path that includes all the \(27\) subcubes must begin and end with a subcube belonging to the color set of larger size (the set of \(14\) black cubes). The central cube, however, belongs to the set of white subcubes with a size of \(13\); hence, such a path is impossible.
We can extend this problem to other types of cubes as well. A cube of even order (i.e., with an even number of \(1 \times 1 \times 1\) subcubes along one edge) contains an equal number of subcubes of each color. While there is no central subcube, complete paths can begin on any subcube and end on any subcube of the opposite color. In contrast, a cube of odd order has one more subcube of one color than the other; therefore, a complete path must begin and end on the color used for the larger set. In odd-order cubes of order \(n\in \left\{3,7,11,15,19,23, ... \right\}\), the central cube belongs to the smaller color set, so it cannot serve as the endpoint of any complete path. On the other hand, in odd-order cubes of order \(n\in \left\{1,5,9,13,17,21, ... \right\}\), the central cube belongs to the larger color set, making it a valid endpoint for a path that starts on a subcube of the same color. Nevertheless, no closed path, going through every subcube, is possible on any odd-order cube, due to the imbalance in the number of subcubes of each color\(^{3}\).
2. To determine the maximum number of chunks of cheese the mouse can munch, we must first prove a little theorem of the classic 'if-then' variety. In other words, we need to establish that if such an optimal path exists, then it must necessarily have a certain length, measured, naturally, in cubic units of cheese! Only after this can we proceed to provide proof of existence by demonstrating the direction within the stack that the mouse must follow to maximize his cheesy gains. We may write the statement of this little theorem succinctly as follows:
Theorem
If a valid mouse path in the \(3\times3\times3\) cubical stack visits exactly \(25\) unit cubes, then this is the longest possible path.
Upper Bound Proof:
Visualize the cubical stack of cheese as a Rubik's Cube, composed of \(27\) individual pieces (unit cubes). Much like the familiar way we analyze the world's famous combination puzzle, but with a slight twist, we can classify these \(27\) pieces into four distinct categories, each with its unique place in the structure:
- Vertices (\(V\)): \(8\) pieces at the eight corners
- Edges (\(E\)): \(12\) pieces halfway along each edge
- Faces (\(F\)): \(6\) pieces at the centers of the faces
- Core (\(C\)): The single piece at the center of the stack
By hypothesis, the mouse always makes a \(90°\) turn at the center of each piece, so he never travels straight through any three pieces (i.e., along only one axis). Suppose the mouse goes from one corner piece to another. Since two corners are "diagonally" separated in one, two, or three directions (i.e., Two corners differ in at least one coordinate center (\(x,y,z\))), he cannot go straight through; After exiting the first corner, he arrives in an edge piece along one axis, then he must turn at the center and head off along a perpendicular axis. The only way to do that is to pass through a face-center piece. Therefore, every time the mouse travels between two corner pieces, he must chew through at least one face-center piece.
Moreover, if our little fellow ventures through the very core piece \(C\) between two corners, he will approach C along one axis, then exit along a different one, and in doing so, he must pass through at least two face-center pieces (one on each side of \(C\)) before reaching the second corner (This path looks like this; \(V_{1}\to F_{1}\to C\to F_{2}\to V_{2} \), with edge pieces omitted for compactness).
Now, let \(k\) be the total number of distinct corner pieces the mouse visits. Then there are \(k-1\) "gaps" between successive corner visits (these gaps contain all the intermediate pieces the mouse nibbles through between corner visits without revisits). Furthermore, observe that in a given path, the mouse either passes through the core piece \(C\) or does not. Consequently, only the following two cases are possible:
Case 1 (He never passes through the core piece \(C\)):
Each of the \(k-1\) gaps requires at least one face-center piece, and there are only 6 such pieces. Hence
$$(k-1)\times1\le 6 \Longrightarrow k\le 7$$
Case 2 (He does pass through the core piece \(C\)):One special gap (the one straddling \(C\)) now requires at least two face-center pieces, and the other gaps at least one each. Thus
$$2+(k-2)\times1\le 6 \Longrightarrow k\le 6$$
It follows that no matter which case actually occurs, the mouse can visit at most \(7\) corners (If he skips the core) or \(6\) corners (if he munches the core). In the first case, he's left at least the core piece and one corner untouched; that knocks his maximum haul down from \(27\) to \(27-2=25\). In the second, he simply omits two corners at least, again giving \(27-2=25\). Thus, our nice little fellow—despite his twits and turns—can never chew through more than \(25\) cubic cheese chunks before, alas, finding the exit. And indeed, one can draw out a full \(25\) zigzagging route (as we'll shortly see), so this is our unbeatable maximum.
Without loss of generality, let us assign coordinates \(\left(x,y,z \right)\) to the geometric centers of the \(27\) cheese chunks, where \(x,y,z\in \{0,1,2\}\). We orient the cubic grid that connects all the centers of the chunks in the stack so that the \(x\)-axis points to the right, the \(y\)-axis points away from the observer, and the \(z\)-axis points upward. The center of the chunk \(\left( 0,0,0\right)\) lies at the lower-left-front corner (closest to the observer and lowest in height), while \(\left( 2,2,2\right)\) lies at the upper-right-back (farthest from the observer and highest). In this setup, the front side of the cubic grid lies in the plane \(y=0\), the back side in \(y=2\), the bottom side in \(z=0\), the top side in \(z=2\), the left side in \(x=0\), and the right side in \(x=2\). Following this convention, we can give directions as a succession of center coordinates; the little brother of our original mouse must follow in order to achieve his cheesy great larceny under the right-angle turn and the never-revisit rules, respectively. As follows:
$$(0,0,0)\to (1,0,0)\to (1,1,0)\to(0,1,0)\to (0,2,0)\to$$
$$(1,2,0)\to(1,2,1)\to (0,2,1)\to(0,2,2)\to (0,1,2)\to$$
$$(0,1,1)\to (0,0,1)\to (0,0,2)\to (1,0,2)\to (1,0,1)\to$$
$$(2,0,1)\to(2,0,0)\to (2,1,0)\to (2,1,1)\to (2,2,1)\to$$
$$(2,2,2)\to (1,2,2)\to (1,1,2)\to (2,1,2)\to(2,0,2)$$ *
The arrows shown above trace the mouse’s trip from one cubic cheese chunk to the next. In this particular path, the mouse begins in the lower-left-front corner and finishes in the upper-right corner chunk on the front face. Interestingly, if you reverse the direction of all the arrows, you obtain another valid path—each step still obeys the movement rules.
It’s essential to note that this does not prove uniqueness. There may be other clever mouse tours that satisfy the same conditions. The key point is that we’ve managed to construct at least one such path, which is enough to settle the question (this is what mathematicians call a constructive proof). But if you’re feeling adventurous, you might enjoy trying to discover other routes through the cube. The mouse would surely appreciate the extra options!
*Thanks to avid readers, I could spot a mistake in the path's original construction. I was so focused on the upper-bound proof that I forgot to check the path's validity. Now, there's a new path whose construction is hopefully correct.
References
1. Adapted from Gardner, M. (1994). Problem 47 in My Best Mathematical and Logic Puzzles. Dover Publications. p. 27
2. Adapted from Hoeflin, R. K. (1985, April). Problem 32 in The Mega Test. Omni, 7(4), p. 129.
3. Analysis of the general case adapted from Gardner, M. (1994). My Best Mathematical and Logic Puzzles. Dover Publications.



Comments
Post a Comment