Let's think about this. Forward, backward, right, and left is 4 possible movements.
If the ant goes the same direction twice, the only path it can take is back the opposite direction twice.
If the ant goes a direction once and goes back to the origin again, the ant can move any four ways but then must come back.
If the ant goes a direction once and goes a different direction, there are two ways, come back the original way or go in a square-like shape.
Translating this to numbers, we have
\(4\times 1 \times 1 \times 1=4\)
\(4 \times 1 \times 4 \times 1 = 16\)
\(4\times 2\times 2 \times 1 = 16\)
\(16+16+4=36\)
The total number of pathways are \(4^4=256\)
So, \(\frac{36}{256}=\frac{9}{64}\).
(by the way, can anyone check this, preferably one of the moderators? i'm not 100% sure. thanks!)
You are very welcome!
:P