Waste less time on Facebook — follow Brilliant.
×

Egyptian Informatics Olympiad 2009

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

Note by Anurag Choudhary
3 years, 9 months ago

No vote yet
6 votes

Comments

Sort by:

Top Newest

Probably 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

Comment deleted Nov 11, 2013

Log in to reply

@Sambit Senapati That would be infinity Avinash Iyer · 3 years, 9 months ago

Log in to reply

@Nayan Pathak 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) Anurag Choudhary · 3 years, 9 months ago

Log in to reply

×

Problem Loading...

Note Loading...

Set Loading...