Hilbert's Casino (pt. 1)

Calculus Level 2

Your friend, David Hilbert, runs a casino with space for an infinite number of guests. He installs a slot machine with the following properties:

  • Each guest at the casino plays one round at the slot machine after all the guests have arrived.
  • If there are n n guests at the casino, then the odds of winning the slot machine are always 1 n \frac{1}{n} for all of them.
  • When a guest wins, they get all of the money in the machine.

To understand how profitable this machine is, he wants to know the probability that no one wins the slot machine.

If David fills up his casino with a number of guests approaching infinity, what does this probability approach?


The answer is 0.367879441.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

9 solutions

Arjen Vreugdenhil
May 19, 2018

The probability is ( 1 1 n ) n . \left(1 - \frac 1 n\right)^n. In general, lim n ( 1 + x n ) n = e x ; \lim_{n\to\infty} \left(1 + \frac x n\right)^n = e^x; in this case, x = 1 x = -1 so that the probability is e 1 0.368 . e^{-1} \approx \boxed{0.368}.

Moderator note:

A comment here brought up asking how we know e x = lim n ( 1 + x n ) n . e^x = \lim_{n\to\infty} \left(1 + \frac x n\right)^n . This is often the actual definition given, but a very good discussion of this (along with other definitions) comes from Fields medal winner Timothy Gowers:

Blog post from 2011

(Go down to point #4 to see the e e discussion.)

Fond math memories. I was pretty young when I heard of someone buying a whole bunch of lottery tickets and then suing the lottery commision when they didn't win. I imagined buying 100 tickets with a one-in-a-hundred chance then ramped up n and discovered e by this very method.

(I assume the case was thrown out.)

Jeremy Galvagni - 3 years ago

Hey Im a beginner, and I don't really understand how and why the limit as n approaches infinity would be e^x How come ?

Maxence MICHOT - 3 years ago

Log in to reply

Historically, the definition of e WAS as lim(n->∞) (1+1/n)^n. A decent proof of this fact using a more modern definition of e can be found here: https://mathcs.clarku.edu/~djoyce/ma122/elimit.pdf

Using that limit definition of e, it's not hard to show that e^x = lim(n->∞) (1+x/n)^n, as is shown here: https://math.stackexchange.com/a/358873

Jordan Cahn - 3 years ago

Defining e with a limit is erroneous, or at least very backward. Here's why: Limits aren't guaranteed to converge to a value, some can diverge to infinite, negative infinite, or even alternate between different values. So assuming that this limit converges to a single value is very sketchy, or at least until you get to series calculus it is possible to prove it converges with different convergance and divergence theorems, but that seems very out of the way and overcomplicated. That's why I prefer how MIT proffessor David Jerrison presents it. An elegant proof of most of calculus with e: https://ocw.mit.edu/courses/mathematics/18-01-single-variable-calculus-fall-2006/video-lectures/lecture-6-exponential-and-log/

David Weisberg - 3 years ago

Log in to reply

Other definitions of e e have the same problem. The definition of e e as the unique number a a such that d a x / d x = a x da^x/dx = a^x makes all kind of assumptions, about differentiability (involving limits!), existence of a unique solution, etc.

The simplest definition of e e is probably e = k = 0 1 k ! , e = \sum_{k = 0}^\infty \frac{1}{k!}, and the existence of the limit is not difficult to prove.

Arjen Vreugdenhil - 3 years ago

Shouldn't the problem read probability and not odds?

Michael Morgan - 3 years ago

But what about when the casino has only one customer? According to the rules, that customer would have to win.

Rick Schultz - 3 years ago

Log in to reply

Correct. But the problem focuses on the casino filling up indefinitely.

Arjen Vreugdenhil - 3 years ago

I have two problems with this. 1. The question said that it were odds of winning. So the probability of winning would be 1/(1+n). 2. All the events aren't independent. If the first customer wins, the second cannot play because there is no money in the machine (otherwise giving us the last rule doesn't make any sense). So the probability would be like P = W + LW + LLW + … upto infinity Where W is p(win) and L is p(lose).

Kushagra Gupta - 3 years ago

Log in to reply

The problem states: "He wants to know the probability that no one wins the slot machine."

