2
$\begingroup$

Find the number of ways string of numbers (may contain similar items) could be deranged so that a number is not placed in the same place as it or its similar numbers were placed.

For example, $\{0,0,0,1,1,1\}$ could be arranged in only one way and that is $\{1,1,1,0,0,0\}$.

$\{0,0,0,1,1,1,1\}$ cannot be arranged in any way.

$\{1,2,2,14\}$ can be arranged in $2$ ways i.e $\{2,1,14,2\}$, $\{2,14,1,2\}$.

$\{1,1,2,2,14\}$ can be arranged in $5$ ways i.e $\{2,2,1,1,14\}$, $\{14,2,1,1,2\}$, $\{2,2,14,1,1\}$, $\{2,2,1,14,1\}$, $\{2,14,1,1,2\}$.

Please do try and respond. Thanks in advance.

  • 1
    The answer is in [this Wikipedia section](http://en.wikipedia.org/wiki/Derangement#Generalizations).2012-05-21
  • 0
    marvis thank you for the edit, @joriki tht was incredile stuff by you. However for words made up of two different letters the answer was pretty simple, but i could not figure out the answer for more no. of numbers. Integrations I am familiar with. but in that secion it says for a certain sequence of polynomials P.. I didnt understand how to implement that P, and what could be the possible x value. A little more clarification on this will be very helpful. Thanks in advance.2012-05-21

1 Answers 1