Placing n numbered balls in n numbered cells

  • Context: Undergrad 
  • Thread starter Thread starter Karlx
  • Start date Start date
  • Tags Tags
    Balls Cells
Click For Summary

Discussion Overview

The discussion revolves around calculating the probability of obtaining exactly k matches when placing n numbered balls into n numbered cells, with no cell receiving more than one ball. Participants explore combinatorial reasoning and derangements in the context of probability theory.

Discussion Character

  • Exploratory
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant states that the total number of configurations for placing n balls in n cells is n! and seeks a general expression for the probability of exactly k matches.
  • Another participant suggests that the (n-k) non-matches form a derangement.
  • A participant proposes that the probability is the number of ways to have exactly k matches divided by n!, indicating a combinatorial approach.
  • It is mentioned that the number of derangements can be expressed as !n = n! ∑_{i=0}^n (-1)^i/i!.
  • One participant provides a formula for the probability of exactly k matches as P(k) = (nCk) ∑_{i=0}^{n-k} (-1)^i/i!.
  • Another participant expresses doubt about the correctness of the formula (nCk)/n! for the probability.
  • A correction is later provided, stating that the correct form for P(k) is (1/k!) ∑_{i=0}^{n-k} (-1)^i/i!.

Areas of Agreement / Disagreement

Participants express differing views on the correct formulation of the probability, with some supporting the use of derangements and others questioning the validity of certain expressions. The discussion remains unresolved regarding the definitive probability expression.

Contextual Notes

Participants acknowledge that there are multiple approaches to the problem, including combinatorial reasoning and the use of derangements, but do not reach a consensus on the final probability expression.

Karlx
Messages
75
Reaction score
0
Hi everybody.
I keep on reading Rohatgi's book "An introduction to Probability and Statistics".
Just now I am working in the following problem:
We have n cells numbered 1 to n and n balls numbered 1 to n.
We place at random the n balls in the n cells, with no cell receiving more than one ball.
I'm trying to find the probability to obtain exactly k matches, k=0,1,2,...,n.

Clearly, P(exactly n matches) = 1/n! and P(exactly (n-1) matches) = 0.
But I'm not able to find a general expression for P(exactly k matches).

Could anybody give me a hint.
Thanks.
 
Physics news on Phys.org
Hint: the (n-k) non-matches form a Derangement.
 
hint:
how many total configurations do you have?
how many configurations satisfy your claim?
 
Thanks bpet and outlined.

I have n! total configurations.
I don't know how to calculate how many of them satisfy the condition of "exactly k matches".

Bpet, what is a derangement ?
OK, I found out what is a derangement. Good hint. I will work it out. Thanks.
 
Last edited:
The probability you seek is the number of ways to have exactly k matches, divided by the total number of ways to distribute the balls. The latter is clearly n! To find the former, start by finding the number of ways that k slots, specified in advance (e.g. the slots numbered 1-k), can have matching balls while the other ones don't. Then...I probably shouldn't give you more information than that.
 
it will be (nCk)/n!
 
A derangement is a permutation of the elements of a set such that none of the elements appear in their original position.
For a set of n elements, the number of possible derangements is

[tex] !n = n! \sum_{i=0}^n \frac{(-1)^i}{i!}[/tex]

where !n is called the subfactorial of n.

With this information, is not difficult to see that the probability to obtain exactly k matches is
[tex] P(k)= (\stackrel{n}{k})\sum_{i=0}^{n-k}\frac{(-1)^i}{i!}[/tex]

Just a remark: There is no need of knowing about derangements to solve the problem. It is possible (I did it) to solve it only using a combinatorial reasoning. Then, the derangements arise as an "intermediate result", not in the form of !n written above, but in a recursive expression.

Thanks for your help.
 
Last edited:
Krish@physics said:
it will be (nCk)/n!

I doubt this is correct
 
yes it is
 
  • #10
Karlx said:
A derangement is a permutation of the elements of a set such that none of the elements appear in their original position.
For a set of n elements, the number of possible derangements is

[tex] !n = n! \sum_{i=0}^n \frac{(-1)^i}{i!}[/tex]

where !n is called the subfactorial of n.

With this information, is not difficult to see that the probability to obtain exactly k matches is
[tex] P(k)= (\stackrel{n}{k})\sum_{i=0}^{n-k}\frac{(-1)^i}{i!}[/tex]

Just a remark: There is no need of knowing about derangements to solve the problem. It is possible (I did it) to solve it only using a combinatorial reasoning. Then, the derangements arise as an "intermediate result", not in the form of !n written above, but in a recursive expression.

Thanks for your help.


Sorry, there was a mistake in the expression for P(k).
The correct form is

[tex] P(k)= (1/k!)\sum_{i=0}^{n-k}\frac{(-1)^i}{i!}[/tex]
 

Similar threads

  • · Replies 29 ·
Replies
29
Views
6K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K