0

In how many ways can 123456728905be permuted such that, neither two 2's nor two 5's are adjacent to each other ?

I'm really confused how to ensure those conditions?

0 is allowed to come as the first. Consider these are simple characters, not as a whole number.

Can someone help me ?

vaidy_mit
  • 631
  • Did you try to find all possible numbers minus all numbers that of two 2's or two 5's adjacent to each other ? – Airbag Feb 02 '14 at 13:51

1 Answers1

2

Hint: Calculate the number of ways in which the two $2's$ and the two $5's$ are always adjacent to each other. Subtract this from the total possible permutations.

Total possible permutations: $\frac{12!}{2!*2!}$

Now group the two $2's$ together and the two $5's$ together. So you have a total of $10$ strings now in place of $12$. So total possible permutations: $10!$

Required permutations would then be: $\frac{12!}{2!*2!} - 10!$

lsp
  • 4,745