Puzzle

HawkeyeHawkeye Join Date: 2002-10-31 Member: 1855Members
edited September 2003 in Off-Topic
<b>Okay I have a cool puzzle for you.
For those of you that hate puzzles, go away.

If you figure out the answer, don't spoil for the rest please. The person who posts the puzzle may answer it himself when he wants to, but no other. You may, however give clues and ask questions about it.

Here's my puzzle:</b>

The syntax of the monkey language is quite simple, yet only monkeys can speak it without making mistakes. The alphabet of the language is {a, b, d, #}, where # stands for a space. The grammer is:

<ul>
<li><stop> ::= b|d
<li><plosive> ::= <stop>a
<li><syllable> ::= <plosive>|<plosive><stop>|a<plosive>|a<stop>
<li><word> ::= <syllable>|<syllable><word><syllable>
<li><sentence> ::= <word>|<sentence>#<word>
</ul>

Which of the following speakers is the secret agent masquerading as a monkey?

<ul>
<li>Ape: ba#ababadada#bad#dabbada
<li>Chimp: abdabaadab#ada
<li>Baboon: dad#ad#abaadad#badadbaad
</ul>

<b>Btw, if you don't know, '|' stands for "or" and '::=' stands for "equals."</b>
«13

Comments

  • BogglesteinskyBogglesteinsky Join Date: 2002-12-24 Member: 11488Members
  • DreadDread Join Date: 2002-07-24 Member: 993Members
    <!--QuoteBegin--Z.X. Bogglesteinsky+Sep 18 2003, 09:36 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Z.X. Bogglesteinsky @ Sep 18 2003, 09:36 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> wth is a plosive? <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    My thoughts excactly. I can't even decypher the
    <!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin--><stop> ::= b|d

    <plosive> ::= <stop>a

    <syllable> ::= <plosive>|<plosive><stop>|a<plosive>|a<stop>

    <word> ::= <syllable>|<syllable><word><syllable>

    <sentence> ::= <word>|<sentence>#<word>
    <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    part so how am I supposed to solve the puzzle <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
  • TalesinTalesin Our own little well of hate Join Date: 2002-11-08 Member: 7710NS1 Playtester, Forum Moderators
    edited September 2003
    It means:

    b or d is a stop.
    A stop followed by 'a' is a plosive (phoneme... don't worry, you're just looking for the ones that don't follow the grammar formula set down here)
    A syllable is either a plosive OR plosive followed by a stop OR 'a' followed by a plosive OR 'a' followed by a stop.
    A word is either a syllable OR a syllable followed by a word followed by a syllable.
    A sentence is either a word, OR a sentence followed by the # followed by a word.

    It's a structural puzzle, though I think I figured it out. Has to do with the tails of the sentences.

    (edit) It's not the one I was thinking of... and actually, I had this same BNF test when I was still working my way through the CompSci track in college. I remembered what a pain it was after having been sidetracked by the monkeys thing (Apes, Chimps, and Baboons are NOT monkeys, distinguishable by their lack of tails. They are primates. A certain secret agent is known to wear tails <as in, a tux>. Mental joke ensued, resulting in a clue toward the wrong answer) ours dealt with cats though. <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo--> (/edit)
  • CreepieCreepie Join Date: 2003-02-19 Member: 13734Members
    Is this someone's homework ?
  • TalesinTalesin Our own little well of hate Join Date: 2002-11-08 Member: 7710NS1 Playtester, Forum Moderators
    Quite possible. The only reason this isn't locked up and Hawk hasn't been warned is because I'm not sure. However, I heartily suggest that no one answer it, just in case he's trying to get an easy-out from a (usually) quarter-long project.
  • CrystalSnakeCrystalSnake Join Date: 2002-01-27 Member: 110Members
    Since this is in the Discussions forum, I'll pose a question for debate:
    Should animals (e.g. monkeys) be used for medical experiments?
  • Anonymous_CowardAnonymous_Coward Join Date: 2003-08-15 Member: 19768Members
    edited September 2003
    Pretty easy. If you use different brackets to represent the different structures, such as:
    <> - sentence {} - word () - syllable || - plosive
    ...and try to simply create a sentence out of that mess, then even someone with no formal education in logic and CS could solve this within time.

    It was kinda fun. Thanks.
  • CreepieCreepie Join Date: 2003-02-19 Member: 13734Members
    It's been a long time ... but isn't that grammar ambiguous ?
  • HawkeyeHawkeye Join Date: 2002-10-31 Member: 1855Members
    edited September 2003
    Well in fact I know the answer, but yes, it is a computer science problem in my textbook.

    Don't lock the thread please! This thread hasn't done anything wrong. It is just food for the brain. Anyone else have puzzles to add?

    Clue to the puzzle: The ape, chimp, and baboon are all primates (at least in this puzzle. Sorry talesin. <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif'><!--endemo--> ).

    *EDIT* Why would I ask that nobody post the answer if my goal was to trick people into doing my homework for me? */EDIT*
  • AkfekaAkfeka Join Date: 2002-11-05 Member: 6991Members
    I would hope this wasn't a quarter-long project.

    All MY quarter-long projects include more work than this one did.

    Still, pretty amusing.
  • p4Samwisep4Samwise Join Date: 2002-12-15 Member: 10831Members
    Got it - and if anyone goes to a school that'd give this as a quarter-long project, I weep for you, because it only took about a minute, and I haven't done lexing/parsing in over a year. <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif'><!--endemo--> It helps if you enumerate all of the possible syllables:

    ba da bab bad dab dad aba ada ab ad

    and then recognize that a word is just a string of an odd number of syllables. If you find a word that you can't break down into an odd number of syllables, it's wrong. For example:

    <b>ba</b>da<b>dab</b>bad<b>ada</b>

    is valid, because it's five syllables. However, there's no way to divide something like:

    baaddaab

    into anything other than four syllables.
  • DiscoZombieDiscoZombie Join Date: 2003-08-05 Member: 18951Members
    All I can say is that my brain hurts now. Thanks a lot <!--emo&:angry:--><img src='http://www.unknownworlds.com/forums/html/emoticons/mad.gif' border='0' style='vertical-align:middle' alt='mad.gif'><!--endemo-->
  • HawkeyeHawkeye Join Date: 2002-10-31 Member: 1855Members
    <b>Here's you another puzzle for those of you stuck on the first one.</b>

    Three people check into a hotel. They pay £30 to the manager and go to their room. The manager suddenly remembers that the room rate is £25 and gives £5 to the bellboy to return to the people. On the way to the room the bellboy reasons that £5 would be difficult to share among three people so he pockets £2 and gives £1 to each person. Now each person paid £10 and got back £1. So they paid £9 each, totalling £27. The bellboy has £2, totalling £29. Where is the missing £1?

    <b>If you know the answer, don't tell. <!--emo&:)--><img src='http://www.natural-selection.org/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo--></b>
  • Smoke_NovaSmoke_Nova Join Date: 2002-11-15 Member: 8697Members
    brain...hurts *stabs Hawkeye for making brain think during painfully slow Principal of Computer Systems class*
  • p4Samwisep4Samwise Join Date: 2002-12-15 Member: 10831Members
    <!--QuoteBegin--Hawkeye+Sep 18 2003, 03:42 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Hawkeye @ Sep 18 2003, 03:42 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> <b>Here's you another puzzle for those of you stuck on the first one.</b>

    Three people check into a hotel. They pay £30 to the manager and go to their room. The manager suddenly remembers that the room rate is £25 and gives £5 to the bellboy to return to the people. On the way to the room the bellboy reasons that £5 would be difficult to share among three people so he pockets £2 and gives £1 to each person. Now each person paid £10 and got back £1. So they paid £9 each, totalling £27. The bellboy has £2, totalling £29. Where is the missing £1?

    <b>If you know the answer, don't tell. <!--emo&:)--><img src='http://www.natural-selection.org/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo--></b> <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    I hate that one because it's not even a real mathematical puzzle. It's just stated misleadingly so that it looks like one.
  • HawkeyeHawkeye Join Date: 2002-10-31 Member: 1855Members
    It is every single bit as much of a puzzle as anything ele. It makes you really understand what is happening before you figure out why there is a "missing" pound.

    Btw, Samwise gave a HUGE clue to the last puzzle if you are still scratching your head on that.
  • p4Samwisep4Samwise Join Date: 2002-12-15 Member: 10831Members
    The appropriate response to that hotel puzzle, btw, is "WTH are you talking about, start making some sense." That's my hint. <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif'><!--endemo--> There is no "missing" anything. The puzzle just gives some numbers that don't add up to some other numbers, and don't need to, and then asks you why they don't add up. It's because they don't.
  • TalesinTalesin Our own little well of hate Join Date: 2002-11-08 Member: 7710NS1 Playtester, Forum Moderators
    edited September 2003
    Heh. The missing pound was dropped on a trolley going the other way. <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo-->
  • HawkeyeHawkeye Join Date: 2002-10-31 Member: 1855Members
    edited September 2003
    Painting problem

    You have a painting with a string attached to it. The string is attached to the upper two corners of the painting. In the wall there are two nails, horizontally next to each other. The string must be hung on the nails in such a way that the painting falls down if any of the two nails is pulled out of the wall. The painting must hang under the nails and must hang on the string.

    How must the painting be hung?

    <b> In other words, how can the string be arranged around the 2 nails such that if one falls, the painting hits the ground (I'm assuming 1 nail can support the entire frame).

    I will go ahead and give the answer to the first one. For those of you who don't want to know, don't read!

    Answer: <span style='color:gray'>Baboon because it has a word with 4 syllables when only even number syllables allowed</span></b>
  • BogglesteinskyBogglesteinsky Join Date: 2002-12-24 Member: 11488Members
    edited September 2003
    <!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->
    If you figure out the answer, don't spoil for the rest please. The person who posts the puzzle may answer it himself when he wants to, but no other. You may, however give clues and ask questions about it.
    <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    <span style='color:red'>*Good to see that some people don't bother even reading the first post all the way through. Edited to remove solution to the last puzzle.*</span>

    as for the painting, hang it on a piece of string so long so that it is only just above the floor. when one of the nails gets pulled out, the string lengthens enough for it to hit the floor

    like so:

    <!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->

          .___.
        /         \
      /_______\
      |             |
      |             |
      | _______|
    ____________
    <!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
  • HawkeyeHawkeye Join Date: 2002-10-31 Member: 1855Members
    edited September 2003
    <b>Sweet! Nice answer. I didn't even consider that. There is another answer though.

    Here's another problem.</b>

    There are three houses (A, B, and C) and three utilities (gas (G), water (W), and electricity (E)). Each house must be connected to each utility, but the various connections should not cross each other.

    A B C


    G W E

    <b>You can't go "underneath" another line.</b>
  • ZelZel Join Date: 2003-01-27 Member: 12861Members
    blech, that ones easy, just gotta draw a whole lotta curvy lines!
  • CrystalSnakeCrystalSnake Join Date: 2002-01-27 Member: 110Members
    <!--QuoteBegin--Hawkeye+Sep 19 2003, 05:39 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Hawkeye @ Sep 19 2003, 05:39 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->In other words, how can the string be arranged around the 2 nails such that if one falls, the painting hits the ground (I'm assuming 1 nail can support the entire frame).
    <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    I have a solution that would make the painting fall if the left nail were removed, but removing the right nail wouldn't work.
    Or is there a solution where removing either nail makes the painting fall?
  • HawkeyeHawkeye Join Date: 2002-10-31 Member: 1855Members
    edited September 2003
    Either nail should make it fall.

    The answer isn't terribly complicated, and you're probably on the right track. Just make it symmetrical.
  • BogglesteinskyBogglesteinsky Join Date: 2002-12-24 Member: 11488Members
    edited September 2003
    ok, i got a puzzle for ya.

    There are three couples. we'll call them Aa, Bb and Cc (where the capital letter is the husband and the small letter is the wife) They come across a river with no bridge, just a rowing boat that can hold two people.

    Because the husbands are very jealous, no wife can be with another man <b>at any time</b>unless her husband is there, be it on any of the banks or on the rowing boat (so [a, Bb] is not allowed because [A] is not there. neither can you have [B] going across to the bank with [a, b] and [a] getting in the boat and going back because [A] is not with [a].

    Understand?

    good.

    how can they all get across the river?

    [edit] the three houses and three utilities is impossible, unless you look at the rules from a different angle. no matter how you arrange the pipes, you will always end up with one pipe on one side of another pipe, when it needs to be on the other side.

    clue: remember, you cannot have pipes crossing each other, but there are other things beside this puzzle that just pipes...

    [/edit]
  • HawkeyeHawkeye Join Date: 2002-10-31 Member: 1855Members
    <b>Ok, you guys are still working on the frame painting thing, but I'll go ahead and post the solution to the utility question.</b>

    Only if we do not regard the houses as points, is the problem is solvable. For example, if the owner of house A would allow that one of the connections to C is laid under his house, the following solution is possible:

    <img src='http://puzzle.dse.nl/harder/gaswaterelectricitysol2.gif' border='0' alt='user posted image'>

    <b> I challenge you to get this to work if they are points, and not the size of houses. It is impossible</b>
  • HawkeyeHawkeye Join Date: 2002-10-31 Member: 1855Members
    And btw, boggle.

    I think the answer might be

    aA to go across.
    A comes back
    AB goes across
    B comes back
    bB goes across
    B comes back
    BC goes across
    C comes back
    cC goes across.

    Why wouldn't this work?
  • Nemesis_ZeroNemesis_Zero Old European Join Date: 2002-01-25 Member: 75Members, Retired Developer, NS1 Playtester, Constellation
    <span style='color:white'>***Moved.***</span>
  • BogglesteinskyBogglesteinsky Join Date: 2002-12-24 Member: 11488Members
    edited September 2003
    <!--QuoteBegin--Hawkeye+Sep 20 2003, 05:17 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Hawkeye @ Sep 20 2003, 05:17 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> And btw, boggle.

    I think the answer might be

    aA to go across.
    A comes back
    AB goes across
    B comes back
    bB goes across
    B comes back
    BC goes across
    C comes back
    cC goes across.

    Why wouldn't this work? <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->

    it wouldnt work because on move 6 , b is on the other bank with A and B is not with her.

    <!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
    Start Aa Bb Cc
    1   Aa-->
    Bb Cc    Aa
    2   <--A  
    A Bb Cc    a
    3   AB-->
    b Cc    Aa B
    4   <--B
    Bb Cc    Aa
    5   Bb-->
    Cc    Aa Bb (all fine so far...)
    6   <--B
    B Cc    Aa b <-- B is not with her
    7   BC-->
    c    Aa Bb C
    8   <--C
    Cc    Aa Bb
    9   Cc-->
    End     Aa Bb Cc
    <!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
    You are very close, but remember, a wife must not be left alone with another man

    (if you can understand that...)
  • WindelkronWindelkron Join Date: 2002-04-11 Member: 419Members
    edited September 2003
    ok.
    <!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
       W4
    _______________

                  B3
       

      W2
         

              B1
    <!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
    There are 4 POWs, 1,2,3, and 4. Two have blue hats and two have white hats, as shown. They can only look straight ahead. They know that two of them have blue and two of them have white; however, they don't know the color of their own hat.
    #4 is in front of a wall (1,2, and 3 cannot see him).
    3 can see nobody, 2 can see 3, and 1 can see 2 and 3.
    If one of the prisoners shouts out the color of his hat, he is released.
    Which prisoner is it?


    Hint: What <b>isn't</b> happening?
Sign In or Register to comment.