this post was submitted on 03 Nov 2024
1141 points (98.6% liked)

Science Memes

11448 readers
1304 users here now

Welcome to c/science_memes @ Mander.xyz!

A place for majestic STEMLORD peacocking, as well as memes about the realities of working in a lab.



Rules

  1. Don't throw mud. Behave like an intellectual and remember the human.
  2. Keep it rooted (on topic).
  3. No spam.
  4. Infographics welcome, get schooled.

This is a science community. We use the Dawkins definition of meme.



Research Committee

Other Mander Communities

Science and Research

Biology and Life Sciences

Physical Sciences

Humanities and Social Sciences

Practical and Applied Sciences

Memes

Miscellaneous

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] Kolanaki@yiffit.net 53 points 1 month ago (2 children)

As I pointed out elsewhere about this: it also is based entirely on probability, like cracking encryption. It could take longer than the universe will be around. But there's also the possibility they write Hamlet within a year because they got lucky.

[–] funkless_eck@sh.itjust.works 34 points 1 month ago (3 children)

if it's infinite monkeys then an infinite amount of them do it correct on the first try

[–] JackbyDev@programming.dev 3 points 1 month ago

That's assuming they're typing truly randomly. Which is a fair assumption.

[–] BluesF@lemmy.world 0 points 1 month ago (2 children)

Not necessarily. Each monkey is independent, right? So if we think about the first letter, it's either going to be, idk, A, the correct letter, or B, any wrong letter. Any monkey that types B is never going to get there. Now each money independently chooses between them. With each second monkey, the chances in aggregate get smaller and smaller than we only see B, but... It's never a 0 chance that the monkey hits B. If there's only two keys, it's always 50/50. And it could through freak chance turn out that they all hit B... Forever. There is never a guarantee that you will get even a single correct letter... Even with infinite monkeys.

I get that it seems like infinity has to include every possible outcome, because the limit of P(at least one monkey typing A) as the number of monkeys goes to infinity is 1... But a limit is not a value. The probability never reaches 1 even with infinite monkeys.

[–] lemonmelon@lemmy.world 3 points 1 month ago

The birthday problem fits into this somehow, but I can't quite get there right now. Something like an inverse birthday problem to illustrate how, even though the probability of two monkeys typing the same letter rises quickly as more monkeys are added to the mix, and at a certain point (n+1, where n is "possible keystrokes") it is inevitable that at least two monkeys will key identically, the inverse isn't true.

If you have 732 people in a room, there's no guarantee that any one of them was born on August 12th.

There's another one that describes this better but it escapes me.

[–] NikkiDimes@lemmy.world 1 points 1 month ago (1 children)

Infinite monkeys. Any probability greater than zero times infinity is infinity. You will see an infinite number of monkeys hitting A and an infinite number hitting B. If there were a finite number of monkeys, you would be correct, but that is not the case.

[–] BluesF@lemmy.world 1 points 1 month ago* (last edited 1 month ago) (1 children)

No, that's not how probability works. "Any probability times infinity is infinity" doesn't even mean anything. Probabilities are between 0 and 1, and you do not multiply them by fixed factors. Infinite probability has no meaning.

I explained the infinity monkeys in another comment more clearly than I did above -here you go.

[–] NikkiDimes@lemmy.world 2 points 1 month ago (1 children)

I could have worded that better. Any probability with a non-zero chance of occurring will occur an infinite number of times given an infinite sequence.

To address the comment you linked, I understand what you're saying, but you're putting a lot of emphasis on something that might as well be impossible. In an infinite sequence of coin flips, the probability of any specific outcome - like all heads - is exactly zero. This doesn’t mean it’s strictly impossible in a logical sense; rather, in the language of probability, it’s so improbable that it effectively "never happens" within the probability space we’re working with. Theoretically, sure, you're correct, but realistically speaking, it's statistically irrelevant.

[–] BluesF@lemmy.world 1 points 1 month ago (1 children)

Eh, I don't think it's irrelevant, I think it's interesting! I mean, consider a new infinite monkey experiment. Take the usual setup - infinite monkeys, infinite time. Now once you have your output... Do it again, an infinite number of times. Now suddenly those near impossibilities (the almost surely Impossibles) become more probable.

I also think it's interesting to consider how many infinite sequences there are which do/do not contain hamlet. This one I'm still mulling over... Are there more which do, or more which don't? That is a bit beyond my theoretical understanding of infinity to answer, I think. But it might be an interesting topic to read about.

[–] NikkiDimes@lemmy.world 1 points 1 month ago* (last edited 1 month ago) (1 children)

Fair enough, I suppose it is interesting!

