First two rows of the chess board

Question: How many ways are there of arranging the sixteen black or white pieces of a standard international chess set on the first two rows of the board? Given that each pawn is identical and each rook, knight and bishop is identical to its pair.

Answer:

6,48,64,800 ways

There are total 16 pieces which can be arranged on 16 places in 16P16 = 16! ways.

(16! = 16 * 15 * 14 * 13 * 12 * ..... * 3 * 2 * 1)

But, there are some duplicate combinations because of identical pieces.

* There are 8 identical pawn, which can be arranged in 8P8 = 8! ways. * Similarly there are 2 identical rooks, 2 identical knights and 2 identical bishops.