Naked Science Forum

General Science => General Science => Topic started by: chiralSPO on 13/02/2018 18:56:05

Title: Must ∞ monkeys on ∞ typewriters really write everything given ∞ time?
Post by: chiralSPO on 13/02/2018 18:56:05
There is something that has been bothering me for quite some time now, and I would like to try some discussion of it here.

I have some trepidation starting a thread about infinity, as it is a very difficult topic, but I trust that the discussion will at least be interesting.

There is a commonly presented notion that infinite sets must contain everything. It often comes up when someone claims that infinitely many monkeys each with a typewriter and an infinite amount of time typing will eventually reproduce the entire works of Shakspeare (as well as every version of the bible, including one in which every mention of God is replaced with the word Spatula. etc.) Or it is said that the multiverse theory implies infinitely many different variations of the universe, representing all of the things that are possible. Or that any finite string of digits that one can imagine must be present in the digits of π (or e or φ) etc.

I have always felt that there was some logical fallacy in this line of reasoning, but I cannot quite prove to myself that there is a contradiction.

When trying to think of a counterargument, I usually start with something along the lines of:
I can come up with infinitely many infinitely long strings of numbers that are non-repeating, but never contain a certain string of numbers. For instance 0.1234567890011223344556678899000111222333444555666777888999000... will never ever contain the string 2468 in it.

Now, I think that the problem this argument has is that the example I used is clearly not random. However, I could make adjustments to the algorithm that I use to generate these strings of numbers such that they are effectively random--equal ratios of each digit, and each dyad and each triad (pairs and trios of digits), and no way to predict the next number in a string given all previous digits, other than the number won't contain a single instance of finite string X. The longer finite string X is, the easier it is to generate an algorithm that is otherwise random.

I suppose the counter-argument to that is that "effectively random" and "actually random" are not the same thing. If each digit truly has a random distribution within the string, then any string of finite length must have a finite nonzero probability of happening, and that therefore with infinitely many digits the expected number of times the string appears would have to be infinite (any finite, nonzero number times infinity must be infinite).

Thoughts?
Title: Re: Must ∞ monkeys on ∞ typewriters really write everything given ∞ time?
Post by: Bored chemist on 13/02/2018 19:00:42
Strictly, the monkeys will write any finite set of words.
It's because, if they haven't written any (finite) test script, it's because you haven't waited long enough.

Also, if they are using a qwerty keyboard, they will never write a copy of the original Bible- because it was written in a different alphabet. That may be a better mimic of the series that doesn't include 2468 because the "rules" of the monkeys exclude it.
The monkeys are meant to represent a "random"  set of keystrokes.
Title: Re: Must ∞ monkeys on ∞ typewriters really write everything given ∞ time?
Post by: jeffreyH on 13/02/2018 20:02:20
How far apart from each other are the monkeys and typewriters? Is it an infinite distance? Maybe Hilbert's infinite monkey sanctuary.
Title: Re: Must ∞ monkeys on ∞ typewriters really write everything given ∞ time?
Post by: evan_au on 13/02/2018 20:42:01
Professor Brian Cox's Infinite Monkey Cage has already come up with some variations on Shakespeare and the Bible.

The fact that they have only come up with short texts so far is that they have only generated 99 episodes to date.

See: http://www.bbc.co.uk/programmes/b00snr0w/episodes/downloads
Title: Re: Must ∞ monkeys on ∞ typewriters really write everything given ∞ time?
Post by: chiralSPO on 14/02/2018 16:12:07
I guess I just have to accept this unusual consequence of such an unusual scenario. It's straightforward enough to prove that, for any event with a nonzero chance of occurring, the probability of the event actually manifesting tends to 1 as the number of trials tends to infinity. (Though I will note that it is straight-forward to "prove" many things using infinity that are not actually true, and are actually obscuring logical fallacies in the confusion of infinity... so I just want to make sure that this is not one of those instances.)
Title: Re: Must ∞ monkeys on ∞ typewriters really write everything given ∞ time?
Post by: jeffreyH on 14/02/2018 17:24:52
There is a non zero probability of a monkey pressing the same key an infinite number of times. How meaningful is this?
Title: Re: Must ∞ monkeys on ∞ typewriters really write everything given ∞ time?
Post by: chiralSPO on 15/02/2018 14:35:56
There is a non zero probability of a monkey pressing the same key an infinite number of times. How meaningful is this?

