Math Problem : HH.8 Insect moving along the side of solid

A certain insect is moving along the side of the pentagonal pyramid of the figure below.

When it started to move from the vertex A and come back to the vertex A again, how many ways are there on condition it never pass through the vertex twice and side passing through once ?














Answer
40 ways

Solution
There are five ways starting from A to each of B,C,D,E,F. 

Then there are two ways whether it rotates in the clockwise or counterclockwise direction. 

In addition, there are four ways going back to A when it comes to which vertex. 

In total, there are 40 ways by the calculation of 5 × 2 × 4 = 40.