Arjen Vreugdenhil - 3 years ago

@Moderator it’s NOT the definition. The primitive Definition is technically of a function:

[ t ] r c c c l exp ( ) : B B : x n N 1 n ! x n \begin{array}{c}[t]{rcccl} \exp(\cdot) &: &\mathbb{B} &\longrightarrow &\mathbb{B}\\ &: &x &\mapsto &\sum_{n\in\mathbb{N}}\frac{1}{n!}x^{n}\\ \end{array}

where B \mathbb{B} is any Banach-Algebra ( eg C \mathbb{C} or R \mathbb{R} ). One proves that (1) this is an homomophism from the additive structure to the multiplicative structure and (2) it is continuous (in fact infinitely differentiable, in fact holomorphic—obviously).

One now sets in the case of B = C \mathbb{B}=\mathbb{C} or R \mathbb{R} , one sets e : = exp ( 1 ) e:=\exp(1) . Now, since exp ( ) \exp(\cdot) is a continuous homomorphism between the additive and multiplicative structure it thus holds that e x = exp ( 1 ) x = exp ( x ) e^{x}=\exp(1)^{x}=\exp(x) for all x C x\in\mathbb{C} by any sensible definition of powers.

Finally one may prove that ( 1 + x n ) n exp ( x ) (1+\frac{x}{n})^{n}\longrightarrow\exp(x) for N n \mathbb{N}\ni n\longrightarrow\infty . Then by the above, we thus have lim n ( 1 + x n ) n = e x \lim_{n\to\infty}(1+\frac{x}{n})^{n}=e^{x} . Ie this is not really a (safe) starting point, it is a corollary of the definition via the above function.

\ldots that being said, of course, one could start with the limit definition, as one does in school, but this is rubbish.

R Mathe - 3 years ago

Log in to reply

The limit definition is the historical definition. Perhaps you find it no longer up to snuff, but it works rather well. The definition you give for a general Banach algebra is inspired by, based on, and a generalization of precisely the same limit formula.

After all, exp ( x ) = n N 1 n ! x n \exp(x) = \sum_{n\in \mathbb N} \frac 1{n!} x^n is still a shorthand for a limit, exp ( x ) = lim N n = 1 N 1 n ! x n \exp(x) = \lim_{N\to\infty} \sum_{n = 1}^N \frac 1{n!} x^n whose convergence must be proven before the definition can be accepted.

(Also, I believe you forgot the factorial signs in the denominator?)

Arjen Vreugdenhil - 3 years ago

Log in to reply

I know it’s historical. But original attempts are often flawed or unclean. In latter years they get revised and approaches become cleaner, compacter and better. And who cares if the power series is a short hand for a limit of finite sums? I simply meant, that that particular kind of limit is ugly and tedious. By contrast a power series is a lot cleaner and simpler to deal with, in particular as one can easily check that it be absolutely convergent, and that it enjoys the properties of being an homomorphism, is continuous etc., none of which can be readily checked with the older definition.

R Mathe - 3 years ago

what??? if each guest at the casino plays one round at the slot machine after all the guests have arrived, but David fills up his casino with a number of guests approaching infinity, that means no one can ever play the machine since they have to wait for everyone to arrive, which will not happen because there are infinite number of guests! that makes it 0% the way i see it. illuminate me please.

Black Light - 3 years ago

Log in to reply

Approaching infinity is not the same as infinity. The problem was carefully worded to avoid that sort of problem.

Jeremy Galvagni - 3 years ago

@Jeremy Galvagni spot on. The question is not what the probability is , but rather what it approaches .

R Mathe - 3 years ago

okay. thanks guys

Black Light - 3 years ago

How do we know that here x=-1???

erica phillips - 3 years ago

Log in to reply

The moderator’s comment is useful as step 2, not the start. The first step is: P [ none from $n$ ] = 1 p n 0 ( 1 p n ) n = ( 1 1 n ) n = ( 1 + 1 n ) n \mathbb{P}[\text{none from \$n\$}]=1\cdot p_{n}^{0}\cdot(1-p_{n})^{n}=(1-\frac{1}{n})^{n}=(1+\frac{-1}{n})^{n} , where p n p_{n} is the probability of 1 win. We then have P [ none from $n$ ] e 1 \mathbb{P}[\text{none from \$n\$}]\longrightarrow e^{-1} for n n\longrightarrow\infty as per the fact from Analysis.

