A bug starts at one vertex of a cube and moves along the edges of the cube according to the following rule. At each vertex the bug will choose to travel along one of the three edges emanating from that vertex. Each edge has equal probability of being chosen, and all choices are independent. What is the probability that after seven moves the bug will have visited every vertex exactly once?
- A)
- B)
- C)
- D)
- E)
Answer
C
Key insight
Fix the first two moves by symmetry (3 · 2 ways); only 3 of the remaining continuations visit every vertex, so 18 good paths out of 3^7 equally likely ones.
Solution
Seven moves reach eight vertices, so the walk must never repeat a vertex. All move sequences are equally likely, so we count the non-repeating ones.
Label the top face in order and the bottom face with below , below , below , below . Start at . The first move has options and the second has (no going back); by symmetry every such start is equivalent, so assume the path begins and multiply by later.
From the unvisited neighbors are and .
Case 1: . From the only unvisited neighbor is . From the rest of the bottom face is traversed either way: or . That is paths.
Case 2: . From , go to or .
- : then (since is used), , . path.
- : the unvisited vertices are . Going to strands and ; going to then strands . paths.
So completions follow , and there are good sequences in all. The probability is
The answer is .
Why this works
With a uniform choice at every step, the probability is (good sequences)/(all sequences), so the problem is really counting Hamiltonian paths from a vertex of the cube. Symmetry collapses the first two moves to a single representative, and after that the cube is small enough that a short case tree, pruned whenever a vertex becomes unreachable, finishes the count.
Alternative approach
Answer-choice check: the first two moves are always free ( ways) and the rest is determined by symmetry, so the number of good paths is a multiple of and the probability has the form . Only fits; the others are .
The trap
Forgetting to multiply the 3 completions by the 3 · 2 choices for the first two moves (giving 3/2187 = 1/729, choice (B)), or using 3^8 as the total.
Common mistakes
- Forgetting to multiply the completions by the choices for the first two moves (giving , choice (B)), or using as the total.
- Overlooking that a Hamiltonian path may never return to the start, so counting closed circuits or allowing the seventh move to revisit .
Techniques
Split into exhaustive cases and handle each · Exploit symmetry to reduce work or pair up objects