Monkey Typing For Infinite = Shakespeare?

Discuss the language of the universe.

Moderators: Darkchilde, Calilasseia

Would A Monkey Typing For Infinity Produce The Works Of Shakespeare?

1) It's certain the monkey would not produce the works of Shakespeare
5
10%
2) It's possible the monkey would produce the works of Shakespeare, but it's very unlikely
4
8%
3) It's possible the monkey would produce the works of Shakespeare, but it's neither particularly likely or unlikely
0
No votes
4) It's possible the monkey would produce the works of Shakespeare, and in fact very likely
4
8%
5) It's certain the monkey would produce the works of Shakespeare
32
65%
6) Other
4
8%
 
Total votes : 49

Re: Monkey Typing For Infinite = Shakespeare?

 
 

Re: Monkey Typing For Infinite = Shakespeare?

#81  Postby astrowhiz » Aug 26, 2010 4:14 pm

Cito di Pense wrote:
I'm sorry, but this is not correct. The sum of probabilities always adds up to 1. If the probability of something happening in an infinite number of trials is 1, as it is defined to be, the probability of it not happening in the same set of trials is 0.

The fact that the sum over probabilities is 1 trumps your intuitive notion that "infinity is a strange thing".


That's true in normal axiomatic set theory. Infinite sets of infinite sets are different and the mathematics is different. Godel, Cantor, Russell and others worked on this and started an almighty flame war among mathematicians. A probability of 1 does not mean an event is guaranteed to occur, likewise a probability of 0 doesn't mean an event is impossible. The monkeys not typing shakespeare has a probability of 0 but that event can't be ruled out.
The infinite monkeys is a special case of the Kolmogorov zero-one probability law. With shakespeare's work =1 and not-shakespeare = 0.. but you can't guarantee which of those possibilities will occur.
Karl Pilkington's guide to evolution: bacteria, fish, mermaid, man, onwards and what have you
User avatar
astrowhiz
 
Posts: 145
Age: 35
Male

Country: Wales
United Kingdom (uk)

Re: Monkey Typing For Infinite = Shakespeare?

#82  Postby King David » Aug 26, 2010 4:23 pm

I would say that if the typing were truly random, which may not be possible with a monkey typing, a finite number of characters, and infinite time(also most likely impossible), then the monkey hitting the right combination of keys to produce the works of shakespeare is a certainty, or at least the probability becomes closer and closer to one as you approach infinity. In other words the limit at infinity is 1.
Nothing is so fatal to the progress of the human mind as to suppose that our views of science are ultimate; that there are no mysteries in nature; that our triumphs are complete, and that there are no new worlds to conquer. -Humphry Davy
User avatar
King David
 
Posts: 1483
Male

United States (us)

Re: Monkey Typing For Infinite = Shakespeare?

#83  Postby King David » Aug 26, 2010 4:34 pm

Kid A wrote:

the article is actually agreeing with Arcanyn. It says that although there is no mathematical reason why heads will ever stop appearing, the odds of an infinite series of heads occurring is 0, so by definition it's impossible. It's a weird one really. The implication seems to be that the monkey could keep pressing the 'a' key for ever; there is no mathematical reason why it would ever be impossible for it to press 'a', but an infinite string of 'a's is impossible, because it has probability 0.000...1, which is the same as 0.


for the probability to be 1, the monkey has to hit keys at random. If the monkey hits only the "a" key, then that isn't a random selection of characters. Unless what you are suggesting is that the monkey pressing only "a" by purely random chance is possible. If that is the case, then yes, the probability gets arbitrarily closer and closer to zero as you approach infinity. It would actually be zero, if real infinities could actually exist.
Nothing is so fatal to the progress of the human mind as to suppose that our views of science are ultimate; that there are no mysteries in nature; that our triumphs are complete, and that there are no new worlds to conquer. -Humphry Davy
User avatar
King David
 
Posts: 1483
Male

United States (us)

Re: Monkey Typing For Infinite = Shakespeare?

#84  Postby Preno » Aug 26, 2010 5:03 pm