Actually, I think there is a probability of zero for any infinite string of keys (only finite strings will appear with a nonzero probability).

This can be shown by considering the limit as n approaches ∞ of the probability of a string being generated (typed). If we limit ourselves to 26 letters of the alphabet, then the probability of repeating the same letter every time is (1/26)n–1 (allowing the first letter to be any of the 26, but then requiring all subsequent letters to be the same as the first.) As n approaches ∞, (1/26)n–1 definitely approaches 0. (even by the 10th repitition, we are down to 7x10–15)

An interesting paradox arises here: If a random string of numbers is generated, and is infinitely long (countably infinite), the probability of any specific infinite string is 0. Every infinitely long string has a 0 probability of being generated randomly. But, if you consider all of the uncountably infinitely many "possible" strings, there is still a probability of 1, that the string generated is contained within that set.

For example, if we consider selecting a single number from a uniform distribution of the continuous number line between 0 and 1 (including all rational and irrational numbers), it's guaranteed that the number selected had a 0% chance of being selected!

I think many of these apparent paradoxes come up because people are playing fast and loose with the concept of infinity, trying to plug it in as a number and do arithmetic, rather than solving for the limits in each case....
Title: πRe: Must ∞ monkeys on ∞ typewriters really write everything given ∞ time?
Post by: Humanism_at_its_finest on 20/02/2018 11:22:00
Some Simple and easy to understand Math:
The number of combinations you can make with 10 characters in 3 digits is= 10x10x10 (10^3) So there are 26 (+1 for a space) letters of the English alphabet so in a 3 letter long term there are= 27x27x27 (27^3) combinations. So, of course, ∞ monkies would produce an infinitely long term of letters which would be= 27^∞ combination. Which of course = infinity. And there is your final result, infinite combinations. The bible is just one combination of letters and if we have infinite combinations at some point (it might take infinite years to happen it will still happen) we will have a bible printed neatly by a group of Bonobos!

Title: Re: Must ∞ monkeys on ∞ typewriters really write everything given ∞ time?
Post by: petelamana on 20/02/2018 13:07:16
There is a non zero probability of a monkey pressing the same key an infinite number of times.

What if the monkey dies at the typewriter and his finger falls in death on a key?

Pondering the scale and scope of the infinite is tantamount to pondering the existence of the divine.  You have touched upon a key distinction possibly unique to man.  I once read that the moment we believe we have a pure definition of what/who God is, is the moment God changes.  Or, I suppose, to put it in a rudimentary form:  the moment we declare x = y, y changes. 

All we can be certain of is the essentials of mathematics, for as it is quoted in the film Pacific Rim:  "Numbers do not lie. Politics and poetry, promises, these are lies. Numbers are as close as we get to the handwriting of god."
Title: Re: Must ∞ monkeys on ∞ typewriters really write everything given ∞ time?
Post by: yor_on on 01/06/2018 06:22:25
Maybe you are wondering about if the rules defining the game can change? I'm not as sure that mathematics can't lie? Maybe it depends on what set of ground rules you define.
Title: Re: Must ∞ monkeys on ∞ typewriters really write everything given ∞ time?
Post by: Adam Murphy on 01/06/2018 13:07:48
If there are infinite monkeys, wouldn't an infinite number of them each spend forever just typing one key.

Actually, there'd be an infinite number of monkeys for each key, wouldn't there? Then there'd still be an infinite number to get on with Shakespeare, and the Bible and the complete works of Nicholas Cage.

Infinity is weird.
Title: Re: Must ∞ monkeys on ∞ typewriters really write everything given ∞ time?
Post by: yor_on on 01/06/2018 18:02:26
Definitely weird :)

But can mathematics lie?

What differs the idea of those monkeys from us
Title: Re: Must ∞ monkeys on ∞ typewriters really write everything given ∞ time?
Post by: evan_au on 02/06/2018 02:52:10
I heard that they have tried an experiment like this.
But the typewriter quickly got trashed, and only produced a finite number of letters....
Title: Re: Must ∞ monkeys on ∞ typewriters really write everything given ∞ time?
Post by: alancalverd on 02/06/2018 09:10:51
It occurs to me that ∞ monkeys given ∞ time will at a finite time N have written any and every text Tn EXCEPT TN-1 unless TN-1 ≡ TN, the probability of which is infinitesimal.

