# Thread: Finding the number of ways

1. ## Finding the number of ways

Hi, if we have an initial arrangement say 12345 where all elements are unique, then in how many ways can one re-arrange them so that in the final configurations none of the elements which were adjacent to each other in the given arrangement are adjacent now in the final configurations.?
Does this involve some series?
E.g for 5 element say 12345, the number of such arrangements is 14.
Thanks.

2. ## Re: Finding the number of ways

Originally Posted by pranay
Hi, if we have an initial arrangement say 12345 where all elements are unique, then in how many ways can one re-arrange them so that in the final configurations none of the elements which were adjacent to each other in the given arrangement are adjacent now in the final configurations.? Does this involve some series?
E.g for 5 element say 12345, the number of such arrangements is 14.
How did you get that 14?

Note that for $\displaystyle 123$ there are no cases.

How many are there for $\displaystyle 1234$?
Is this one of those, $\displaystyle 3142~?$
Given that string, there are three places to put a 5: $\displaystyle 53142,~35142,~31425$.

So if we know how may valid cases there are for $\displaystyle 1234$ we can build valid cases for $\displaystyle 12345$.

I will let you work on that.

3. ## Re: Finding the number of ways

if the initial configuration is ABCDE , then the 14 required configurations are:
ACEBD
BDACE
BDAEC