R Mathe - 3 years ago

Log in to reply

Could u pls explain why is it e^-1 when n approaches infinity!!!!!

erica phillips - 3 years ago

Log in to reply

@Erica Phillips Firstly, please kindly explain which part you don’t get:

  1. that the n n th probability is ( 1 1 n ) n (1-\frac{1}{n})^{n} ; or
  2. that this is of the form ( 1 + x n ) n (1+\frac{x}{n})^{n} with x = 1 x=-1 ; or
  3. that ( 1 + x n ) n e x (1+\frac{x}{n})^{n}\longrightarrow e^{x} for any x x .

It’s not clear what you don‘t get.

R Mathe - 3 years ago

Log in to reply

@R Mathe Thanks a lot for taking the trouble to explain!!!! I couldn't understand no. 2 and 3!!!!

erica phillips - 3 years ago

Log in to reply

@Erica Phillips For 2: increase your instagram-attention span, keep 1 in mind and literally just use your eyes ( 1 1 n ) n = ( 1 + 1 n ) n (1-\frac{1}{n})^{n}=(1+\frac{-1}{n})^{n} so x = 1 x=-1 . Got it?

For 3: read a basic introductory text book on Analysis.

R Mathe - 3 years ago

Log in to reply

@R Mathe Yupp thanks again!!!

erica phillips - 3 years ago
Zico Quintina
May 20, 2018

Relevant wiki: Probability - By Complement

Clearly, the probability for a finite number n n of players to all lose is ( 1 1 n ) n \left(1 - \dfrac{1}{n} \right)^n , and we need to find its limit as n n \to \infty .

We know that the very similar expression ( 1 + 1 n ) n \left(1 + \dfrac{1}{n} \right)^n tends to e e as n n \to \infty , so we manipulate our limit:

lim n ( 1 1 n ) n = lim n ( n 1 n ) n = lim n 1 ( n n 1 ) n = lim n 1 ( 1 + 1 n 1 ) n = 1 lim n ( 1 + 1 n 1 ) n 1 1 lim n ( 1 + 1 n 1 ) = 1 e 1 = 1 e \begin{aligned} \lim_{n \to \infty} \left(1 - \dfrac{1}{n} \right)^n &= \lim_{n \to \infty} \left( \dfrac{n - 1}{n} \right)^n\\ \\ &= \lim_{n \to \infty} \dfrac{1}{\left( \dfrac{n}{n - 1} \right)^n} \\ \\ &= \lim_{n \to \infty} \dfrac{1}{\left( 1 + \dfrac{1}{n - 1} \right)^n} \\ \\ &= \dfrac{1}{\displaystyle\lim_{n \to \infty} \left( 1 + \dfrac{1}{n - 1} \right)^{n-1} } \cdot \dfrac{1}{\displaystyle\lim_{n \to \infty} \left( 1 + \dfrac{1}{n - 1} \right)} \\ \\ &= \dfrac{1}{e} \cdot 1 = \boxed{\dfrac{1}{e}} \end{aligned}

Relevant wiki: Probability - By Complement

Is a really really beautiful problem. I'm going to cry.

The answer is e Yes, the calculus constant. Yes, it is not a lie Follow me

Probability that guest 1 doesn't win

( 1 1 / n ) (1-1/n)

Probability that neither guest 1 nor 2 win

( 1 1 / n ) ( 1 1 / n ) = ( 1 1 / n ) 2 (1-1/n)(1-1/n) = (1-1/n)^2

Probability that neither guest 1, guest 2 nor guest 3 win

( 1 1 / n ) ( 1 1 / n ) ( 1 1 / n ) . . . = ( 1 1 / n ) 3 (1-1/n)(1-1/n)(1-1/n)...=(1-1/n)^3

Probability that neither guest 1, guest 2, guest 3... guest n-1 nor guest n win.

( 1 1 / n ) n (1-1/n)^n

