An ant decides to walk on the perimeter of an $ABC$ triangle. The ant can start at any vertex. Whenever the ant is in a vertex, it chooses one of the adjacent vertices and walks directly (in a straight line) to the chosen vertex. a) In how many ways can the ant walk around each vertex exactly twice? b) In how many ways can the ant walk around each vertex exactly three times? Note: For each item, consider that the starting vertex is visited.
Problem
Source: Lusophon 2012 CPLP P4
Tags: geometry, perimeter, combinatorics, combinatorial geometry