Kid A wrote:
Preno wrote:
Arcanyn wrote:
Preno wrote:
Arcanyn wrote:Except the chances of the monkey pressing 'a' for eternity are 0.
Yes, of course they are. That doesn't mean it can't happen.


By definition, if the chances of something occurring are zero, this means that it cannot happen.
No, sorry, that's not the case.


the article is actually agreeing with Arcanyn. It says that although there is no mathematical reason why heads will ever stop appearing, the odds of an infinite series of heads occurring is 0, so by definition it's impossible.
No, sorry, you really are wrong. The article clearly states that such a series is possible. The inference from "the probability is zero" to "by definition it's impossible" is entirely your own (well, not really, many people make the same mistake).
King David wrote:for the probability to be 1, the monkey has to hit keys at random. If the monkey hits only the "a" key, then that isn't a random selection of characters. Unless what you are suggesting is that the monkey pressing only "a" by purely random chance is possible.
Yes, of course it's possible. It's just as possible as any other sequence of characters.
If that is the case, then yes, the probability gets arbitrarily closer and closer to zero as you approach infinity. It would actually be zero, if real infinities could actually exist.
The probability is zero (which has nothing to do with "real infinities" "actually existing"). The limit is not some number which changes in magnitude as you approach infinity, it's a specific number, namely zero.
User avatar
Preno
 
Posts: 250
Age: 25
Male


Re: Monkey Typing For Infinite = Shakespeare?

#85  Postby Kid A » Aug 26, 2010 7:52 pm

Preno wrote:No, sorry, you really are wrong. The article clearly states that such a series is possible. The inference from "the probability is zero" to "by definition it's impossible" is entirely your own (well, not really, many people make the same mistake).


No it's not. The important part of the article is this: "In fact, the probability of tails never being flipped in an infinite series is zero. Thus, though we cannot definitely say tails will be flipped at least once, we can say there will [i]almost surely be at least a single tails flip in an infinite sequence of flips.[/i]"

The misleading part is the 'almost surely', which people assume to mean the same thing as the general sense. Mathematically 'sure' and 'almost sure', are almost the same thing. The main difference is that if an event is sure, then it will always happen and no other event can possibly occur (e.g: rolling a 1 on a die with 1 on every side). If an event is 'almost sure', other events are possible at any given point, and in fact if they're possible they are 'almost sure' to happen too (on a normal die it is possible to either 1-6, so with an infinite amount of throws all are certain). Typing Shakespeare is possible, but so is Tolkien, and in fact seen as both are possible, both are certain. It's also possible to keep typing the 'a' key, and for any given point it is always possible. This would seem to imply that shakespeare may not be certain because the monkey could just type the 'a' key at any point. But, strangely, while it is possible to keep typing it indefinitely, it is not possible to type an infinite series of 'a's'.

The article clarify's here: "However, if instead of an infinite number of flips we stop flipping after some finite time, say a million flips, then the all-heads sequence has non-zero probability. The all-heads sequence has probability 2−1,000,000, thus the probability of getting a tails is 1 − 2−1,000,000 < 1, and the event is no longer almost sure."

If it was a finite number of flips, then it's not 'almost sure' that the coin would definitely get a tails, because no matter how unlikely, it's still possible that the series of all-heads would occur. (if it were the general definition of 'almost sure', then it would still apply to the given example.)

astrowhiz wrote:That's true in normal axiomatic set theory. Infinite sets of infinite sets are different and the mathematics is different. Godel, Cantor, Russell and others worked on this and started an almighty flame war among mathematicians. A probability of 1 does not mean an event is guaranteed to occur, likewise a probability of 0 doesn't mean an event is impossible. The monkeys not typing shakespeare has a probability of 0 but that event can't be ruled out.
The infinite monkeys is a special case of the Kolmogorov zero-one probability law. With shakespeare's work =1 and not-shakespeare = 0.. but you can't guarantee which of those possibilities will occur.


Interesting. Can you explain this view further? Most notably how something can have probability 0 and still be possible?
User avatar
Kid A
THREAD STARTER
 
Posts: 179

United Kingdom (uk)

Re: Monkey Typing For Infinite = Shakespeare?

