Olympiad question: How many permutations with no fixed letters does BHARAT have

combinatoricscontest-mathpermutations

We will say that a rearrangement of the letters of a word has no fixed letters if, when the rearrangement is placed directly below the word, no column has the same letter repeated. For instance, HBRATA is a rearrangement with no fixed letters of BHARAT. How many distinguishable rearrangements with no fixed letters does BHARAT have? (The two As are considered identical.)

The solution

A p&c question is given with its solution which was asked in mathematics olympiad , but the solution is very tricky to understand so how will we understand the solution ?

Best Answer

There are $\binom4 2$ ways = $6$ ways in which the two $A's$ are out of position.

The remaining $4$ distinct letters with $2$ of them (call them $X$ and $Y$) "in position"

We now apply inclusion-exclusion, to find total permutations minus those with at least $X$ still in position minus at least $Y$ still in position plus both $X$ and $Y$ still in position (because we subtracted such cases twice), thus

$4!-3!-3!+2! = 14$ and multiply by $6$