@oolongteasup,
The problem is typical of a "how many routes through a road network without going back on yourself" problem. Each letter is a road junction with a left/right decision. The solution is found by cummulatively summing the possible routes to each junction as you go. For example the first three G's have value 1,2,1 respectively, which then gives the four I's as 1,3,3,1. The next line of G's will therefore be 4,6,4 and so on. (Check out Pascal's Triangle).