#86  Postby Preno » Aug 26, 2010 8:39 pm

Kid A wrote:
Preno wrote:No, sorry, you really are wrong. The article clearly states that such a series is possible. The inference from "the probability is zero" to "by definition it's impossible" is entirely your own (well, not really, many people make the same mistake).
No it's not. The important part of the article is this: "In fact, the probability of tails never being flipped in an infinite series is zero. Thus, though we cannot definitely say tails will be flipped at least once, we can say there will [i]almost surely be at least a single tails flip in an infinite sequence of flips.[/i]"

The misleading part is the 'almost surely', which people assume to mean the same thing as the general sense. Mathematically 'sure' and 'almost sure', are almost the same thing. The main difference is that if an event is sure, then it will always happen and no other event can possibly occur (e.g: rolling a 1 on a die with 1 on every side).
Yeah, that's what I said - an event that is sure will always happen, an event that is almost sure might not.
If an event is 'almost sure', other events are possible at any given point, and in fact if they're possible they are 'almost sure' to happen too (on a normal die it is possible to either 1-6, so with an infinite amount of throws all are certain). Typing Shakespeare is possible, but so is Tolkien, and in fact seen as both are possible, both are certain. It's also possible to keep typing the 'a' key, and for any given point it is always possible. This would seem to imply that shakespeare may not be certain because the monkey could just type the 'a' key at any point. But, strangely, while it is possible to keep typing it indefinitely, it is not possible to type an infinite series of 'a's'.
No, you made up the stuff about being possible "at any given point" but not possible as an infinite series. You're still presupposing, rather than arguing for, your assumption that a probability of 0 means impossibility and a probability of 1 means certainty. By definition, an infinite series of a's is just as possible as any other infinite series. All series are by definition equally possible outputs of a random process - indeed, any series has a probability of 0, not just this particular one, so it's certain that an event that's almost certain not happen is going to happen.
User avatar
Preno
 
Posts: 250
Age: 25
Male


Re: Monkey Typing For Infinite = Shakespeare?

#87  Postby logical bob » Aug 26, 2010 9:10 pm

HughMcB wrote:
logical bob wrote:
HughMcB wrote:[1/infintity] x infinity = 1

Go to the back of the class. :nono:

Infinity isn't a number. You can't divide or multiply numbers by it.

I'm applying limits to a variable, I was short forming it. :facepalm:

Yes, as I see now that you're actually a mod on the maths forum I guess you know that :oops: but please express yourself more clearly as an example to others. :naughty: ;)

Oh and a belated thanks - I only found this site because you PMed me at RDF. :cheers:
It's got nothing to do with your Vorsprung durch Technik, you know, and it's not about you joggers who go round and round and round.
User avatar
logical bob
 
Posts: 3443
Male

United Kingdom (uk)

Re: Monkey Typing For Infinite = Shakespeare?

#88  Postby King David » Aug 27, 2010 5:11 am

Preno wrote:
King David wrote:for the probability to be 1, the monkey has to hit keys at random. If the monkey hits only the "a" key, then that isn't a random selection of characters. Unless what you are suggesting is that the monkey pressing only "a" by purely random chance is possible.

Yes, of course it's possible. It's just as possible as any other sequence of characters.

If that is the case, then yes, the probability gets arbitrarily closer and closer to zero as you approach infinity. It would actually be zero, if real infinities could actually exist.

The probability is zero (which has nothing to do with "real infinities" "actually existing"). The limit is not some number which changes in magnitude as you approach infinity, it's a specific number, namely zero.


Thats a strange paradox you present. In your first statement you say "of course its possible", yet in your second you say "the probability is zero." How can the probablility of an event's occurrence be zero, yet that event is possible? My point was, since we are talking about a "limit at infinity," and since real infinities can't exist, the probability of the monkey typing the works of shakespeare only becomes closer and closer to 1 as time goes on, but can never actually reach 1. A limit is the y value a function is tending to as it becomes arbitrarily closer and closer to a certain x value, in this case, infinity, yet the function can never actually "reach" infinity because infinity is not a number.
Nothing is so fatal to the progress of the human mind as to suppose that our views of science are ultimate; that there are no mysteries in nature; that our triumphs are complete, and that there are no new worlds to conquer. -Humphry Davy
User avatar
King David
 