In terms of the question, "Are there more infinite sequences that contain Hamlet or more that don’t?"- in the context of true randomness and truly infinite sequence, this feels like almost a trick question. Almost every truly random infinite sequence will contain Hamlet an infinite number of times, along with every other possible finite sequence (e.g., Moby Dick, War and Peace, you name it). In fact, the probability of a random infinite sequence not containing Hamlet is effectively zero.

Where it becomes truly interesting is if you have an infinite number of infinite sequences. Now you’d certainly get instances of those “effectively zero” cases, but only in ratios within infinity itself, haha. I guess that’s probably what you were getting at?

[–] BluesF@lemmy.world 1 points 1 month ago* (last edited 1 month ago)

I thought that at first... But then for every infinite series with exactly one hamlet in it, there's an infinite series where one character is wrong. And there's another one where a different character is wrong... And so on and so on. Even if the series contains an infinite number of hamlets, you can replace one character in each in a huge number of ways! It starts to seem like there are more options with almost Hamlet than there are specifically with Hamlet.

In fact, I begin to wonder if almost any constraint reducing the search space in the infinite set of such infinite sequences, you will inevitably have fewer items within the search space than without... Since you can usually construct multiple non-matching candidates from any matching one.

But... Honestly I'm not sure how much any of that matters in infinite contexts. Since they are impossible it boggles my mind trying to imagine it.

[–] ChairmanMeow@programming.dev 0 points 1 month ago (1 children)

That's not true. Infinite doesn't mean "all". There are an infinite amount of numbers between 0 and 1, but none of them are 2. There's a high statistical probability, sure, but it's not necessarily 100%.

[–] Dagrothus@reddthat.com 2 points 1 month ago (1 children)

It is necessarily 100%. That's the whole idea behind infinity. There is a 0% chance of rolling a "2" because it's outside the bounds of the question. Theres a 0% chance of the monkeys typing in chinese too.

[–] BluesF@lemmy.world 1 points 1 month ago* (last edited 1 month ago) (1 children)

No, it isn't, that's a misunderstanding of how independent random variables behave. Even with an infinite number of trials, in this case there is never a guarantee of a particular outcome.

Consider a coin flip, 50/50 chance of either getting heads or tails on each flip. Lets say we do an infinite number of flips, one by one, so that we end up with an infinite ordered set of outcomes, like so: {H, T, T, H, ... }. Now, consider the probability of getting a particular arrangement of heads/tails in this infinite list, like the one I wrote before. You can't calculate a probability for each arrangement - there are an infinite number - but it should be clear that each arrangement is equally likely, right? Because {H, ...} is just as likely as {T, ...}, same with {H, H, ...} and {H, T, ... } and so on and so on. In other words the probabilty of getting all heads on infinite coin flips is the same as the probability of getting any other combination.

In the same way, the infinite monkeys are doing 'coin flips' involving more than 2 options. Lets just assume they have 26 keys, one for each letter, and assume they hit each of them with equal probability. In the same way, for an individual monkey the probability of going {a, a, a, a, a, a, ..., a} is the same as the probability of the same sequence with hamlet somewhere (in a particular position that is - the probabilities are only equal when we consider exactly one arrangement). What might make it more intuitively clear is that even after an infinite number of trials you only have one sequence of letters (or set of sequences, with infinite monkeys). It's clear that there are other possible sequences - like only the letter a - and these all have a non 0 chance of having arisen given a different infinite set of monkeys for a different infinite time period.

It's easy to be misled here! If we return to the coin flip example, the probability of flipping at least 1 head after infinite coin flips approaches 1. The limit of P(at least one H) as the number of flips approaches infinity is 1. But this is a limit! You never reach the limit, even considering infinite situations.

[–] Dagrothus@reddthat.com 1 points 1 month ago (1 children)

0.99999... repeating equals 1. Not close to 1. Equal to 1. The monkeys will necessarily type hamlet somewhere in the sequence. If your group of monkeys hasnt typed it yet, double the number of monkeys.

[–] BluesF@lemmy.world 1 points 1 month ago

A monkey could type any infinite sequence of letters if it types at random. Since infinite sequences of single letters, repeating patterns, and those containing hamlet except one letter is wrong every time are all possible infinite sequences, it's possible that the money produces one of them.

Probability behaves strangely in infinite situations. A single monkey will almost surely produce the complete works of Shakespeare in infinite time... But this is partially a flaw of infinity in general.

As another example, let's say your monkey produces an infinite sequence containing hamlet. What is the probability of that particular sequence arising? It's 0. There is no chance of any particular sequence arising... And yet that one did arise! It was almost surely not going to be that one, but it was. The probability of any single infinite sequence arising is 0, but nonetheless one of them will be the outcome.

