Hanadi has N flower pots each with a unique flower. The pots are arranged along a line. One day she decided to change their order under the condition that no two pots that were originally next to each other remain next to each other. Find no of days she can continue this way :

For 5 pots there are 14 orders satisfying Hanadi’s condition, assuming the original order of pots was “ABCDE” then the 14 possible orders are:

ACEBD ADBEC BDACE BDAEC BECAD CADBE CAEBD CEADB CEBDA DACEB DBEAC DBECA EBDAC ECADB

## Comments

Sort by:

TopNewestProbably Catalan numbers, but that's just my first guess. – Ivan Stošić · 3 years, 9 months ago

Log in to reply

principle of IEB,let the unrestricted cas e be N,that is n factorial,now by the principle,we knw N(A1 un A2 unA3....An)=N-n(1)+n(2)....... – Nayan Pathak · 3 years, 9 months ago

Log in to reply

Log in to reply

– Avinash Iyer · 3 years, 9 months ago

That would be infinityLog in to reply

– Anurag Choudhary · 3 years, 9 months ago

Answer would come from some kind of recurrence relation and for your information correct answer is is (N - 1)! - Σk! (k from 0 ko N-2)Log in to reply