from Hacker News

Universe would die before monkey with keyboard writes Shakespeare, study finds

by hackernj on 11/1/24, 8:25 AM with 158 comments

  • by tombert on 11/1/24, 4:07 PM

    What kind of "study" would this even be? I thought the point of the infinite monkey thing was to talk about regular distributions and eventualities of every possible string showing up. I don't think anyone claimed that any relatively-long string would show up in any reasonable amount of time necessarily, but it's kind of a bizarre assertion to make.

    It's sort of like stating the runtime efficiency of a Bogosort; the runtime efficiency is unbounded. Theoretically any list could be sorted on the first run, but it could also just keep sorting in an unbounded fashion for forever, though given enough time (which could be tens of trillions of years or longer), it will eventually be sorted if we assume regular distribution of random numbers.

    ETA:

    Ok, I read through the actual paper, and it's clearly meant more as a joke, which I don't think was made clear in this article: https://www.sciencedirect.com/science/article/pii/S277318632...

  • by Aardwolf on 11/1/24, 3:10 PM

    The theorem is called "infinite monkey theorem". That means infinite amount of time. A googol years is not infinite, it's infinite times smaller than that. In an infinite amount of time they will write Shakespeare works (if they type randomly enough and not with some bias like never typing certain combinations of letters)

    Also, at least the article could have said what the actual probability is then? Are we talking 1e-500, 1e-1000000, 1 / googolplex, or what?

    EDIT: of the above examples 1e-1000000 is the closest I think (in order of magnitude of exponent), based on something like 30^5000000 divided through some amount of years assuming ~5 characters per word. So perhaps "If every atom in the universe was a universe in itself" won't get us there, but recursively repeat that process a million times and we do get there

  • by netsharc on 11/1/24, 4:27 PM

    Not the point of the article, but this got me curious...

    > Shakespeare’s canon includes 884,647 words – none of them banana.

    If this article (1) is accurate, Shakespeare never even knew what a banana is, and he never tried it, since he died ~2 decades before they came to England:

    > England got its first glimpse of the banana when herbalist, botanist and merchant Thomas Johnson displayed a bunch in his shop in Holborn, in the City of London, on April 10, 1633.

    (1) https://theconversation.com/the-day-bananas-made-their-briti...

  • by soco on 11/1/24, 9:39 AM

    A monkey with keyboard already wrote Shakespeare, duh. Other monkeys called it Shakespeare.
  • by creativenolo on 11/1/24, 12:53 PM

    They have arbitrarily shifted the goal posts to fit their conclusion:

    > working out that even if all the chimpanzees in the world were given the entire lifespan of the universe, they would “almost certainly” never

    Who assumed the original adage had the constraint of the universe’s lifetime.

  • by chasd00 on 11/1/24, 4:26 PM

    I thought the saying was “infinite monkeys..” and in that case you would get the full works of Shakespeare immediately. With an infinite amount of time and one monkey you’d get the full works of Shakespeare in every language supported by the typewriter any number of times in a row you wished. In fact, you’d get anything you wanted as long as the probability was > 0

    Edit: after walking my dogs, isn’t the probability of the full works of Shakespeare never being typed out also > 0? (I can’t believe I’m actually spending calories on this..)

  • by qarl on 11/1/24, 3:09 PM

    200,000 is quite a bit smaller than infinite.
  • by jackstraw14 on 11/1/24, 12:10 PM

    https://libraryofbabel.info/

    it's all there regardless

  • by v8xi on 11/1/24, 3:55 PM

    In graduate school we had to answer this on a test question and it took all of 5 minutes...should have published it, I guess
  • by umvi on 11/1/24, 4:50 PM

    I am biased by my religious beliefs, but I've always struggled with the idea that abiogenesis could spontaneously occur in "just" a few billion years on earth. A few billion seems like not enough time. Even the simplest forms of life are mind bogglingly complex.

    Of course, it's a few billion years scaled across >1 life-friendly planets (since it only has to happen on 1 of them), but still just seems like not enough monkeys and typewriters in the given timeframe to produce something as astonishingly complex as life, let alone Shakespeare.

  • by calibas on 11/1/24, 5:50 PM

    Actually, the study doesn't say that it wont happen, but that there's a 6.4 * 10^-7228454 chance of it happening before the Universe ends.

    That's an infinitely larger chance than 0!

  • by innagadadavida on 11/1/24, 4:22 PM

    Empirically a monkey did already creat the works of Shakespeare in a mere 13billion years. This is the time it took for the universe to form, earth to evolve to create a monkey that could write all those words down. The entire process from start to finish is way more complicated and random than anyone typing 26 character randomly into the keyboard. But I guess we are talking about uniform distributions here.
  • by dijksterhuis on 11/1/24, 8:29 AM

  • by The_Blade on 11/1/24, 9:55 AM

    it was the best of times, it was the blurst of times!?!?!
  • by jajko on 11/1/24, 10:37 AM

    But universe as we understand it is endless / infinite on time scale, no? [1] has some nice projections how even basic quantum stuff eventually breaks down, yet nothing is really ending, if you don't count matter as we know it.

    [1] https://en.wikipedia.org/wiki/Timeline_of_the_far_future

  • by thom on 11/1/24, 3:39 PM

    What if something in monkey psychology causes them to hit the keyboard with their fist or palm every five minutes or so of typing? What if they regularly lapse into just pressing one key over and over? It seems very unlikely to me that even with infinite monkeys a work would be generated, because they're not actually random number generators.
  • by andrewstuart on 11/1/24, 9:13 AM

    No-one ever said it would happen within a finite time period, only that it would happen given infinite time.

    That’s the whole point.

  • by GuB-42 on 11/1/24, 5:19 PM

    If you take it literally, there is a non-zero chance that a monkey types the entire works of Shakespeare. I mean, it has already happened: who is Shakespeare but an intelligent monkey? (don't tell the librarian...)

    For that to happen again, a monkey has to evolve into an intelligent specie interested in human history, find the complete works of Shakespeare, and write it. It is more likely than using probabilistic arguments using letter frequencies, or actual monkeys[1].

    [1] https://archive.org/details/NotesTowardsTheCompleteWorksOfSh...

  • by minkeymaniac on 11/1/24, 3:14 PM

    How long would it take a computer or set of computers to pick random characters and generate the complete work

    how long for 1 paragraph how long for 1 page how long for 1 chapter

    etc etc

    Does it get harder/slower by a factor?

    would be an interesting exercise

  • by eth0up on 11/1/24, 5:04 PM

    Granted, the schedule is of maximum generosity. But does it not seem unfair to ask a monkey to compose the entire works of Shakespeare, considering Shakespeare himself might have been incapable of such a feat?

    And while it may take an army of them, we know these creatures are at least capable, collectively, of operating the Daily Mail, which is still all pretty early given the time remaining.

    My fingers are crossed and I still have hope

  • by ribcage on 11/1/24, 4:32 PM

    The universe would die of shame right now if it knew it's humans are spending their time questioning garbage like this.
  • by appden on 11/1/24, 5:33 PM

    > even if all the chimpanzees in the world were given the entire lifespan of the universe

    Seems to me like a flawed “study” if the baseline assumption is that chimpanzees would type randomly even when given lifespans through the heat death of the universe, which is estimated at 10^100 (googol) years!

  • by lindbergh on 11/1/24, 4:35 PM

    More details on the math related to it than you'd like : https://www.youtube.com/watch?v=OjcacSB6_EE
  • by hombre_fatal on 11/1/24, 5:13 PM

  • by skybrian on 11/1/24, 4:24 PM

    It can happen a lot faster with a rigged random number generator:

    https://www.pcg-random.org/party-tricks.html

  • by superjan on 11/1/24, 5:09 PM

    I would argue it is conceivable that given enough time, a monkey or ape species can evolve that is intelligent enough to write Shakespeare’s full works.
  • by nachox999 on 11/1/24, 3:20 PM

    we need more monkeys
  • by anon291 on 11/1/24, 3:39 PM

    Was this seriously a question? I mean, this is something a college student or advanced high schooler could calculate.

    The law of large numbers is still correct. Nowhere is there a requirement that the large numbers be smaller than the various physical constants of the universe.p

  • by nopelynopington on 11/1/24, 4:57 PM

    Surely it depends on the calibre of monkey we deploy
  • by jjk166 on 11/1/24, 5:04 PM

    I mean this is a really simply thing to work out. There are 30^n strings of length n that can be made by mashing a 30 key keyboard. The time to the heat death of the universe is 10^100 years which is approximately 30^72 seconds. Your odds of getting a string of length n in the lifetime of the universe is

    ( number of monkeys * typing rate in characters per second * 30^72 ) / 30^n

    The authors plugged in 200,000 (=30^3.5) and 1, meaning their odds are 30^75.5 / 30^n = 30^(75.5-n)

    For a string of less than 69 characters, the odds are fantastic. For a string of more than 82 characters the odds are abysmal. At 69 the odds of the substring existing are roughly equivalent to losing the lottery, and at 82 the odds are equivalent to winning the lottery.

    Shakespeare's shortest sonnet, 126, is a string of 533 characters.

  • by Iwan-Zotow on 11/1/24, 5:08 PM

    Bring more monkeys!
  • by th0masfrancis on 11/1/24, 3:33 PM

    In other news - Life expectancy of the universe is finite
  • by Fricken on 11/1/24, 9:07 AM

    These Mathematicians are very selective about which aspects of the universe they want to regard and which aspects they want ignore. Like, yeah you can take an imaginary situation and imagine that it's possible, or impossible. It can go any way because it's imaginary. No need to waste time on math, you can just imagine any outcome you like.

    In reality, however, I think if you had a system that feeds a monkey a treat every time it strikes a letter key that corresponds to the next letter in a Shakespere play displayed on a monitor, you would eventually have some Shakespeare typed out by a monkey.

    One could also just have a monkey mash keys for a while, and then after removing all the unnecessary letters you'd be left with a Shakespearian play.

    Or, with a group of monkeys and plenty of time one could use natural selection to evolve them into a literate species that could handle the task easily. This is the method currently in use for the typing of Shakespeare. It has already been done, many times over.