Posts: 1483
Male

United States (us)

Re: Monkey Typing For Infinite = Shakespeare?

#89  Postby ughaibu » Aug 27, 2010 5:24 am

King David wrote:real infinities can't exist, the probability of the monkey. . . .
In what sense do probabilities have a real existence, that infinities dont?
ughaibu
 
Posts: 1915


Re: Monkey Typing For Infinite = Shakespeare?

#90  Postby Kid A » Aug 27, 2010 6:39 am

Preno wrote:No, you made up the stuff about being possible "at any given point" but not possible as an infinite series. You're still presupposing, rather than arguing for, your assumption that a probability of 0 means impossibility and a probability of 1 means certainty. By definition, an infinite series of a's is just as possible as any other infinite series. All series are by definition equally possible outputs of a random process - indeed, any series has a probability of 0, not just this particular one, so it's certain that an event that's almost certain not happen is going to happen.


All finite series are possible and therefore 'almost sure' to happen. Shakespeare is a finite (no matter how unlikely) series, so is possible and therefore 'almost sure' to happen.

10000000000000 a's is still a finite series and is therefore also possible, as is any number of a's. However, any infinite series of a's is impossible.

This is weird for two reasons: 1) it seems that this permits a string of a's with any length, as obviously there are infinite numbers, but not a string of a's with infinite length (though by definition something couldn't have infinite length)

2) seen as all infinite series have probability 0, any predicted outcome for the monkey typing is wrong. Obviously it must type something so, so something weird is going on here.