If you take the limit of that as n approaches infinity (for infinite guests) the result is 1/e

How is this possible? Follow me

Set A = ( 1 1 / n ) n A = (1-1/n)^n

ln ( A ) = ln ( ( 1 1 / n ) n ) \ln(A) =\ln((1-1/n)^n)

ln ( A ) = n ln ( 1 1 / n ) \ln(A)=n*\ln(1-1/n)

ln ( A ) = ln ( 1 1 / n ) / n 1 \ln(A)=\ln(1-1/n)/n^{-1}

Now, use L'Hopital to take the limit as n approaches infinity for ln(A) Differentiate the numerator and denominator of ln ( 1 1 / n ) n 1 \frac{\ln(1-1/n)}{n^{-1}} Then take the limit again

Thank you for the compliment! I have a few problems with your solution, though.


Do you know how to use LaTeX ? It would be much easier to read if you used it in the solution.

The limit as n n approaches 0 is actually 1. I believe you meant "the limit as n n approaches \infty is 1 e \frac{1}{e} ."

Finally, do you mind explaining exactly how to get the limit. I'm quite new to calculus, and I don't really know how to calculate the limit.

Blan Morrison - 3 years, 1 month ago

Log in to reply

Don't worry. Sorry for being late. I've used Latex and made it clearer

Juan Eduardo Ynsil Alfaro - 3 years, 1 month ago

This isn't a good problem

Adam Abader - 3 years ago

Why? How about you do better.

Blan Morrison - 3 years ago

this is unnecessarily messy. Avoid L'Hospital and at all costs—otherwise one has to first check if things are continuously differentiable, etc. It’s ugly!

R Mathe - 3 years ago
Ramón Verdín
May 24, 2018

Besides all the more calculus-like approaches I've read, there is a more statistically approach I'd like to share:

Since we have the probability of success, the number of trials and the constraint that there is only one shot to empty the machine, this problem can be analized as a series of Bernoulli trials, or most commonly known as binomial distribution since the outcome is dicotomical, I mean, you win or you loose.

Parameters of binomial distributions are number of trials (n) and probability of success (p), the problem states that n and p are related since "p" will be the inverse number of "n". With this data is easy to make some trials with different increasing "n" numbers and see that the binomial probability starts to point out to 0.3678 as you go higher in "n" hence lowering "p" as I show here:

Binomial probability calculation: P(n,p) P(10,1/10) = 0.387420... P(100,1/100) = 0.369729... P(1000,1/1000) = 0.368063... P(10000,1/10000) = 0.367897... P(100000,1/100000) = 0.367881... ... So... after a few calculations you can see the probability is approaching to 0.3678... as guests number approaches to infinity.

I know this solution is not as formal or elegant as the 1/e, but yet is another way to solve this riddle.

Hope you like it

This is the same thing. Under Bin ( n , p ) \text{Bin}(n,p) one has P [ 0 successes ] = ( [ m ] c n 0 ) p 0 ( 1 p ) n = ( 1 p ) n \mathbb{P}[0\text{ successes}]=\left(\begin{array}{c}[m]{c}n\\0\\\end{array}\right)p^{0}(1-p)^{n}=(1-p)^{n} and since p = 1 n p=\frac{1}{n} this simplifies to P [ 0 successes ] = ( 1 1 n ) n \mathbb{P}[0\text{ successes}]=(1-\frac{1}{n})^{n} .

R Mathe - 3 years ago
Jake Shannin
May 23, 2018

Disclaimer: A cheap, mathematically impure solution follows. It's your fault if you read it.

Use a scientific calculator, permitted in Lemma 1, to evaluate the probability of no one winning, found in Lemma 2, for n = 100,000. By Lemma 3, to two decimal places, report this value as your answer. Q.E.D.

Lemma 1: This item is scientific calculator-permitted.

Because the answer must be a rounded decimal rather than a mathematical expression, this item is calculator permitted. (I don't think we're expected to have the reciprocal of e memorized.) Specifically, a scientific calculator is permitted because four-function calculators generally don't have an e button.

Lemma 2: The probability of no one winning when there are n guests is ( 1 1 n ) n . \left(1 - \frac 1 n\right)^n.

