Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
In how many ways we can put $r$ distinct objects into $n$ baskets?

How many number of ways I can wear four dresses for n days without wearing the same dress for two consecutive days and the dress on first and nth day should also not be same. Repetition of dresses is allowed.

For $n=3$ It'll be $4\times3\times2 = 24$.

Can someone please tell me what will be the answer of $n\ge5$ and also how to solve such questions where objects to arrange are lesser than spaces.

A sample scenario for

$n=5$ A1,A2,A1,A2,A3

$n=6$ A1,A2,A1,A2,A1,A2

share|cite|improve this question

marked as duplicate by joriki, EuYu, Thomas, Gerry Myerson, MJD Oct 15 '12 at 4:02

This question was marked as an exact duplicate of an existing question.

This is a most astonishing phenomenon. This is about the fifth different form in which this problem has been presented within two weeks or so. It's as if some class had received an assignment to think of an appealing story to cloak this combinatorial problem in and go online to get it answered :-) I'll dig out the duplicate shortly... – joriki Oct 14 '12 at 18:58

Edited: for the dresses question.

$4*3^{n-1} -9$

share|cite|improve this answer
This assumes the dress of the second last day is not the same as the dress of the first day. I think some possibilities are missing. – EuYu Oct 14 '12 at 18:59

Not the answer you're looking for? Browse other questions tagged or ask your own question.