Interesting probability question

  1. The problem statement, all variables and given/known data

    Firstly, I'd like to point out that this question is a little left of field...but here it is anyway.

    Here is what Puck has to say at the end of A Midsummer Nights Dream
    If we shadows have offended,
    Think but this, and all is mended,
    That you have but slumber’d here
    While these visions did appear.
    And this weak and idle theme,
    No more yielding but a dream,
    Gentles, do not reprehend:
    if you pardon, we will mend:
    And, as I am an honest Puck,
    If we have unearned luck
    Now to ’scape the serpent’s tongue,
    We will make amends ere long;
    Else the Puck a liar call;
    So, good night unto you all.
    Give me your hands, if we be friends,
    And Robin shall restore amends.

    Pick any word in the first few lines and do the following: Let’s say your choice is the
    word “shadows”. This word has seven letters. The seventh word following “shadows”
    is “all”. This word has three letters. The third word following “all” is “That”. This
    word has four letters, etc. proceed until you come across the word “restore” in the last
    line, from where you cannot move any further. Why is it that no matter which word
    you choose, you always end up with the same word, “restore”. In fact, even if you had
    started anywhere else in A Midsummer Nights Dream you would have wound up with
    the same word. Is this a secret message left by Shakespeare, is it coincidence, or is there
    another easy explanation?

    The attempt at a solution

    I really don't have any ideas. At first I thought it may be Shakespeare's style of writing, but after some research it seems iambic pentameter doesn't have a lot to do with it. Anybody think there is any mathematical basis in this question?
  2. jcsd
  3. Dick

    Dick 25,910
    Science Advisor
    Homework Helper

    To make this trick work you only have to pay attention to last few lines and make sure all paths lead to 'restore'. The rest of the play is irrelevant. I think it actually is a pretty interesting question. I would think the odds a random piece of prose would have this property is low but hardly infinitesimal, but then probability "doth make fools of us all". I do think the odds are infinitesimal it's a message from Shakespeare. What's the message? Predicting the "Restoration"? Hah. The correct thing to do is write a computer program to skip through prose in this way and see what happens.
  4. EnumaElish

    EnumaElish 2,332
    Science Advisor
    Homework Helper

    Do you always get the initial r of restore? Or end up anywhere within that word?
  5. HallsofIvy

    HallsofIvy 41,060
    Staff Emeritus
    Science Advisor

    Go back and read it again- you move by a certain number of words not letters. He is saying you always wind up on the word "restore".
  6. Avodyne

    Avodyne 1,358
    Science Advisor

    I think you always end up at one particular word, though I can't actually prove it. But here's how to analyze it.

    Make a list of the number of letters in each word, starting with the last word and going backwards through the prose. Call the nth number in this list wn. For Midsummer Night's Dream, this list begins w1=6, w2=7, w3=5, w4=5, w5=3, ...

    Now make a new list of numbers, r1, r2, ..., according to the following rule: starting with n=1, if n-wn is negative or zero, rn=n. If n-wn is positive, rn=rn-wn.

    The meaning of the r list is this: if you start at the nth word in the prose (counting backwards from the end), and move forwards according to the rule given by t_n_p, rn gives you the number of the word where you end up. For Midsummer Night's Dream, the r list is r1=1, r2=2, r3=3, r4=4, r5=2, r6=6, r7=2, r8=6, r9=2, and then rn=2 for every n>9.

    Now, I ran this on Mathematica a couple dozen times, using a list of 100 word lengths chosen randomly between 1 and 11 letters (not an ideal simulation of English, I grant you). Every time, the r list eventually was a single repeating number.
    Last edited: Sep 10, 2007
  7. Interesting concept avodyne, how did you actually figure that out!

    Another person also told me something along the lines of finding the mean number of letters in a word and so on and so forth. Can't exactly remember how they explained it though.. :confused:
  8. Avodyne

    Avodyne 1,358
    Science Advisor

    Dick had the key insight, that only the last few words matter. So I thought it should be possible to write an algorithm that figures it out.

    The idea of the r list is to label the nth word with n if it's a word you end on, or with the label of the word you go to if it's not a word you end on. By doing this backwards through the prose, the labels propagate, so that if one word goes to another and then to another (where it stops), they all get the label of that last word.

    Somehow I don't think that's very clear :frown: but it's the best I can do right now ...
  9. Avodyne

    Avodyne 1,358
    Science Advisor

    I realized that it is possible to construct a counterexample: suppose all words have an even number of letters. Then, if you start at any odd-numbered word, you end on an odd-numbered word, and ditto for even. More generally, you need a pattern of word lengths that divides the prose into two or more sets so that if you start on a word in a particular set, you always stay in that set. But my random-number experiments indicate such patterns of word lengths are pretty rare ...
  10. Dick

    Dick 25,910
    Science Advisor
    Homework Helper

    So my guess such behavior is just uncommon is really wrong. It's exceedingly common. Makes sense, any sequence of ten or so words can be a bottleneck, any path coming in leaves on the same path. And as the text gets longer the odds of having a bottleneck get greater. This is a great tool to generate 'messages' from some of the great minds of the past! Well done!
  11. Avodyne

    Avodyne 1,358
    Science Advisor

    That seems to be the key. Very counter-intuitive though!
  12. Dick

    Dick 25,910
    Science Advisor
    Homework Helper

    Indeed, means the longer the text, the more likely there's a unique destination word.
Know someone interested in this topic? Share this thead via email, Google+, Twitter, or Facebook

Have something to add?