I think I have discovered a new infinity!
Title: Re: Must ∞ monkeys on ∞ typewriters really write everything given ∞ time?
Post by: chris on 02/06/2018 10:30:41
It's quite funny because, when this thread title is being promoted across the rest of the site, the inifinity (∞) symbol is being rendered as "8374" !
Title: Re: Must ∞ monkeys on ∞ typewriters really write everything given ∞ time?
Post by: jeffreyH on 02/06/2018 11:56:07
Of course indeterminacy gets in the way of all this. Do absolutely all numbers exist. This would imply determinism. What if some numbers exist or are non existent a bit like the Schrödinger cat analogy. It is only when we observe them that they become real. How solid and devine is mathematics then?
Title: Re: Must ∞ monkeys on ∞ typewriters really write everything given ∞ time?
Post by: alancalverd on 02/06/2018 12:48:32
i
Title: Re: Must ∞ monkeys on ∞ typewriters really write everything given ∞ time?
Post by: yor_on on 02/06/2018 13:32:23
A very good question Jeffrey.
seems that those, ahem, 'big heads' have gone into hiding on that one.

Think we at last are getting somewhere.

T   O   E   ...
Title: Re: Must ∞ monkeys on ∞ typewriters really write everything given ∞ time?
Post by: yor_on on 02/06/2018 13:35:30
Infinity Alan?
And a new one too?

Yep, we're getting somewhere
Can't say exactly where, but if its a infinity then its an infinity, right?
Title: Re: Must ∞ monkeys on ∞ typewriters really write everything given ∞ time?
Post by: yor_on on 02/06/2018 13:39:14
And then we have Chris that now defined the value of infinity :)
We're most definitely getting somewhere

And the beauty of it all is that the only thing a computer knows is binary logic
for those of you you un-informed about those newfangled devices
They come from h***
Title: Re: Must ∞ monkeys on ∞ typewriters really write everything given ∞ time?
Post by: evan_au on 03/06/2018 00:14:01
Quote from: yor_on
if its a infinity then its an infinity, right?
I'm afraid not. There are infinities, and then there are bigger infinities.

In general, 2 > ∞

See: https://en.wikipedia.org/wiki/Aleph_number
Title: Re: Must ∞ monkeys on ∞ typewriters really write everything given ∞ time?
Post by: yor_on on 07/06/2018 00:00:03
Well yes. but if I take the smaller 'infinity' and put it into the 'bigger'
It should still fit, right? :)

Because if not, you just invalidated the logic
Actually I'm somewhat inebriated and bored.
It should have been the opposite

Never mind nor time
I'm still waiting for you
Title: Re: Must ∞ monkeys on ∞ typewriters really write everything given ∞ time?
Post by: syhprum on 24/09/2018 17:55:20
When I was at school I annoyed my maths teacher by insisting that the product of infinity and zero was one by cancelling the zeros in the expression 1/0 = infinity times 0/1= zero  =1/1.
Title: Re: Must ∞ monkeys on ∞ typewriters really write everything given ∞ time?
Post by: syhprum on 24/09/2018 17:58:29
"And the beauty of it all is that the only thing a computer knows is binary logic" one of the famous early computers ENIAC was decimal.
Title: Re: Must ∞ monkeys on ∞ typewriters really write everything given ∞ time?
Post by: Bill S on 19/07/2019 17:09:53
As usual, I’m not keeping up with threads/discussions, nor having time to catch up.  However, in the course of “weeding out” old stuff on my HD, I’ve found several things I had filed for “attention later”.   A link to this thread is one of them.

Chiral; as OP, did you get what you were looking for from the thread?  I enjoyed it, but have several points to clarify;  (one at a time, perhaps).

Quote from: Chiral
There is a commonly presented notion that infinite sets must contain everything.

Mathematically, this is not possible; because there is more than one infinity, so, unless every infinity contains every other infinity, no infinity contains everything. (?) 

