

Mathematical answer to Infinite of monkeys/infinite time/Hamlet question. - meadhikari
http://math.stackexchange.com/questions/17152/given-an-infinite-number-of-monkeys-and-an-infinite-amount-of-time-would-one-of

======
DeusExMachina
You don't need an infinite number of monkeys, you can do it as well with some
infinite string that is not recurring.

If you take an irrational number like pi, for example, you are guaranteed that
the decimal digits are not repeating but infinite. Chose any encoding to turn
those digits into a string and at some point you will be able to find the book
you are looking for.

~~~
jokermatt999
Take the concept of anything being encoded in pi, throw in the concept of the
Jewish idea of the tetragrammaton, and you get the movie Pi.

------
spyrosk
If you find this concept interesting there is a related short story by Jorge
Luis Borges called "The Library of Babel" written in 1941. You can read it
here:

[http://jubal.westnet.com/hyperdiscordia/library_of_babel.htm...](http://jubal.westnet.com/hyperdiscordia/library_of_babel.html)

It doesn't deal with the generation of all the books/data, but with a
fictional scenario where they are available to human beings (plus the universe
is practically a giant library). I found it a fun and intriguing thought
experiment/narration.

(edit) The mathematics behind the story:

[http://en.wikipedia.org/wiki/The_Library_of_Babel#Value_as_a...](http://en.wikipedia.org/wiki/The_Library_of_Babel#Value_as_a_mathematical_thought_experiment)

------
powrtoch
As a side note, if you run the experiment with _infinite monkeys_ , you get
Hamlet almost instantly (that is, the shortest amount of time in which it
possible to write Hamlet).

~~~
JacobAldridge
You'll also get a version where Hamlet says to Ophelia "Get thee to a
bunnery", and she becomes a baker, and they all live happily ever after.

One where he says "Get thee to a funnery", where they invent aeroplanes and go
to Coney Island, where a bad corn dog leads Hamlet to declare "Something is
rotten in the State of New York."

The one where he tells his mother "Methinks the lady both protest too much",
which eventually turns into an Oliver Sacks-esque exploration of split
personality.

And one where Rosencrantz & Guildenstern aren't actually dead, meaning Tim
Roth never gets a film career and Reservoir Dogs is never created. In that
story, the infinite monkeys eventually write Pulp Fiction so normality is
restored.

------
petervandijck
Random != all possible combinations. (Right?)

What if you have infinite monkeys that all happen to always type a Y after a
T. Bad habit.

They'd never write Hamlet. Ty be or noty ty be.

Given infinite time, and infinite monkeys, isn't it possible that they would
still _always_ keep making the same typo? Or that the random letter
combinations that they make won't include all possible letter combinations?

------
mynameishere
Given infinite time, isn't it certain that a given object will, by itself,
transform into a folio of Hamlet? I mean, aren't there all sorts of random
events going on at a low level?

------
throwaway111222
I am seriously considering starting an @home project to simulate this.

~~~
NickPollard
There used to be a website that would run this in your browser, and submit
back to the server the length of the longest randomly-generated substring of
Shakespeare. Not sure if it's still around.

I ran it for about 5 minutes on an old computer and got about a sentence
worth. Alas I didn't have infinite time to spare.

------
meadhikari
Direct Proof from Wikipedia:
[http://en.wikipedia.org/wiki/Infinite_monkey_theorem#Direct_...](http://en.wikipedia.org/wiki/Infinite_monkey_theorem#Direct_proof)

~~~
xenomachina
Disappointing. I was expecting it to be a wiki editable (only) by monkeys. I
was looking forward to seeing their progress.

------
iwwr
There is a lot of misunderstanding around this so-called "theorem". ONE monkey
and FINITE time is all you need to produce the full works of Shakespeare.
Infinity is unnecessary.

~~~
jessriedel
well....no matter how large T is, you'll still won't be _guaranteed_ to get
Hamlet, so long as T is finite.

~~~
iwwr
Yes you will, re-read the law of large numbers. It's not the law of the
infinite.

An infinite monkeys would produce every finite thing in zero time. The "finite
things" including: the full works of Shakespeare, every single other book
written or that will be written, all computer memory at any one time. In fact,
you could encode the visible universe in a simulation and run it in an instant
for any large but finite number of years.

To paraphrase Douglas Adams, "infinity is big, you just won't believe how
vastly, hugely, mind-bogglingly big it is".

~~~
cdavid
The OP is right: for any T, however large, you won't be guaranteed that you
will get hamlet from a monkey.

I don't understand what you mean by the law of large numbers not being the law
of infinite: the theorem states the limit of a certain series of random
variables, that's by definition about what happens when the number of random
variables goes to infinity.

~~~
iwwr
OK, not guaranteed, but certain within high levels of confidence. Still, with
an infinite monkeys you can get all that in an instant.

~~~
Sandman
Not in an instant - a monkey still needs some amount of time to write Hamlet.

~~~
iwwr
I mean, an infinite monkeys would need a small (approaching zero) amount of
time.

An alternate way to say it: _"An infinite, ordered set of monkeys each
pressing exactly one key would produce the entire works of Shakespeare in at
least one uninterrupted string that preserves that order."_

------
nirai
I think the monkey problem is not a mathematical problem at all but a metaphor
to the set of all authors excluding Shakespeare.

------
raymondh
How would infinite monkey resources overcome a finite supply of typewriter
ribbon and blank paper?

------
nirai
you can not have infinite number of monkeys since there is a finite number of
bananas.

------
coleifer
It was the best of times, it was...the Blurst of times?!