[–] absentbird@lemm.ee 11 points 1 month ago (2 children)

If the monkeys were truly infinite would time even matter? For any set of monkeys that could write Hamlet within a year there's an infinite number of duplicate sets, so they could do as much writing in one day as the original set would do over the age of the universe.

[–] JackbyDev@programming.dev 2 points 1 month ago (2 children)

You don't get to pick and choose! You get infinite monkeys. What's all this about duplicate sets? Sounds like somebody is trying to bring in a ringer! That's cheatin!

[–] Malgas@beehaw.org 2 points 1 month ago (1 children)

The point is there's no statistical difference between rolling one die an infinite number of times, rolling an infinite number of dice once, and rolling an infinite number of dice an infinite number of times.

[–] JackbyDev@programming.dev 1 points 1 month ago

My comment was made in jest, I don't actually believe this person was trying to "cheat" on the thought experiment by selecting only smart monkeys lol.

[–] Buddahriffic@lemmy.world 1 points 1 month ago

That's the thing about infinity. If you have infinite monkeys, you don't have to choose. You'll have infinite instances of every possibility.

Finding any of the monkeys that typed out something interesting (or did something interesting that wasn't typing or more common interesting monkey stuff) is another issue. If there's an 0.0000001% of something interesting and unusual happening by coincidence, then there will be 999,999,999 uninteresting or usual instances for each interesting and unusual one.

Now if there were infinite copies of you searching the infinite monkeys for interesting and unusual events and all interesting ones get sent to an email address, the email server would overload in about the time it takes for the quickest interesting thing to happen, be noticed, and reported.

[–] millie@beehaw.org 1 points 1 month ago* (last edited 1 month ago) (1 children)

Considering that there are an infinite number of potential arrangements of keystrokes that aren't Hamlet? I'm honestly not fully convinced that you'd necessarily get Hamlet to begin with, let alone in a finite amount of time. Could you? Sure. But an infinite set minus an infinite number of possibilities still leaves an infinite number of possibilities. Any or all of which could not be Hamlet.

There are an infinite number of values between 1 and 2, but none of them are 3.

[–] absentbird@lemm.ee 1 points 1 month ago (1 children)

There aren't an infinite arrangements of keystrokes that are the length of Hamlet and aren't Hamlet. Hamlet is 191,726 characters long, it's like guessing a password.

44 keys on a typewriter, 191726 characters, makes 44^191726 or about 4.054 × 10^315094 combinations.

[–] millie@beehaw.org 1 points 1 month ago* (last edited 1 month ago) (1 children)

You're shifting the goalposts, and that still doesn't work.

An infinite number of monkeys typing for an infinite length of time doesn't necessitate that they stop once they reach 191,726 characters and then start over again. It also doesn't necessitate that they never repeat a pattern of characters. In fact, it's incredibly likely that they repeat more or less the same patterns more often than not. They're probably going to repeatedly press keys that are in proximity to one another while moving around the keyboard. Things like: ";ml9o fklibhuasdfbuklghaol;jios9 fdlhnikuasdf".

If you're measuring whether or not eventually you'll produce Hamlet by typing out every single possible permutation of 191,726 characters on a keyboard, well.. yeah, of course you will. But infinite monkeys aren't a grid search system for combinations of keystrokes, they're monkeys mashing the keys without knowing what they mean or in all likelihood what a typewriter or computer is.

You want monkeys on keyboards? You're mostly going to get gibberish.

If you put a bunch of yarn in a room with some high-powered rotating fans, are they eventually going to produce a sweater? Probably not. You're just going to have a bunch of tangled yarn. Sweaters require a consistent repetition of a non-random pattern of movement. Alter that pattern only a handful of times and you won't have a sweater even if you do manage to stumble across some version of that pattern accidentally.

Is there a non-zero chance? Eh.. maybe? But there's no reason to assume that it'll actually happen given any amount of time unless someone comes along who knows how to make a sweater and does so.

With monkeys and keyboards you'd be lucky to get a few lines of anything resembling English in iambic pentameter.

[–] absentbird@lemm.ee 1 points 1 month ago (1 children)

I think you're the one who is moving the goalposts. There's no requirement for the monkeys to submit their output, the test is whether the text of Hamlet is among their key presses. As long as there is a nonzero chance, then there is a 100% chance it would appear in an infinite system. Any non-zero probability times infinity has a 100% chance of occuring eventually.

The monkeys mostly produce gibberish, that's the vast majority of the potential outputs, but among that massive number is also the full text of Hamlet.

[–] millie@beehaw.org 1 points 1 month ago

I mean it seems like you're just kind of asserting that it will be there. Just repeating it doesn't make it more true.