I guess part of the problem is that presupposing it will type something and only something (a series of a's for example) and not something else (such as Shakespeare), almost implies that it will have an end point where it will never type any more, which of course is impossible by definition with infinity.


Basically what the Mathematics seems to imply to me is that all finite series are possible, and all infinite series are not. However, an infinite number of finite series are also possible.

Basically it doesn't really make sense, but mathematically the Monkey should still type Shakespeare with probability 1.
Last edited by Kid A on Aug 27, 2010 3:00 pm, edited 1 time in total.
User avatar
Kid A
THREAD STARTER
 
Posts: 179

United Kingdom (uk)

Re: Monkey Typing For Infinite = Shakespeare?

#91  Postby logical bob » Aug 27, 2010 10:11 am

Regarding the monkey typing "a" for all eternity.
Suppose you have an infinite sequence of characters in which each charater is chosen at random. Could every character in the sequence be "a"? Clearly it could. As Preno has said, that's as likely as any other outcome.

Now imagine the monkey typing. We can calculate the probability that his first n characters are all "a" and that probability tends to zero as n tends to infinity. This is why Kid A says the monkey can't type "a" for all eternity.

The problem here lies in the fact that in my first paragraph we're talking about an actual infinite set, a completed infinity if you like. In my second paragraph we're talking about a potential infinity instead.

If (and it's a big if) you accept that there exists an infinite sequence which is the output of the monkey's eternal typing then, in the same way, the probabilty of n random characters matching the first n terms of that sequence tends to zero as n tends to infinity. Using Kid A's argument, we'd have to conclude that the probability of the monkey typing the sequence defined to be its own output is zero.

From this we could conclude either (a) events with zero probability can happen or (b) we're abusing infinity somehow in these calculations. My gut feeling is (b), but what do you guys think?
It's got nothing to do with your Vorsprung durch Technik, you know, and it's not about you joggers who go round and round and round.
User avatar
logical bob
 
Posts: 3443
Male

United Kingdom (uk)

Re: Monkey Typing For Infinite = Shakespeare?

#92  Postby twistor59 » Aug 27, 2010 10:36 am

logical bob wrote:Regarding the monkey typing "a" for all eternity.
Suppose you have an infinite sequence of characters in which each charater is chosen at random. Could every character in the sequence be "a"? Clearly it could. As Preno has said, that's as likely as any other outcome.

Now imagine the monkey typing. We can calculate the probability that his first n characters are all "a" and that probability tends to zero as n tends to infinity. This is why Kid A says the monkey can't type "a" for all eternity.

The problem here lies in the fact that in my first paragraph we're talking about an actual infinite set, a completed infinity if you like. In my second paragraph we're talking about a potential infinity instead.

If (and it's a big if) you accept that there exists an infinite sequence which is the output of the monkey's eternal typing then, in the same way, the probabilty of n random characters matching the first n terms of that sequence tends to zero as n tends to infinity. Using Kid A's argument, we'd have to conclude that the probability of the monkey typing the sequence defined to be its own output is zero.

From this we could conclude either (a) events with zero probability can happen or (b) we're abusing infinity somehow in these calculations. My gut feeling is (b), but what do you guys think?



I don't know much about probability/measure theory, but my gut feeling is (b) too, which is why I would phrase the monkey question differently, to avoid this issue as I suggested a couple of pages back

twistor59 wrote:To avoid the monkeys-humping-the-keyboard distractions, can't you phrase the question as something like "given a memoryless device typing the 30-whatever characters, what is the expectation value of the number of characters typed before a run appears which is the correct sequence of characters for TCWOS "
Butterflies and zebras and moonbeams and fairy tales
That's all she ever thinks about
Ridin' with the wind
User avatar
twistor59
RS Donator
 
Posts: 3877
Male

United Kingdom (uk)

Re: Monkey Typing For Infinite = Shakespeare?

#93  Postby King David » Aug 27, 2010 1:39 pm

Remember we are talking about limits at infinity. As the x value, time, approaches infinity, the y value tends toward a certain number. That number is the limit of course, but it is not a point on the graph. A limit at infinity is the function's horizontal asymptote. The function never actually reaches its asymptote. So, it is always possible that the monkey wont type the works of Shakespeare, or that the monkey will continue to type "a," but the probability of the former approaches 1 and the latter approaches 0 as t approaches infinity. I don't see a paradox here.
Nothing is so fatal to the progress of the human mind as to suppose that our views of science are ultimate; that there are no mysteries in nature; that our triumphs are complete, and that there are no new worlds to conquer. -Humphry Davy
User avatar
King David
 
Posts: 1483
Male

United States (us)

Re: Monkey Typing For Infinite = Shakespeare?

#94  Postby HughMcB » Aug 27, 2010 1:51 pm

logical bob wrote:Yes, as I see now that you're actually a mod on the maths forum I guess you know that :oops: but please express yourself more clearly as an example to others. :naughty: ;)

:lol: Sure!

logical bob wrote:Oh and a belated thanks - I only found this site because you PMed me at RDF. :cheers:

No problems, glad you made it here. :drunk:
"Call Kenny Loggins...'cuz you're in the Danger Zone" - Archer

>>>CLICK HERE FOR SUPER SPECIAL TREAT<<<
User avatar
HughMcB
Global Moderator
 
Posts: 15105
Age: 27
Male

Country: Canada
Ireland (ie)

Re: Monkey Typing For Infinite = Shakespeare?

#95  Postby Audley Strange » Aug 27, 2010 1:53 pm

Can't we just give the poor bastards the complete works of Shakespeare, they're like 20 quid on Amazon.
Audley Strange
 
Posts: 1185


Re: Monkey Typing For Infinite = Shakespeare?

#96  Postby Sityl » Aug 27, 2010 1:57 pm

I'd just like to point out, that the odds of 10,000 a's chosen randomly in a row are the same odds as the first 10,000 letters of one of shakespeare's works being randomly chosen.
Stephen Colbert wrote:Now, like all great theologies, Bill [O'Reilly]'s can be boiled down to one sentence - 'There must be a god, because I don't know how things work.'


Image
User avatar
Sityl
 
Posts: 4454
Age: 30
Male

United States (us)

Re: Monkey Typing For Infinite = Shakespeare?

#97  Postby HughMcB » Aug 27, 2010 2:01 pm

ughaibu wrote:
King David wrote:real infinities can't exist, the probability of the monkey. . . .
In what sense do probabilities have a real existence, that infinities dont?

Simply beautiful. :cry:

King David wrote:Remember we are talking about limits at infinity. As the x value, time, approaches infinity, the y value tends toward a certain number. That number is the limit of course, but it is not a point on the graph. A limit at infinity is the function's horizontal asymptote. The function never actually reaches its asymptote. So, it is always possible that the monkey wont type the works of Shakespeare, or that the monkey will continue to type "a," but the probability of the former approaches 1 and the latter approaches 0 as t approaches infinity. I don't see a paradox here.

Oh now I like this!

However as the asymptote tends towards the given Y value of 1 [but never actually reaches it, even at infinity] wouldn't it still be pertinent to say that the probability would be highly stacked in favour of producing the works as the probability of NOT doing so asymptotically approaches zero?

I think you are correct in what you're saying and in fact I was wrong initially stating that it WILL happen. What I really meant was that in practice it effectively WILL happen. Obviously, statistically speaking you can never shake the,say, 1x101,000,000 that it won't happen. I don't think there is any way of getting around. :scratch:
"Call Kenny Loggins...'cuz you're in the Danger Zone" - Archer

>>>CLICK HERE FOR SUPER SPECIAL TREAT<<<
User avatar
HughMcB
Global Moderator
 
Posts: 15105
Age: 27
Male

Country: Canada
Ireland (ie)

Re: Monkey Typing For Infinite = Shakespeare?

#98  Postby NineBerry » Aug 27, 2010 2:04 pm

Sityl wrote:I'd just like to point out, that the odds of 10,000 a's chosen randomly in a row are the same odds as the first 10,000 letters of one of shakespeare's works being randomly chosen.


Only if you assume that the monkey actually chooses randomly which a monkey will not do.
User avatar
NineBerry
RS Donator
 
Posts: 2675
Age: 33
Male

Country: nSk
Jolly Roger (arr)

Re: Monkey Typing For Infinite = Shakespeare?

#99  Postby Sityl » Aug 27, 2010 2:18 pm

NineBerry wrote:
Sityl wrote:I'd just like to point out, that the odds of 10,000 a's chosen randomly in a row are the same odds as the first 10,000 letters of one of shakespeare's works being randomly chosen.


Only if you assume that the monkey actually chooses randomly which a monkey will not do.


Which is why I twice said "randomly". :lol:
Stephen Colbert wrote:Now, like all great theologies, Bill [O'Reilly]'s can be boiled down to one sentence - 'There must be a god, because I don't know how things work.'


Image
User avatar
Sityl
 
Posts: 4454
Age: 30
Male

United States (us)

Re: Monkey Typing For Infinite = Shakespeare?

 
 

Re: Monkey Typing For Infinite = Shakespeare?

#100  Postby Sityl » Aug 27, 2010 2:20 pm

I thought I'd add this. I haven't yet gotten my ahead around it, but it seems to play in with the whole "it could happen even if probability is 0" and "it could not happen even if probability is 1" idea, so I'll let you guys parse out what it means.

Wikipedia wrote:In measure theory (a branch of mathematical analysis), a property holds almost everywhere if the set of elements for which the property does not hold is a null set, that is, a set of measure zero (Halmos 1974). In cases where the measure is not complete, it is sufficient that the set is contained within a set of measure zero. When discussing sets of real numbers, the Lebesgue measure is assumed unless otherwise stated.

The term almost everywhere is abbreviated a.e.; in older literature p.p. is used, to stand for the equivalent French language phrase presque partout.

A set with full measure is one whose complement is of measure zero. In probability theory, the terms almost surely, almost certain and almost always refer to sets with probability 1, which are exactly the sets of full measure in a probability space.

Occasionally, instead of saying that a property holds almost everywhere, it is said that the property holds for almost all elements (though the term almost all also has other meanings).


http://en.wikipedia.org/wiki/Almost_everywhere
Stephen Colbert wrote:Now, like all great theologies, Bill [O'Reilly]'s can be boiled down to one sentence - 'There must be a god, because I don't know how things work.'


Image
User avatar
Sityl
 
Posts: 4454
Age: 30
Male

United States (us)

PreviousNext

Return to Mathematics

Who is online

Users viewing this topic: No registered users and 1 guest