• Quick note - the problem with Youtube videos not embedding on the forum appears to have been fixed, thanks to ZiprHead. If you do still see problems let me know.

now is the time for all good men...

varwoche

Penultimate Amazing
Staff member
Joined
Feb 19, 2004
Messages
18,218
Location
Puget Sound
You know about the monkeys with typewriters, and how in N years one of them will randomly type "now is the time for all good men to come to the aid of their country"? In the version I heard, N was pretty big, like 89 or so (depends on # monkeys of course).

Anyway, imagine being the supervisor of these monkeys, the person who's job it is to monitor the monkeys until sentence is typed. And imagine the number of times one of them gets as far as "aid of their coun" before screwing up.
 
varwoche said:
You know about the monkeys with typewriters, and how in N years one of them will randomly type "now is the time for all good men to come to the aid of their country"? In the version I heard, N was pretty big, like 89 or so (depends on # monkeys of course).

Anyway, imagine being the supervisor of these monkeys, the person who's job it is to monitor the monkeys until sentence is typed. And imagine the number of times one of them gets as far as "aid of their coun" before screwing up.
Okay . . .
 
Haha...that's great...

Although studies have shown that monkeys don't type at random, they seem to prefer certain letters...s for example.
 
The Simpsons:

Montgomery Burns reads:

"It was the best of times...it was the burst of times?! Why I outta....!"

Monkey screams and runs out of the room.
 
triadboy said:
"It was the best of times...it was the burst of times?! Why I outta....!"
"It was the best of times, it was the...blurst of times?! You stupid monkey!"


I shouldn't know that by memory :(
 
I had always heard it as "If you have enough monkeys banging randomly on typewriters, they will eventually type the works of William Shakespeare."
Fortunately, in this age of the internet and programmers with too much time on their hands, there is a way to find out:
The Monkey Shakespeare Simulator
 
Perhaps given an 'infinite' period of time, the monkeys evolve to be litrerary geniuses? Or at least become smart enough to copy something that is presented to them?
 
Fortunately, in this age of the internet and programmers with too much time on their hands, there is a way to find out:

I can't decide if that's really cool, or really frightening. Cool link either way, thanks.
 
It was the best of times, it was the...blurst of times?! You stupid monkey!"

You left out the part where after Burns pulls the paper out of the typewriter, the monkey leans back and starts puffing on a cigarette while eyeing Burns.
 
varwoche said:
You know about the monkeys with typewriters, and how in N years one of them will randomly type "now is the time for all good men to come to the aid of their country"? In the version I heard, N was pretty big, like 89 or so (depends on # monkeys of course).

Anyway, imagine being the supervisor of these monkeys, the person who's job it is to monitor the monkeys until sentence is typed. And imagine the number of times one of them gets as far as "aid of their coun" before screwing up.
I would say it takes perhaps a few minutes dependig on how fast the mokey types!

We are of course assuming a computer terminal!
Scenario: The monkey starts typing, and the program prints only the right letter. So after about 15 strokes the monkey comes up with an 'N'. And the 'N' is displayed. He continues and after a while he its the 'o' and the 'o' come up. So after a few minutes he has written 'Now is the...' on the screen.

And that's also how evolution worked. In evolution life and death dictaded what letters come up on the screen. A small DNA string suriveved not that long but a big DNA did, and that's what came up on the sceen...
 
Re: Re: now is the time for all good men...

Anders said:

I would say it takes perhaps a few minutes dependig on how fast the mokey types!

We are of course assuming a computer terminal!
Scenario: The monkey starts typing, and the program prints only the right letter. So after about 15 strokes the monkey comes up with an 'N'. And the 'N' is displayed. He continues and after a while he its the 'o' and the 'o' come up. So after a few minutes he has written 'Now is the...' on the screen.

And that's also how evolution worked. In evolution life and death dictaded what letters come up on the screen. A small DNA string suriveved not that long but a big DNA did, and that's what came up on the sceen...

Well, kinda... is a neat way to think of it.
 
varwoche said:

You know about the monkeys with typewriters, and how in N years one of them will randomly type "now is the time for all good men to come to the aid of their country"? In the version I heard, N was pretty big, like 89 or so (depends on # monkeys of course).
Are you speaking of the whole arbitrariness of existence here?


Anyway, imagine being the supervisor of these monkeys, the person who's job it is to monitor the monkeys until sentence is typed. And imagine the number of times one of them gets as far as "aid of their coun" before screwing up.
Of course if you had them typing on computer keyboards then the whole thing could be monitored automatically and you wouldn't need someone to watch so closely. ;)
 
You still would:

The monkeys would be prone to break the keyboards, eat the keys. Someone would have to feed and clean up after them and make sure they're producing, the keyboards are all still plugged in and working, replace dead monkeys, etc.

Of course, most of the time, the output would be a bit like "ddddddddddddddfdddddeddedddedddgvuief bndddddddeddddsdsdsdffdddddd", as the monkey keeps pressing the same key over and over, missing occasionally in between key smashes.

A bit like the output from fundies, except the monkey doesn't claim it's 'ultimate truth', which puts them a notch up in my esteem.
 
So, are we speaking of monkeys or chimps? Because I think chimps are notorious for being destructive.
 
Cage any animal up with a keyboard and they will get around to chewing on and demolishing it.

If you want to redefine it so you can use rheesus monkeys, or primates too small to pry up buttons, keep in mind you'll get a lot less output because they'll have to reach to press buttons on more than one section of the keyboard, and use their whole hand to press keys. Of course, if you (cruelly) suspended several of them over the keyboard, you might more output, but the keyboard would certainly become more rapidly befouled by other monkey 'output'.

Fortunately, there are spill resistant and membrane keyboards. I guess you could specify that a waterproof membrane keyboard the monkey can not harm is used, and occasionally have it sprayed down.

You still have to keep those monkeys alive and typing. Of course, another approach might be to line their entire enclosure with a mesh of these waterproof membrane keyboards. Then you could get the desired output from every monkey footfall and impact. Unless you care whether the monkey types with fingers, toes, tail or turds (dropped and flung)? A lot less inhumane, too. The monkeys just type by carrying on their normal monkey business.
 
AK-Dave said:
I had always heard it as "If you have enough monkeys banging randomly on typewriters, they will eventually type the works of William Shakespeare."
Fortunately, in this age of the internet and programmers with too much time on their hands, there is a way to find out:
The Monkey Shakespeare Simulator


Brilliant. I think this may be a good reason to not shut off my computer-ever.
 
Unfortunately, a fast pseudo-random number generator would be unlikely to ever produce much of any book. The reason being, it has probably 24~32 bits of seed. Are there only 2 to the 24th or 2 to the 32nd possible books? No. That represents only the first three or four characters as ASCII code. "The " would consume the entire seed, unless you wanted to break down text to five bits per characters. Then you might get "THE PL". The random number generator will also tend to begin repeating its self after a while, making it even more unlikely to produce anything. A little reading in cryptology and random number generation will give you more of an idea of the problem.

Would real monkeys do better? Probably a little better, but not substantially better. They fall into patterns of behavior that will repeat.

Possibly if you used the monkey/typewriter box system as a basis for random number generation, using noisy monkey biometrics (such as measuring delays between keypresses and keeping the least significant bits) as well, you might get more randomness to work with. Microphones to capture noise the monkies made could also help.
 
Unfortunately, a fast pseudo-random number generator would be unlikely to ever produce much of any book. The reason being, it has probably 24~32 bits of seed. Are there only 2 to the 24th or 2 to the 32nd possible books? No. That represents only the first three or four characters as ASCII code. "The " would consume the entire seed, unless you wanted to break down text to five bits per characters. Then you might get "THE PL".

It's occured to me that they're probably using an algorithm that can't win. But not for that reason. What has the seed size got to do with the maximum number of letters it could get in a row? Can you explain that?

You say you could only represent two-three letters in a 32 bit seed. Sure, but you wouldn't use the seed to represent anything, you'd use the seed to seed the random number generator and you'd probably use each number it spit out as a character, meaning you'd get the-cycle-length-of-the-generator characters before you had a problem.

That's how I understand it, anyhow. What's the seed size got to do with it? -- besides determining how many characters you can generate before you've cycled - which is nowhere near three.

I mean, I too would assume they're using a 32-bit seed. And they've already gotten up to 15 characters. Doesn't that bust your argument right there?

Edit to add: I'd assume the actual number of characters they could get in a row to be something like 2^24. It should be obvious what assumptions I made in that guess (a "perfect" random number generator, 8 bits per character, etc). Assuming I'm off by half, that's still a lot of characters.
 
Here's a fine article about cheating at on-line poker by reverse-engineering the random number seed from (inadequate) random number technique:
http://www.developer.com/tech/article.php/10923_616221_2

The problem is number space. To say that a 32 bit seed can produce a particular book is approximately equivalent to stating that there are only 2 to the 32nd possible books, especially considering that the generator will begin to repeat its self long before much of a particular book was recognized.

As an example, here's Microsoft's C runtime random number generator, doctored up for clarity. In this case, there really only is 32 bits of non-constant precision maintained. Very weak. You will not get a particular book from this. Not ever.
Code:
/***
*rand.c - random number generator
*
*       Copyright (c) 1985-2001, Microsoft Corporation. All rights reserved.
*
*Purpose:
*       defines rand(), srand() - random number generator
*
*******************************************************************************/

static long holdrand = 1L;
void __cdecl srand (
        unsigned int seed
        )
{
        holdrand = (long)seed;
}

int __cdecl rand (
        void
        )
{
        return(((holdrand = holdrand * 214013L + 2531011L) >> 16) & 0x7fff);
}

The basic gnu pseudorandom generator is much the same, maintaining 32 bits, but returning 32 bits of data. Microsoft's is a hold-over from 16 bit days. They have additional code to do more elaborate generation based on tables of data as well.

Internal to a typical runtime library 32 bit polynomial random number generator, there may be as much as 64 bits of data. The seed is applied to a fixed mask that sets up the internal data, and the random fun begins from there. Are there only 2 to the 64th possible books? Since this internal state (based on 32 bits and the fixed, internal mask), we have 2 to the 32nd possible starting points and 64 bits of internally maintained data.

There are more elaborate pseudo-random number generators, with a LOT more internal state, and they are more time consuming to generate, as well.

It could be pointed out that numbers such as pi or the square root of 2 are non-terminating, non-repeating numbers. A lot of gibberish could be generated from either of these for thousands of years and never amount to much more than a coherent paragraph of text.

Here's a site making fun of 'Bible Codes' using pi.
http://users.aol.com/s6sj7gt/picode.htm
 

Back
Top Bottom