For no guest to win, all guests have to lose. The probability of the first guest winning, and thus the probability of any one guest winning given all previous guests lost, is 1 n \frac{1}{n} . Thus, the probability of any given guest losing is n 1 n \frac{n - 1}{n} . This has to occur for each guest, so the loss probability is raised to the nth power.

Lemma 3: To two decimal places, the probability of no one winning out of ∞ guests is equal to the probability of no one winning out of 100,000 guests.

This is provable, but we are given three opportunities to answer correctly, so it is reasonable to assume this lemma for the first attempt.

Well played. That's the main flaw with posting problems on Brilliant to the community. I like how you did it, but it's good to keep in mind that doing it the easy way doesn't let you learn as well.

Blan Morrison - 3 years ago
Manoah Scharff
May 21, 2018

We're looking for the limit of ( 1 1 n ) n \left(1 - \displaystyle\frac{1}{n}\right)^n as n n \rightarrow \infty .

lim n ( 1 1 n ) n = lim n e n ln ( 1 1 n ) = lim x 0 e ln ( 1 x ) x = lim x 0 e ln ( 1 x ) x \begin{aligned} \lim_{n \rightarrow \infty} \left(1 - \frac{1}{n}\right)^n &= \lim_{n \rightarrow \infty} \text{e}^{\displaystyle n\ln\left(1 - \frac{1}{n}\right)} \\ & = \lim_{x \rightarrow 0} \text{e}^{\displaystyle \frac{\ln\left(1 - x\right)}{x}} \\ & = \lim_{x \rightarrow 0} \text{e}^{\displaystyle -\frac{\ln\left(1 - x\right)}{-x}} \\ \end{aligned}

Now, knowing lim x 0 ln ( 1 + x ) x = 1 , \lim_{x \rightarrow 0} \displaystyle\frac{\ln\left(1 + x\right)}{x} = 1, we get:

lim n ( 1 1 n ) n = e 1 . \boxed{ \displaystyle \lim_{n \rightarrow \infty} \left(1 - \frac{1}{n}\right)^n = \text{e}^{-1}}.

R Mathe
May 26, 2018

Could you lot at Brilliant.org please program this, so as to allow for symbol input? Ie e e ^( 1 -1 ) or exp ( 1 ) \exp(-1) or 1 / e 1/e , etc.? You would need to connect an interpreter (eg wolfram), but that should not be too problematic. Numerical approximations, where exact irrationals are demanded are unsatisfactory.

That's why they let us use multiple choice. When I originally wrote this problem, I asked "if the probability can be given as 1 n \frac{1}{n} , then find n n ." The answer was 2.718, which is the most common approximation for e e . The staff at Brilliant changed my wording and my answer to make it like that.

Blan Morrison - 3 years ago
Paul Cockburn
May 24, 2018

I took a more pragmatic approach to summing an infinite sequence.

I expanded (1 - 1/n)^n using the first few binomial coefficients and ignoring anything with n in the denominator (which disappears as n becomes large) to get the infinite sum 1 – 1 + 1/2! – 1/3! + 1/4! – 1/5! + 1/6! ...

Then I took out my calculator and calculated each term, either adding or subtracting it from memory, like this: 1 / 2 M+ / 3 M– / 4 M+ / 5 M– / 6 M+ By the time I got to / 8 M+ the terms were small enough that I felt confident in rounding off 'MR' to 4 decimal places and submitting the answer.

you should learn a mathematical language. Octave and R are free, and will save you a lot of pain in such numerical experiments. Here’s the one line ( format long resp. options(...) preamble to change the settings to display more decimals) one uses for example in Octave / R:

1
2
format long;
n=100; Pr=0; s=1; for(k=1:n); Pr = Pr + s/factorial(k); disp(Pr); s = -s; end;

1
2
options(digits=10); # or whatever one desires, 15 is max.
n<-100; Pr<-0; s<-1; for(k in c(1:n)) {Pr <- Pr + s/factorial(k); show(Pr); s <- -s;};

R Mathe - 3 years ago
Laurent Fousse
May 21, 2018

Sure, don't specify the number of digits you want in your answer.

This isn't a solution.

Blan Morrison - 3 years ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...