In how many ways can they be arranged in a row such that the numbers on consecutive pieces match.
Count the two directions separately.
blackjack
flooble's webmaster puzzle