Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

RE: RE: Be a monkey!

by KM (Priest)
on Aug 30, 2000 at 22:02 UTC ( [id://30360]=note: print w/replies, xml ) Need Help??


in reply to RE: Be a monkey!
in thread Be a monkey!

More like a few days, assuming a fairly regular typing rate. :)

You should take a look at all the mathematical theories on this. The question is when would one monkey type it, not the collection of monkeys. Another fun read on this (which does give a number of monkeys if you wanted a 50% chance of them typing it within 24 hours) is here (not for mathaphobics!). If it could be done in a few days, I say we start cloning some simians!

One other point, ispell might not have a lot of Shakespeare's words. Perhaps a program to create a list of only those words from a Shakespeare play? :)

Yes, I thought of that. There must be a dictionary around which he used. But, lines like 'To be or not to be' could be from ispell. I simply wonder how much computing time would be needed for one of the monkeys to type any cohesive sentence :)

create a perl script and periodically eval'ing the result?

I simply use grep on my log file.

Cheers,
KM

Replies are listed 'Best First'.
RE: RE: RE: Be a monkey!
by Mork29 (Scribe) on Aug 31, 2000 at 05:31 UTC
    "The theory is that if you had an infinite number of monkeys typing at random" See, there is an infinite number of monkeys, and he is right, in that it would only take as long as it takes a monkey to type enough characters to be shakespere. However, on another subject, can the shakespeare be in the middle of gibberish. Or does the monkey have to stop typing eventually? or can it be: fjkjdfjdsk <the entire hamlet script> fjkjdsljdsk (of course that question would only matter if there were a finite number of monkeys> However, back to my question as to when do the monkeys STOP typing? Does each monkey just keep going?
      If we learned anything from Alan Turing it was that determining whether or not a monkey would ever stop typing is a problem for which there is no general solution ;)
      can the shakespeare be in the middle of gibberish

      Well, it could be "kjasdad to be or not to be asdadad", but not "to sdsdsds be or sasdad not asdasd to asdaere be".

      Does each monkey just keep going?

      You need to figure that the monkeys have an unlimited supply of Jolt Cola, Penguin mints and do not sleep. Hey, that is sounding strangely familiar to my life!

      Cheers,
      KM

RE: RE: RE: Be a monkey!
by turnstep (Parson) on Aug 30, 2000 at 23:08 UTC

    > > create a perl script and periodically eval'ing the result?

    > I simply use grep on my log file.

    I meant how long for a monkey script to create a valid perl file...

      Well, if you were to add numbers to the monkeys keyboard, all s/he would have to do is type a 1 :)

      How long it would take the monkey to write an interesting JAPH, is another story.

      Cheers,
      KM

      Oh, that happens immediately. You get a blank file right away and Perl has no problem figuring out what that means.

      The more interesting question is until it produces an interesting Perl file. And the answer to that is probably pretty long given that all lowercase letters and punctuation is missing. :-)

      Actually Dominus has an interesting theory that proves that it is more likely for monkeys to type a valid program in Perl than in most other programming languages.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://30360]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-19 04:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found