24) An ant is located at a vertex of a cube. It moves by traveling along the edges of the cube in such a way that it passes through each vertex exactly once. How many distinct paths can it follow? (A) 10, (B) 18, (C) 22, (D) 26, (E) 30.
24. The answer is (B).

Let's refer to the figure below and assume that the ant starts from vertex $A$.

![](https://cdn.mathpix.com/cropped/2024_04_17_e415f128e14398de33bcg-8.jpg?height=288&width=417&top_left_y=741&top_left_x=882)

One type of path the ant can take is to initially traverse three sides of the same face (one of those to which $A$ belongs), passing through all four of its vertices, then move (necessarily) to a vertex of the opposite face, and traverse its three sides, passing through all its vertices. An example of such a path is the sequence of vertices:

## $A B C D H G E F$,

where the ant first traverses three sides of the face $A B C D$ and then the three sides of the opposite face: $H G E F$. Note that each of the two faces can be traversed in two distinct directions, so for each choice of the two opposite faces, there are four such paths. On the other hand, the starting vertex is common to three distinct faces, so we have 12 paths of this type. A second possibility is that the ant initially traverses only two sides of the same face, for example, the face $A B C D$, and then moves to a vertex of the opposite face, for example, suppose the beginning of the path is the sequence: $A B C G$. At this point, the ant must still pass through all the vertices of the face $H G E F$, except for $G$, and must pass through $D$. The only way to do this without passing through the same vertex twice is the sequence of vertices: $E F H D$. Thus, we have identified the path $A B C G E F H D$. A path similar to this, where the first two vertices are still from the face $A B C D$, is: $A D C G H F E B$. Therefore, we have two paths of this second type if we fix the face containing the first two sides that the ant traverses. Keeping in mind that the initial vertex is common to three faces, we have six paths of the second type. In total, we have identified $12+6=18$ distinct paths. We observe that there are no others: indeed, there are no paths in which the first two sides traversed are not common to the same face of the cube.

[Problem proposed by D. Lombardo.]