If every infinity contained every other infinity, I think that would mean that there was only one infinity, even in maths.  That doesn’t make much sense to me.
Title: Re: Must ∞ monkeys on ∞ typewriters really write everything given ∞ time?
Post by: andreasva on 17/08/2019 13:09:07
You always need a reality double check.   Monkeys live, and monkeys die, as does everything.  There can never be an infinity of monkeys, nor anything else, at any given moment in time.  You can have an infinitely rising number of monkeys over time, but infinity is not within reach for the monkeys.   They have neither the time,  nor the quantity to accomplish such a task.    Not even human beings could accomplish such ridiculous task. 

It’s a meaningless fantasy formula. 

The other argument is, random is driven by complexity.  There is no random events, just highly complex events that appear random.   Things happen for a reason.  Monkeys have no reason to type, therefore, it is impossible. 
Title: Re: Must ∞ monkeys on ∞ typewriters really write everything given ∞ time?
Post by: andreasva on 17/08/2019 13:19:41
Mathematically, this is not possible; because there is more than one infinity, so, unless every infinity contains every other infinity, no infinity contains everything. (?) 

There is no such thing as infinite quantities.    Think about it. 
Title: Re: Must ∞ monkeys on ∞ typewriters really write everything given ∞ time?
Post by: Paul25 on 19/03/2020 14:54:26
That seems to be the case
Title: Re: Must ∞ monkeys on ∞ typewriters really write everything given ∞ time?
Post by: yor_on on 28/03/2020 11:42:26
Well, a dice have no memory, right?
But I think monkeys do
Title: Re: Must ∞ monkeys on ∞ typewriters really write everything given ∞ time?
Post by: Lightraigne on 29/08/2022 14:48:01
What is Shakespeare if not one of those monkey’s over time?
Title: Re: Must ∞ monkeys on ∞ typewriters really write everything given ∞ time?
Post by: Deecart on 30/08/2022 13:27:24
Practicaly, you dont need to wait an infinity of time so as to have some particular finite succession of symbols.
One monkey can do it straightforward.
But with one monkey only to be sure that he has typed the right succession of symbols, you need to have waited an infinity of time.
If you have not waited an infinity of time, let say you have waited "only" some billion of billion of years, it is very unlikely that the monkey dident succeed, but it is possible that he dident succeed, so you can not claim to be sure.

You can do the same reasoning with a money coin (not a monkey money of course) and find out that it has nothing to do with the complexity of the succession of the symbols.
How long need i to wait (with let say trying one coin toss every second)  to be sure that i have at least one time Odd ?
Mathematicaly we need to have tried an infinity of time.

Furthermore, if you have an infinity of monkeys you know that an infinity of monkeys among the infinity of monkeys will write this succession of symbols straightforward. So saying you need to wait some infinity of time so as to be sure some monkey succeed is false in this case and adding the infinity of time in the scenario of an infinity of monkeys is redundant (this second requirement can be discarded)
Title: Re: Must ∞ monkeys on ∞ typewriters really write everything given ∞ time?
Post by: alancalverd on 30/08/2022 22:13:57
Given that humans have evolved from monkey-like creatures in a finite time, and that there is a finite number of humans, the fact that the works of Shakespeare have already been written by one human shows that it is not merely conceivable but actually already achieved for one randomly specified document.

Therefore the evidence suggests that any specifiable document could be generated in a finite time by a finite number of animals, even though the numbers might be very large.

The problem however is that the question asks whether "everything" could be generated, to which the answer is always going to be "no" because  however many documents you have produced, you still haven't produced the catalog or index of those documents, which is itself a document that must be catalogued......
Title: Re: Must ∞ monkeys on ∞ typewriters really write everything given ∞ time?
Post by: Deecart on 30/08/2022 22:43:20
The problem however is that the question asks whether "everything" could be generated, to which the answer is always going to be "no" because  however many documents you have produced, you still haven't produced the catalog or index of those documents, which is itself a document that must be catalogued......

This is effectivly a problem, because for some set of n elements you can have n! (n factorial so (n*(n-1)*(n-2)*...1) possible catalogues.
If you want to create catalogues of the catalogues you will then have (n!)! possible catalogues and so forth, so in my opinion you end up with an infinity of catalogues, even starting with a finite number of elements of the primary set.