0

A monkey types letters from an alphabet plus the space bar with equal probability. He types 1 character per second. What is the expected number of seconds it will take for the monkey to type the phrase inside the quotes "greek symbol" ?

The problem is a bit ambiguous to me because when the monkey chooses the alphabet part of the keyboard, does it guarantee that the monkey will type the correct character? I'm going ot assume that it does make that guarantee.

Then, in this situation, I would think the expectation is equal to the expected number of tosses to get $n$ heads in a row. In this case $n$ is the size of the string, which is 12. So I think the solution is simply $2^{13} - 2$?

If, instead, the monkey will hit 1 of the 26 characters in the alphabet randomly, then I think it becomes a lot more complicated.

  • I read the question as your second interpretation. – Duncan Ramage Mar 29 '21 at 20:16
  • I don't think it's that much more complicated. It's basically like your coin toss but with a 25-to-1 biased coin rather than a 1-to-1 fair coin. – Arthur Mar 29 '21 at 20:18
  • Interestingly, the answer is a little more complicated if the string is replaced by "greek symbog". – Benjamin Wang Mar 29 '21 at 20:22
  • 1
    @BenjaminWang Or if there's a "g" anywhere after the first "g"? – user5965026 Mar 29 '21 at 20:23
  • @Arthur Good point. Do you know what the solution is for $n$ consecutive heads on a biased coin? Can't find it from a quick google search. I want to try to match it with my monte carlo simulation. Not sure if it comes out as nice looking as the case of a fair coin. – user5965026 Mar 29 '21 at 20:25
  • Empirical evidence shows extremely high autocorrelation among real monkeys – Henry Mar 29 '21 at 20:27
  • You have a Monte Carlo simulation for this? – lulu Mar 29 '21 at 20:29
  • @lulu I don't have it coded up currently, but I was envisioning it to be pretty simple to implement. It'll probably take a while to run. – user5965026 Mar 29 '21 at 20:30
  • I would think so. – lulu Mar 29 '21 at 20:32
  • 1
    @lulu I just derived it. I think the solution is $\sum_{i=1}^n \frac{1}{p^i}$ – user5965026 Mar 29 '21 at 20:33
  • The biased coin problem can be done via states. If $p$ is the probability of throwing $H$ and $E_i$ is the expected number of tosses required to get $i$ Heads, then $E_i=p\times (E_{i-1}+1)+(1-p)\times (E_{i-1}+E_i+1)$ – lulu Mar 29 '21 at 20:34
  • Yes, I agree with your result. – lulu Mar 29 '21 at 20:39
  • What does become the problem is you give the monkey a greek keyboard ? You did not consider this possibility. (joke for sure). – Claude Leibovici Mar 30 '21 at 06:37
  • @lulu I'm revisiting this problem under the assumption that the half the time the monkey hits one of the 26 letters, it does it so uniformly at random. It seem swe previously said this was equivalent to getting 12 consecutive heads of a biased coin. But I don't think it's equivalent because there is a space in "greek symbol", which I think ruins the symmetry of the problem since the the probability of typing a space is 0.5, but the probability of typing the correct alphabet character is 0.5/26. – user5965026 May 11 '21 at 01:47
  • I don't think that is clear. What does the monkey do the other half of the time (given that he has hit a letter and not a space)? To be clear, the comments all assume that the monkey is striking keys uniformly at random. – lulu May 11 '21 at 11:03
  • @lulu I initially assumed that when the monkey hits a letter, it hits the correct one that is next in the sequence, but some comments interpreted as the monkey hitting one of the 26 letters at random, given that it hits a key and not a space. So under this assumption, I tihnk you lose symmetry? – user5965026 May 11 '21 at 12:44
  • I don't understand. You are free to make whatever assumption(s) you like, but whatever you assume, you should make clear. Right now, it is not clear. I suggest removing all the extra verbiage from the question. You have a $27$ sided die (I believe). Perhaps it is biased, perhaps not (that is up to you). There is a particular string of values you are after. Can you put your assumption(s) in those terms? – lulu May 11 '21 at 13:16

0 Answers0