0

How many ways are there to arrange n objects into n bins, subject to the n constraints that the ith object can't go in the ith bin for any 1 <= i <= n ? Each bin has to contain exactly one object.

RobPratt
  • 50,938
Jerry Guern
  • 2,764
  • 2
    @JoshuaWang Correction, they are called derangements in the event that we require exactly one ball per bin. That is not stated in this problem. The answer here is simply $(n-1)^n$, seen directly via rule of product. – JMoravitz Dec 16 '20 at 02:27
  • In the event of one object per bin, these are called derangements. https://en.wikipedia.org/wiki/Derangement – Joshua Wang Dec 16 '20 at 02:31
  • @JoshuaWang Ah, thank you for a useful response. If you put it down below as an Answer, I'll checkmark it. – Jerry Guern Dec 16 '20 at 03:09

1 Answers1

1

You do not state that each bin can only contain $1$ object, if this were so then the answer would be derangements (as JW comments)

Each of the $n$ objects can go into $n-1$ bins ... there are $\color{red}{(n-1)^n}$ ways to do this.