Gus Gauss likes to hack his holiday lights together himself. The last thing he has to decorate is the fence around the front yard and his design calls for red and green alternating lights. Unfortunately for him he doesn't have a single string of lights long enough to do the job but he does have twelve sections of lights that he can splice together that can be used. Here are the strings of lights he has:
String 1:
R --- G ---R --- G ---R --- G ---R --- G ---R --- G ---
String 2:
G ---R --- G ---R --- G ---
String 3:
G ---R --- G ---R --- G ---R --- G ---R --- G --- R ---
String 4:
R --- G ---R --- G ---R ---
String 5:
R --- G ---R --- G ---R --- G ---R --- G ---R --- G ---
String 6:
G ---R --- G ---R --- G ---
String 7:
G ---R --- G ---R --- G ---R --- G ---R --- G --- R ---
String 8:
R --- G ---R --- G ---R --- G ---R --- G ---R --- G ---
String 9:
G ---R --- G ---R --- G ---
String 10:
G ---R --- G ---R --- G ---R --- G ---R --- G --- R ---
String 11:
R --- G ---R --- G ---R ---
String 12:
R --- G ---R --- G ---R --- G ---R --- G ---R --- G --- R --- G ---R --- G ---R ---
The lights are of a unique type and require special splices. The cost to splice a green light to a red light is 25 cents (0.25 dollars) and to splice a red light to a green light is 22 cents (0.22 dollars). This means the cost of splicing String 1 to the end of String 2 is is 22 cents but to splice string 2 to the end of string 1 costs 25 cents.
What is the cheapest way for Gus to attach create the string he needs to finish his decorating?
To simplify things, if he joins two green lights with a red light it costs 22 cents and joining two reds with a green costs 25 cents.