Jump to content
BrainDen.com - Brain Teasers

plasmid

VIP
  • Posts

    1756
  • Joined

  • Last visited

  • Days Won

    25

Posts posted by plasmid

  1. 55 minutes ago, Shakeepuddn said:

    These are singular cryptocrossword answers. I love these UK puzzles. 

    Ex: collect in a laughing waistcoat.

    Answer: harvest (a full clue, collect for harvest, is found in the "har" or laugh, and waistcoat, vest)

    I'm afraid that I lack enough intelligence to even approach this one O,O

  2. The thing that makes this problem different is

    Spoiler

    If you know that chest A has more coins than chest B, then chest A can't have the fewest coins (10 gold and 10 silver). So you can pull one coin from chest A and be certain of whether it has 50 gold or 40 silver.

    If chest A has 40 silver, and it has more coins than chest B, then chest B must have 10 gold and 10 silver so you're done.

    If chest A has 50 gold, I think you're stuck having to pick either chest B or chest C and pull up to 11 coins from it. If all 11 are silver then that's the chest with 40 silver; if any of them are gold then you can stop at that point and know it's the 10 gold and 10 silver chest.

     

    • Like 1
  3. On 10/11/2021 at 6:25 AM, harey said:

    I fear there is no solution.

      Reveal hidden contents

    Round 1, A:
        A knows his number if he sees (1,2). As the difference (1) is already used, he must have the sum.
        1Aa: (3,1,2)
        1Ab: (3,2,1)

       (And multiples.)

        In all other cases, A must pass.

    Round 1, B:
        The same way:
        1Ba: (1,3,2)
        1Bb: (2,3,1)

        B reads A's thoughts, useful in following cases:
        from 1Aa: (3,!2,1) -> 1Bc: (3,4,1)
        from 1Ab: (3,!1,2) -> 1Bd: (3,5,2)

        In all other cases, B must pass.

    Round 1, C:
        As previously:
        1Ca: (1,2,3)
        1Cb: (2,1,3)

        Let's assume C sees (3,4,?).
        If the solution is (3,4,1), B would have announced it. So he has 7.

        In general:
        from 1Aa: (3,1,!2) -> 1Cc: (3,1,4)
        from 1Ab: (3,2,!1) -> 1Cd: (3,2,5)
        from 1Ba: (1,3,!2) -> 1Ce: (1,3,4)
        from 1Bb: (2,3,!1) -> 1Cf: (2,3,5)
        from 1Bc: (3,4,!1) -> 1Cg: (3,4,7)
        from 1Bd: (3,5,!2) -> 1Ch: (3,5,8)

        In all other cases, C must pass.

    Round 2, A:
        from 1Ba: (!1,3,2) -> 2Aa: (5,3,2)
        from 1Bb: (!2,3,1) -> 2Ab: (4,3,1)
        from 1Bc: (!3,4,1) -> 2Ac: (5,4,1)
        from 1Bd: (!3,5,2) -> 2Ad: (7,5,2)
        from 1Ca: (!1,2,3) -> 2Ae: (5,2,3)
        from 1Cb: (!2,1,3) -> 2Af: (4,1,3)
        from 1Cc: (!3,1,4) -> 2Ag: (5,1,4)
        from 1Cd: (!3,2,5) -> 2Ah: (7,2,5)
        from 1Ce: (!1,3,4) -> 2Ai: (7,3,4)
        from 1Cf: (!2,3,5) -> 2Aj: (8,3,5)
        from 1Cg: (!3,4,7) -> 2Ak: (11,4,7)
        from 1Ch: (!3,5,8) -> 2Al: (13,5,8)

    Here, I give up. Python:

      Reveal hidden contents

    def A(new,old):
      for l in Z:
        if l[0]==old: Z.append([new,old,l[3]+l[4],l[3],l[4],'',l[2],l[3],l[4]])
      #for l in Z: print(*l)

    def B(new,old):
      for l in Z:
        if l[0]==old: Z.append([new,old,l[2],l[2]+l[4],l[4],'',l[2],l[3],l[4]])

    def C(new,old):
      for l in Z:
        if l[0]==old: Z.append([new,old,l[2],l[3],l[2]+l[3],'',l[2],l[3],l[4]])
    #-------------------------------------------------------------------------#
    Z=[ ['A1','  ',3,1,2], ['B1','  ',1,3,2], ['C1','  ',1,2,3],
        ['A1','  ',3,2,1], ['B1','  ',2,3,1], ['C1','  ',2,1,3]]


    B('B1','A1')
    C('C1','A1')
    C('C1','B1')
    A('A2','B1')
    A('A2','C1')
    B('B2','A2')
    B('B2','C1')
    C('C2','A2')
    C('C2','B2')

    for l in Z:
      print(l[0],end=' ')
      print('{:3d}'.format(l[2]),end=' ')
      print('{:3d}'.format(l[3]),end=' ')
      print('{:3d}'.format(l[4]),end=' ')
      if len(l)>5:
        print('  from',l[1],end=' ')
        print('{:3d}'.format(l[6]),end=' ')
        print('{:3d}'.format(l[7]),end=' ')
        print('{:3d}'.format(l[8]),end='')
      print()

    bingo=[]
    for l in Z:
      if l[0]=='C2' and not l[4] in bingo: bingo.append(l[4])
    bingo.sort()
    print('\nPossible bingos for C2:',*bingo)

     

    Result:

    A1   3   1   2 
    B1   1   3   2 
    C1   1   2   3 
    A1   3   2   1 
    B1   2   3   1 
    C1   2   1   3 
    B1   3   5   2   from A1   3   1   2
    B1   3   4   1   from A1   3   2   1
    C1   3   1   4   from A1   3   1   2
    C1   3   2   5   from A1   3   2   1
    C1   1   3   4   from B1   1   3   2
    C1   2   3   5   from B1   2   3   1
    C1   3   5   8   from B1   3   5   2
    C1   3   4   7   from B1   3   4   1
    A2   5   3   2   from B1   1   3   2
    A2   4   3   1   from B1   2   3   1
    A2   7   5   2   from B1   3   5   2
    A2   5   4   1   from B1   3   4   1
    A2   5   2   3   from C1   1   2   3
    A2   4   1   3   from C1   2   1   3
    A2   5   1   4   from C1   3   1   4
    A2   7   2   5   from C1   3   2   5
    A2   7   3   4   from C1   1   3   4
    A2   8   3   5   from C1   2   3   5
    A2  13   5   8   from C1   3   5   8
    A2  11   4   7   from C1   3   4   7
    B2   5   7   2   from A2   5   3   2
    B2   4   5   1   from A2   4   3   1
    B2   7   9   2   from A2   7   5   2
    B2   5   6   1   from A2   5   4   1
    B2   5   8   3   from A2   5   2   3
    B2   4   7   3   from A2   4   1   3
    B2   5   9   4   from A2   5   1   4
    B2   7  12   5   from A2   7   2   5
    B2   7  11   4   from A2   7   3   4
    B2   8  13   5   from A2   8   3   5
    B2  13  21   8   from A2  13   5   8
    B2  11  18   7   from A2  11   4   7
    B2   1   4   3   from C1   1   2   3
    B2   2   5   3   from C1   2   1   3
    B2   3   7   4   from C1   3   1   4
    B2   3   8   5   from C1   3   2   5
    B2   1   5   4   from C1   1   3   4
    B2   2   7   5   from C1   2   3   5
    B2   3  11   8   from C1   3   5   8
    B2   3  10   7   from C1   3   4   7
    C2   5   3   8   from A2   5   3   2
    C2   4   3   7   from A2   4   3   1
    C2   7   5  12   from A2   7   5   2
    C2   5   4   9   from A2   5   4   1
    C2   5   2   7   from A2   5   2   3
    C2   4   1   5   from A2   4   1   3
    C2   5   1   6   from A2   5   1   4
    C2   7   2   9   from A2   7   2   5
    C2   7   3  10   from A2   7   3   4
    C2   8   3  11   from A2   8   3   5
    C2  13   5  18   from A2  13   5   8
    C2  11   4  15   from A2  11   4   7
    C2   5   7  12   from B2   5   7   2
    C2   4   5   9   from B2   4   5   1
    C2   7   9  16   from B2   7   9   2
    C2   5   6  11   from B2   5   6   1
    C2   5   8  13   from B2   5   8   3
    C2   4   7  11   from B2   4   7   3
    C2   5   9  14   from B2   5   9   4
    C2   7  12  19   from B2   7  12   5
    C2   7  11  18   from B2   7  11   4
    C2   8  13  21   from B2   8  13   5
    C2  13  21  34   from B2  13  21   8
    C2  11  18  29   from B2  11  18   7
    C2   1   4   5   from B2   1   4   3
    C2   2   5   7   from B2   2   5   3
    C2   3   7  10   from B2   3   7   4
    C2   3   8  11   from B2   3   8   5
    C2   1   5   6   from B2   1   5   4
    C2   2   7   9   from B2   2   7   5
    C2   3  11  14   from B2   3  11   8
    C2   3  10  13   from B2   3  10   7

    Possible bingos for C2: 5 6 7 8 9 10 11 12 13 14 15 16 18 19 21 29 34
     

    None of these numbers divides 148.

    Notice that it is always the prisoner with the highest number who can know, so there is no solution in the form [a*148,b*148,148].

     

    Please comment, especially if you found it correct ;)

     

    I also come up with there not being a solution, although admittedly with a bit of hand waving toward the end. Without a computer (or at least not much):

    Spoiler

    Let's call the people and their numbers L, M, and N. Since one of the numbers is the sum of the other two, people will know that their own number must be one of two possibilities, for example if L sees M and N then he knows his number must be |M-N| or M+N.

    Round 1, Person L
    The only thing that could end it at this point is if L sees M = 2N or N = 2M, because then they can rule out that their number is |M-N| since that would equal the smaller of M or N, and someone else already has that number while the OP says everyone has a unique number.

    Since L didn't speak, we've ruled out the possibilities
    M = 2N
    2M = N

    Round 1, Person M
    They could end it if they see L = 2N or N = 2L by the same logic as above. They also know that M can't be 2N or N/2, or else L would have spoken. So if one of M's two possible values (|L-N| or L+N) would have M=2N or M=N/2 then that possibility could be ruled out. Therefore M would speak if any of the following are true:
    L-N = N/2 → L = 3N/2
    N-L = N/2 (already covered because this is the N = 2L scenario)
    L+N = N/2 (not possible)
    L-N = 2N → L = 3N
    N-L = 2N (not possible)
    L+N = 2N (not possible because that would mean L=N)

    Since L and M each didn't speak, we can rule out the possibilities
    (old)
    M = 2N
    2M = N
    (new)
    L = 2N
    2L = N
    L = 3N/2
    L = 3N

    Round 1, Person N
    They could end it if they see L = 2M or M = 2L. Like M, N knows that since L didn't speak, that implies M and N can't be either M = 2N or M = N/2, so per the previous logic they would know their number and speak if L = 3M/2 or L = 3M.

    And since M didn't speak, N also knows that L and N can't be either L = 2N or N = 2L, so by the previous logic they also know their number if M = 3L/2 or M = 3L.

    Next, looking at the last of the new information from the previous round (ruling out L = 3N/2 and L = 3N), N would know their number if one of their possible values (|L-M| or L+M) is 2L/3 or L/3:
    L-M = 2L/3 → M = L/3
    M-L = 2L/3 → M = 5L/3
    L+M = 2L/3 (not possible)
    L-M = L/3 → M = 2L/3
    M-L = L/3 → M = 4L/3
    L+M = L/3 (not possible)

    Since no one spoke so far, we can rule out the possibilities
    (old)
    M = 2N
    2M = N
    L = 2N
    2L = N
    L = 3N/2
    L = 3N
    (new)
    L = 2M
    M = 2L
    L = 3M/2
    L = 3M
    M = 3L/2
    M = 3L
    M = L/3
    M = 2L/3
    M = 4L/3
    M = 5L/3

    I think you might be able to continue like this, drawing more and more conclusions about which possibilities can be ruled out based on what previous people have (or haven't) said and whether it rules out one of your two possible numbers. And when someone does speak, one of the New criteria must have just been met.

    That list of conditions where someone speaks if the numbers they see are a specific ratio of two others gets too complicated for me to want to do everything by hand, but it does seem like with each new person speaking there are new terms introduced of the form X = iY/j where i is in the range from 1 to 2j and j increases by 1 with each person – person L would have spoken in round 1 if N and M satisfied it with j=1, person M would have spoken in round 1 if L and N satisfied it with j=1 or j=2, and person N would have spoken in round 1 if L and M satisfied it with j=1, j=2, or j=3.

    In this case the number we're given is 148, and for it to be of the form X+Y (note that in each case where the person speaks so far, they've ruled out the smaller of their two possibilities so they must have the larger number) where X = iY/j, substituting that value for X in we would have 148 = X+Y = iY/j – Y = (i+j)Y/j which means 148 must be divisible by some number j that shows up when N knows their number (speaking at the end of the second round). The prime factors are 148 = 2*2*37. The j term won't be larger than 6 by the end of the second round, and if j=2 then someone would speak in the first round, so j would have to be 4 and you would have 148 = (i+4)Y/4 where i is in the range from 1 to 7. That can be brute forced and the only "solution" that comes up is i=4, Y=74 but we know that's not a real answer because you can't have the numbers be 74, 74, and 148.

    Edit: SMH I just realized that the stipulation of i being in the range from 1 to 2j doesn't hold for all cases (specifically I listed examples of i=3, j=1 that I overlooked) so I would need to rethink if there are more possibilities, or trudge through everything by hand.

  4. Giving it a shot at writing with different notation

    Spoiler

    I'll use [#] notation to refer to the numbered statements given in the problem, and use {#} notation to refer to facts that can be logically deduced.

    The statements from the problem are
    [1] A: B >20.
    [2] B: C >18.
    [3] C: D <22.
    [4] D: E isn't 17.
    [5] E: A >21.
    [6] A: D >16.
    [7] B: E <20.
    [8] C: A is 19.
    [9] D: B is 20.
    [A] E: C <18.

    We can deduce the following:
    {1} A and D can't both be truthful because of [1] A: B >20 and [9] D: B is 20.
    {2} A and C can't both be liars because of [3] C: D <22 and [6] A: D >16.
    {3} B and E can't both be truthful because of [2] B: C >18 and [A] E: C <18.
    {4} B and D can't both be liars because of [4] D: E isn't 17 and [7] B: E <20.
    {5} C and E can't both be truthful because of [5] E: A >21 and [8] C: A is 19.

    Suppose E is truthful.
    Deduction {3} proves B is a liar, and {4} proves D is truthful.
    Deduction {5} proves C is a liar, and {2} proves A is truthful.
    But A and D both being truthful conflicts with {1}. So we would reach a contradiction if E were truthful and conclude that
    {6} E is a liar.

    Given {6} E is a liar, suppose A is truthful.
    Deduction {1} proves D is a liar, and {4} proves B is truthful.
    But then [7] B (truthful): E (liar) <20 and [1] A (truthful): B (truthful) >20 means that the liars aren't always older than the truthful. So this scenario where A is truthful doesn't work and we can conclude
    {7} A is a liar.

    Given {6} and {7}, E and A are both liars (just using the facts from this point on, no additional suppositions)
    Deduction {2} proves that
    {8} C is truthful.
    Statement [8] C (truthful): A is 19 proves
    {9} A is 19.
    Statement [A] E (liar): C <18 proves that
    {10} C is at least 18.
    But since {9} A is 19 and {7} A is a liar while {8} C is truthful and {10} C is at least 18, we know that
    {11} C is exactly 18, and
    {12} The border between truthful and lying ages is 18-19.
    Statement [6] A (liar): D >16 proves that
    {13} D is no older than 16 (this can be written D <17), and because of {12} we know that
    {14} D is truthful.
    Statement [9] D (truthful): B is 20 proves that
    {15} B is 20, and because of {12} we know that
    {16} B is a liar.
    Statement [7] B (liar): E <20 proves
    {17} E is at least 20 (this can be written E >19).

    Overall, we have the following:
    A (19): liar
    B (20): liar
    C (18): truthful
    D (<17): truthful
    E (>19): liar

     

  5. Comment on your answer

    Spoiler

    04 [2] B: "C is more than 18 years old."
    05 [A] E: "C is less than 18 years old."           => (b1) E=!B

    That's not necessarily true... you could have E=B if C is exactly 18 years old, which is what I had in my answer. And the overall solution runs into a problem: A (liar) is 19 years old, but B (truthful) said C (truthful) is >18. (I'm assuming the OP doesn't want you to invoke finer granularity than integer ages and say that C's birthday is earlier than A's so they can both be 19 but with different truthiness.)

     

  6. Having to actually write it out in such a way that others can read and follow it does wonders for imposing clarity...

    Spoiler

    Suppose E is young enough to always be truthful.
    E (truthful) says C <18 while B says C >18, so B is a liar.
    B (liar) says E <20 (so E must be >19) while D says E is not 17, so D is truthful.
    E (truthful) says A >21 while C says A is 19, so C is a liar.
    C (liar) says D <22 (so D must be >21) while A says D >16, so A must be truthful.
    We have A, D, and E as truthful while B and C are liars.
    But D (truthful) said B (liar) is 20, and E (truthful) said A (truthful) >21, so you can't have a situation where the truth-tellers are all younger than the liars.
    Therefore the initial supposition leads to a contradiction, so E cannot be truthful.

    Given that E is a liar, suppose A is truthful.
    A (truthful) says B >20 while D says B is 20, so D must be a liar.
    D (liar) says E is not 17, so E must be 17.
    B said E <20 and E is 17, so B must be truthful.
    However, E (liar) being 17 while A (truthful) says B (truthful) >20 renders this scenario impossible.
    Therefore, A cannot be truthful.

    Given and A and E are both liars:
    A (liar) says D >16 (so D must be <17) while C says D <22, so C must be truthful.
    C (truthful) said A is 19, and E (liar) said C <18, so C must be 18 (and anyone older than that is a liar).
    Since we know D <17, D must be truthful.
    D (truthful) said B is 20, and B is therefore a liar.

    That last scenario all works out, and you have
    A (liar) is 19
    B (liar) is 20
    C (truthful) is 18
    D (truthful) is <17
    E (liar) is >19 (based on B's lying statement)

     

  7. I agree with harey. As was said earlier, you can rule out the Drummer from being the Truth teller because he said he tells truth and lies, and you can rule out the Piper as being the Truth teller because he says someone else always tells the truth and there's only one Truth teller. So there are three possible Truth tellers.

    (1) If the Jester is the Truth teller then the Piper must be the Liar, as Babysnoot said, but that's not enough to rule out other possible truth tellers.

    (2) If the Juggler is the Truth teller then you know the Drummer must be the Liar. Since the Drummer can't be the Truth teller, and the Truth teller said his statement that he tells both truths and lies is false, the only thing the Drummer could be is the Liar. This kind of works against Babysnoot's argument.

    (3) If the Bear is the Truth teller, then we know the Juggler isn't the Liar but I can't narrow it down more than that.

    I also considered the possibility that the statement that the other three "tell a mixture of truth and lies" means that there must be both some true statements and some false statements among the three, but that still doesn't help. If the Drummer and Juggler are mixes then the Drummer's statement is True and the Juggler's statement is False, so any solution excluding them as Truth teller and Liar would work. And for the Drummer = Liar / Juggler = Truth teller scenario, you would have the Jester's first statement be True and the Piper's statement be False, so that doesn't rule anything out.

  8. I'm not sure I agree with harey. While it's true that if a plane's power is lost it will drop more slowly than a ballistic due to the drag of air against the wings keeping it from accelerating too quickly, while it's flying straight and level and the net vertical velocity is zero I would imagine that it shouldn't have an impact.

    I'm also puzzled by the fact that a plane can stay aloft when the force of gravity is greater than the thrust of the engine. It probably has something to do with the fact that a plane can only stay aloft when the airflow across its wings is laminar, and that if the airflow becomes turbulent (for example if the pilot pulls the nose up too much and the plane goes into a stall) then it can no longer maintain enough lift and starts falling. But I don't know how to account for that with equations and account for balancing out the force of gravity.

  9. Building on Thalia's answer...

    Spoiler

    The problem of finding the probability of getting a word is tricky. For the sake of simplicity I'll assume you're given a list of words that are culled for any pairs of words that use the same set of letters in a different order.

    Suppose you were given a list of all 2 letter words so you know the probability of any two random letters forming a word is
         P2 = [number of 2 letter combinations that are words] / [number of possible random 2 letter combinations] x [number of 2 letter combinations that can be formed from pulling 2 random letters (if you get the letters EM then the word ME counts)]
         P2 = [length of culled word list] / 262 x 2!
    (I'm going to neglect correcting it for the possibility of pulling two identical letters where a swap wouldn't generate a new word since that makes the math easier), and you were asked the probability that a random 3 letters would form a word. If you allow a naive approach, you could say the odds that the first two of the three random letters would form a word are P2, and so are the odds that the second and third letters would form a word, and so are the odds that the first and third letters would form a word. So the odds that a random 3 letters would NOT form a word is the product of the odds that no pair will form a word. The odds that the random 3 letters WOULD form a 2 letter word is then
         P3 = 1 - (1-P2) x (1-P2) x (1-P2), or 1 – (1-P2)3.

    By that logic, the probability that seven random letters could generate a five letter word would be given by
         P5 = [length of culled word list] / 265 x 5!
         P7 = 1 – (1-P5)[7 Choose 5] = 1 – (1-P5)21
    The problem with that logic is that it assumes independence of events: that the probability that 5 of the 7 random letters forms a word is not affected by the probability that any other set of 5 of the 7 random letters forms a word. (That's an implicit assumption when you say [the probability that events X and Y both happen] = [the probability that event X happens] times [the probability that event Y happens].) In reality, some letters are more commonly used than others and if you get a Q in the list then all of the probabilities involving that letter drop a lot and if you get an E then all of the probabilities involving that letter increase a lot. So the formula above might give you a rough answer, but if you want a more accurate answer then you would need some way of correcting for that. And I'm not sure how to do it.

     

    Perhaps ironically, getting the expected number of words that are formed might be easier. In that case you don't care whether events are independent or not, you can just calculate the total size of the list (not culling for words with the same set of letters in different orders), say the number of expected words formed by a random 5 letters would be
         E5 = [length of unculled word list] / 265 x 5!
    and the number of different sets of 5 letters out of 7 random letters is 21 so
         E7 = 21 x E5
    (Maybe you would also need to correct for making the same word with different sets of letters, like not having a random 3 letters of MME count the word ME twice, depending on how you want to handle that scenario.) While it's true that some random 7 letters will give a ton of words and other random 7 letters will give few or none, if you just care about getting the average then that doesn't matter and you don't need to pull your hair out worrying about non-independence of the probabilities like with the first problem. (I'm still cheating by neglecting correcting for the possibility of drawing repeats of the same letter in that 5! term, but that seems like a relatively minor sin for this estimation.)

     

  10. The first thing that jumps out at me is that when I do Einstein puzzles by hand I usually need to do many iterations of going through the rules and filling out as much as I can, and then going through the rules again to narrow things down further based on what I’ve eliminated so far. In this case there’s a single loop of

    For cr = 1 to cntRules

    that gets executed once, as if a human were to just go through all the rules once instead of iteratively. If you as a human are able to solve the puzzle by going over each of the rules once in the order that they're presented, then the program should work. Otherwise maybe it would help if you wrap the for/next loop of cr in a loop similar to the one you currently have with bDoAgain checking for any changes since the last iteration before letting the program end.

    If you can go through this particular Einstein puzzle by hand and complete it in a single iteration (so the above isn't applicable), then could it be an issue with how the rules are encoded? I'm afraid I can't get the app working, but I’m used to seeing things like “The plumber lives in a house to the left of the guy who goes birdwatching on Thursdays” which aren’t so easily encodable with a plus/minus system.

  11. We'll have to see the algorithm and what it's doing in order to say much. Could you share it and walk through how it would handle an example Einstein puzzle that folks without the game could follow (say the one at https://web.stanford.edu/~laurik/fsmbook/examples/Einstein'sPuzzle.html)? If you solve the puzzle the old fashioned way and keep track of what you eliminate and why, is your algorithm able to recreate the path to the solution? If not, then what parts is it missing?

  12. On 11/1/2020 at 2:16 PM, EventHorizon said:
      Reveal hidden contents

    In both xp2008's and my solutions, you don't scan over the same range twice, once for each parity.  You increase the range by the scale factor every time you switch the parity.

     

    Ah, I see. So in that spirit you could present your solution #2 this way (not particularly efficient, but crystal clear that it works)

    Spoiler

    Suppose the groundhog started at hole #0. Check hole #0 on the first day, and if he’s there then you’re done.

    Suppose the groundhog started at hole -1 or hole 1. By the second day (after you’ve checked hole 0) he’ll be at hole -2, 0, or 2. Have the two of you check holes ±2 on the second day, and if you don’t find him and he started at hole ±1 then he must have gone to hole 0 for the second day and will be at hole ±1 on the third day. Check holes ±1 on the third day and you’ll find him.

    Suppose the groundhog started at hole -2 or hole 2 on the first day. By the fourth day (after you’ve taken care of the cases where he starts at -1, 0, or 1) he’ll be at an odd numbered hole from -5 to 5. Search holes ±5 on the fourth day and if he’s not found then he was in an odd numbered hole from -3 to 3 and will be in an even numbered hole from -4 to 4 on the next day. Check holes ±4 on the fifth day, then holes ±3 on the sixth day, etc. until you’ve taken care of all the cases where he started at hole -2 or 2.

    Suppose the groundhog started at hole -3 or hole 3, or in general hole -N or N where you’ve already taken care of all of the smaller numbers. If you’ve taken D days to search, then he must be in hole -(N+D) to (N+D), so search holes ±(N+D) and work your way inward.

    After taking care of that case, move on to the next higher N. No matter where he initially started, you’ll eventually find him.

     

  13. I'm afraid I might be missing something, because it seems like whenever you switch parity you end up losing all the ground you previously covered.

    Consider xp2008's solution...

    Spoiler

    If you assume the initial parity is odd and you search (-5,-3),(-2,0),(1,3),(4,6), then where could the groundhog be on day 4 if he's not caught? If he started from hole -7 then he could have reached hole -4 by day 4, and he could be at hole +8 on day 4, or anywhere outside that range.

    If you then switch to cover the even parity case and search for four days, in the odd parity case the groundhog could have moved from hole -4 on day 4 to hole 0 on day 8, and could have moved from hole +8 on day 4 to hole +4 on day 8. So after you've searched both parities, now all you know for the odd parity case is that the groundhog is not in the range from hole 1 to hole 3. So when you resume your odd parity search on the next day, the groundhog could be in any odd hole. Have you really made any progress?

    Similarly for EventHorizon's first solution

    Spoiler

    Take the case of having bounds of 0 and N (where N is odd) for an initial scan. If you assume initial even parity, then you could scan (0,2), (N,3), (0,4), (N,5), ... (0,N-1) and it would take you N-1 days. You could then re-scan the area covering the initial odd parity case, but after scanning for another N-1 days the groundhog could get anywhere within the even parity case again by the time you start the next scan.

    You could argue that if you start off covering a finite area, then cover a slightly larger area, then cover a slightly larger area, etc. then you will eventually catch the groundhog because the groundhog must be at some finitely numbered hole which you will eventually reach. My counterargument to that is:

    Spoiler

    xp2008's strategy would cover holes -5 through 6 for the odd parity case and finish after 4 days. If you then cover the even parity cases, you could cover holes -6 through 5 for the even parity case and finish both the odd and even parity cases after 8 days.

    Similarly, it would cover holes -23 to 24 for the odd parity case over the next 16 days, so if you start doing that on day 9 (after finishing the odd and even parity cases for -6 to 6) then you would finish on day 24. Then you would cover the even parity cases for that range over the next 16 days and finish on day 40.

    If I'm a groundhog and I don't want to be caught, I start on hole +2 and move to the next higher hole every day. You'll never catch me.

     

  14. Only if they're imaginary stonenibblers.

    Spoiler

    CaptainEd was on the right track. Using his notation, if one stonenibbler's probability of nibbling is p and the other's is q (so the probability of the first not nibbling is 1-p and the second not nibbling is 1-q), then the observed frequency of both, one, or neither nibbling at a time implies

    A) 0.17 = pq
    B) 0.38 = p(1-q) + q(1-p) = p + q - 2pq
    C) 0.45 = (1-p) (1-q) = 1 - p - q + pq

    Since pq = 0.17 based on equation A, plug that value into equation B and you have

    0.38 = p + q - 0.34

    So p+q must be 0.72. Since p+q = 0.72, you know q = 0.72-p. So substitute that for q in equation A and you have

    0.17 = p(0.72-p), which can be rearranged to
    p2 - 0.72p + 0.17 = 0

    And that's a quadratic formula that can be solved as (-b ± sqrt[b2-4ac]) / 2a. But the stuff in the square root is 0.5184 – 0.68, which is a negative number, so you can’t take its square root (at least not with real numbers).

    So the prisoners are up to something, and it's time for warden Betelfax to punish them with a logic puzzle that will grant them freedom if solved or instant death if flubbed.

     

    • Upvote 1
  15. After more thought:

    Spoiler

    My previous answer talked about finding a circle where the maiden could have a faster radial velocity than the ogre. She would get in as good of a position as possible within that circle and then make a straight dash for the exit.

    Now I think her best trajectory is not a straight dash, but one that bends away from the ogre’s current position a little. If M is the maiden's distance from the center of the lake and dM is the rate of change in M, and dA is the rate of change in the angle from the ogre to the center of the lake to the maiden, then the optimal path should be the one with the largest dM/dA ratio. Define angle B as the difference between the direction the maiden is traveling and a line straight out from the center. dM is f cos(B). dA is the ogre’s angular velocity minus the maiden’s angular velocity, so 1 – f sin(B)/M. In principle you could find the angle B that maximizes dM/dA = f cos(B) / (1 – f sin(B)/M) by setting the derivative with respect to B to zero. But that would tell you the best strategy if she can change direction instantaneously and I’m not yet sure how to incorporate her turning speed into that part of the answer.

     

  16. I'm pretty sure this isn't optimal, but it's a start.

    Spoiler

    I think the solution for the previous problem (where the maiden could turn the boat instantaneously) came down to realizing that she could go in a circle of some radius R that’s smaller than the entire lake and be able to move at a radial speed faster than the ogre (she moves a number of degrees around that small circle that’s just slightly more than the number of degrees that the ogre can move around the edge of the lake in the same amount of time). As long as she can move around that inner circle faster than the ogre can move around the perimeter, she can set it up so she’s opposite the ogre when she makes a dash for the shore.

    If the maiden tries that same strategy in this problem, first she needs to find a circle of radius R where she’s moving at a radial speed that’s faster than the ogre. Define the lake’s radius as 1 and the ogre’s speed as 1, so it will take the ogre 2 pi time units to run around the lake. For the maiden to paddle around a circle of radius R she would need to make a 360 degree turn, and the amount of time it takes to rotate the boat 360 degrees is 1/g times the amount of time it takes the ogre to circle the lake, so the maiden spends (2 pi)/g time units turning. The amount of remaining time she has to move the boat forward is [the amount of time it takes for the ogre to circle the lake] – [the amount of time spent rotating the boat] = (2 pi) – (2 pi)/g = (2 pi) (g-1)/g time units to move forward. Her forward speed is f, so she’ll travel a distance of f(2 pi) (g-1)/g. That’s the circumference of the circle she can paddle around, and its radius R is that divided by 2 pi, so R = f(g-1)/g.

    She can position things however she likes within that circle, but then she’ll have to bolt for the shore. I suspect that just charging forward in a straight line is not optimal, but I’ll go ahead and solve for that strategy.

    Her boat won’t be pointing toward the shore when she decides to bolt, it will be pointing parallel to the edge of the circle where she’s paddling. If she’s at a distance R from the center of the lake and just paddles forward in the direction she’s facing, the distance until reaching the shore would be sqrt(1-R2), or sqrt(1-(f(g-1)/g)2). As long as the maiden bolts when her landing spot will be opposite to the ogre’s current position, the ogre will have to travel a distance of pi to reach the landing point. With that strategy, the maiden can be sure of safety if the distance she has to travel is less than f times the distance the ogre has to travel, so the condition for victory is
    sqrt(1-(f(g-1)/g)2) < f pi

    For the case of g=2,
    sqrt(1-(f/2)2) < f pi
    sqrt((4-f2)/4) < f pi
    sqrt(4-f2) < f 2 pi
    4-f2 < f2 4 pi2
    4 < f2 4 pi2 + f2
    4 < f2 (4 pi2 + 1)
    so f > sqrt(4 / (4 pi2 + 1)) or about 0.31435

    Kind of surprisingly, that strategy is only very marginally better than sitting in the center of the lake and rotating until she's facing away from the ogre and then taking off. With that strategy she would travel 1 lake radius and the ogre would have to run pi lake radii, so she wins if f > 1/pi or about 0.31831.

  17. I agree completely with EventHorizon, and will try to summarize in a way that addresses the OP and deconvolutes the paradox at its heart:

    Spoiler

    If Plato were to pick a number, say 4, and decide that he would tell you "You rolled a 4" or "You didn't roll a 4", then Aristotle would actually be correct. There's an 11/36 chance that he would roll a 4, and among those outcomes there are 2 that sum to 7, so if Plato says "you rolled a 4" then there really is a 2/11 chance that the sum is 7. Alternatively, there's a 25/36 chance that he doesn't roll any 4s, and among those outcomes there are 4 that sum to 7, so if Plato says "you didn't roll a 4" then there's a 4/25 chance that the sum is 7. So Aristotle is slightly more likely to have rolled a 7 if Plato says he rolled a 4 (or any other number). The reason for this is that if Aristotle rolls doubles then it obviously won't sum to 7, and Plato is slightly less likely to say that Aristotle rolled any given number if he rolled doubles (1/6 chance of rolling the number Plato picked) than if he rolled two different numbers (1/3 chance of rolling the number Plato picked).

    On the other hand, if Plato picks one of the two numbers that are rolled and calls it out, the math is different. If Aristotle rolls two different numbers then there's a 1/2 chance that Plato will call out either of the two numbers, but if he rolls doubles then there's a 1/1 chance that Plato will call out that number. So there are 11 possible rolls that could lead to Plato calling out 4, but one of those possibilities (rolling double 4s) is twice as likely to lead Plato saying that he rolled a 4 as the others, so the odds of rolling a sum of 7 should be 2/12 instead of 2/11. This fits with our intuition that if Plato simply picks one of the numbers to call out then it shouldn't affect the probability of whether the sum is 7.

    The apparent paradox arises because you're doing the math assuming that Plato's acting as described in the first paragraph, but really he's acting as described in the second paragraph.

     

  18. 18 hours ago, EventHorizon said:

     

      Hide contents

    Instead of red and white, you could just use "the die Plato said was a 4" and "the other one."

     

     

      Hide contents

    First, Thalia just says the answer is 1/6 without the extra "i can tell you one die is X", so has nothing to do with 2/11.  I assume you mean Aristotle.

    But why does there need to be a normalization at all?  What went wrong such that it was necessary?

      Hide contents

     

    It is true that P(11)=P(12)=...=P(66).  Each possible dice roll can happen with equal probability.

    But once Plato says that "one die is a 4," it doesn't merely prune out the ones without 4's.  Using Bayes theorem we can see this.

    P(41 | one is 4) = P(one is 4 | 41) * P(41) / P(one is 4)

    Obviously P(41) is 1/36.  P(one is 4) and P(one is 4 | 41) need an assumption on how Plato decides which value to tell.  Assuming he would uniformly random choose a die to report on, we can see P(one is 4)=1/6 since all values are equally likely and P(one is 4 | 41)=1/2 since he has two options randomly chosen from.

    P(41 | one is 4) = (1/2) * (1/36) / (1/6) = 1/12

    This is the same for 42,43,45,46,14,24,34,54,64.

    But since 44 only has one value possible to report, the value is different.

    P(44 | one is 4) = 1 * (1/36) / (1/6) = 1/6.  So given that one is a 4, the roll 44 is twice as likely as the other 10 possibilities.

    To finish finding the answer...

    P(sum is 7 | one is 4) = P(34 | one is 4) + P(43 | one is 4) = 1/12 + 1/12 = 1/6.

    Of course, if Plato always decides to tell the smaller value shown on the dice or anything other than uniformly random, the probability distribution could be wildly different.

     

     

    The part that I turned red in the quote bugs me a little bit.

    Spoiler

    If you're given that one of the numbers is four, then saying that the probability of rolling a four and a one (in that order) is 1/12 seems at odds with there being eleven possible rolls with a four. But it does make sense if you assume that Plato will randomly pick one of the two dice and announce its number, since he's twice as likely to say that you rolled a four if you rolled a double-four than if you rolled a four and any other number, so you can count that possibility twice and bring the denominator to 12.

    Suppose instead that Plato picked a number N before the dice were rolled and would plan to say either "You rolled an N" or "You didn't roll an N" as if he were in the Donny Hall puzzle?

     

×
×
  • Create New...