Combinatorics and not getting your hat

  • Thread starter Thread starter Alkatran
  • Start date Start date
  • Tags Tags
    Combinatorics
Click For Summary

Homework Help Overview

The discussion revolves around a combinatorial problem involving derangements, specifically the probability that no one at a party ends up with their own hat. The original poster presents their calculations and seeks to simplify the expression for the probability further.

Discussion Character

  • Exploratory, Mathematical reasoning, Assumption checking

Approaches and Questions Raised

  • The original poster attempts to simplify the summation related to derangements and questions whether a non-summation formula exists. Other participants provide insights into the nature of derangements and explore the relationship between the summation and the expression involving e.

Discussion Status

Participants are actively engaging with the mathematical concepts, sharing various forms of the derangement formula and discussing the implications of the summation. There is a recognition of the complexity of the problem, with some participants suggesting that the summation form may be preferable for clarity.

Contextual Notes

Some participants note discrepancies in the formula when n equals 0 and discuss the implications of using the nearest integer function in relation to the probability calculation.

Alkatran
Science Advisor
Homework Helper
Messages
959
Reaction score
0
We were given an extra credit problem in discrete structures 2 today. The problem is: n people go to a party and leave a hat. When they leave they take a random hat. What is the probability that no one ends up with the same hat?
I can calculate the probability, but I was just wondering if I can simplify this any more. Here is my basic work (obviously a lot of reasoning is left out):

2 people:
[tex]2! - 2*1! + 1 = 1[/tex]

3 people:
[tex]3! - 3*2! + 3*1! - 1 = 2[/tex]

generalized:
[tex] \sum_{x=0}^n _n C_x (n - x)! (-1)^x[/tex]

simplified:
[tex] \sum_{x=0}^n \frac{n!}{x!}(-1)^x[/tex]
I know that this needs to be divided by n! to get the probability.

Is there any way to get rid of the summation or simplify in some other way?

edit: just realized I could take the n! out. It's now obvious that the summation stays nicely between 1 and 0... still not sure where to simplify from there.
 
Last edited:
Physics news on Phys.org
This is a derangement problem and you got it: good job! The number of derangements of n objects, say hats, is variously denoted by [itex]D_n[/itex] or by [itex]!n[/itex] and is given by

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

EDIT: I fixed the link (it goes to mathworld now).
 
Last edited:
Excellent. So I suppose that means there isn't a non-summation (elementary?) formula for the summation of -1 to the x divided by x factorial from 0 to n?
 
[tex]!n=\left[ \frac{n!}{e}\right][/tex] where [x] is the nearest integer function.
 
benorin said:
[tex]!n=\left[ \frac{n!}{e}\right][/tex] where [x] is the nearest integer function.

I found that one on mathworld too, very nice. Small point though: It doesn't match when n = 0.

I'm going to stick with the summation form: I can show the work to make it there. I have no idea how to reach round(n!/e).
 
Hmm... I'll try.

We know that [tex]!n=\sum_{k=0}^n \frac{n!}{k!}(-1)^k=n!\sum_{k=0}^n \frac{(-1)^k}{k!}[/tex] is, by your combinatorial argument, an integer, furthermore we have

[tex]\frac{n!}{e}=n!e^{-1}=n!\sum_{k=0}^{\infty} \frac{(-1)^k}{k!} = n!\sum_{k=0}^{n} \frac{(-1)^k}{k!} + n!\sum_{k=n+1}^{\infty} \frac{(-1)^k}{k!} = !n+n!\sum_{k=n+1}^{\infty} \frac{(-1)^k}{k!}[/tex]

so we need to show that the second term in the last equality is less than unity, and we wish to know when it is greater than 0.5 [I think].

Since it is an alternating series, we have an estimation theorem for that... notably, it is also the remainder for a Taylor series (times n!).
 
benorin said:
Hmm... I'll try.
We know that [tex]!n=\sum_{k=0}^n \frac{n!}{k!}(-1)^k=n!\sum_{k=0}^n \frac{(-1)^k}{k!}[/tex] is, by your combinatorial argument, an integer, furthermore we have
[tex]\frac{n!}{e}=n!e^{-1}=n!\sum_{k=0}^{\infty} \frac{(-1)^k}{k!} = n!\sum_{k=0}^{n} \frac{(-1)^k}{k!} + n!\sum_{k=n+1}^{\infty} \frac{(-1)^k}{k!} = !n+n!\sum_{k=n+1}^{\infty} \frac{(-1)^k}{k!}[/tex]
so we need to show that the second term in the last equality is less than unity, and we wish to know when it is greater than 0.5 [I think].
Since it is an alternating series, we have an estimation theorem for that... notably, it is also the remainder for a Taylor series (times n!).

so, picking up at the alternating series estimation, we know that the error in estimating [itex]\frac{n!}{e}[/itex] by stopping at the nth term is less than the absolute value of the next term in the series, hence

[tex]\left| \frac{n!}{e} - !n\right| \leq \frac{n!}{(n+1)!} = \frac{1}{n+1}<1,[/tex]

therefore round it! [but I am tired :zzz: , so have a go at it: I'm likely missing something...]
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
3
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
Replies
8
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K