We are playing a Halloween game in which we place either an orange piece or a black piece at each of the squares of a four by four chessboard. How many ways can we do this so that every pair of rows has matching squares at exactly two of the four positions within the rows? I have determined one way to be:
O B B O
B B O O
O O O O
O B O B
Where each O is an orange piece and each B is a black piece
And one can verify that this indeed satisfies the conditions.
But in how many total ways can we do this? Thank you!!!