Thank you to Alistair, aged 5, who goes to Histon Infants School for sending us this solution to the second part of the problem:

Each piece has to have a pair of the same colour next to it in the line, except for the end and the start. Also each piece has to have a pair of the same shape next to it in the line. To get the longest line, there are exactly 10 pieces in the line with two left over. The 10 pieces include 4 shape pairs plus two odd shapes at the ends.

solution

This isn't the only way of doing it. Maybe you can find another.