Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Game Anybody

Game Anybody

Scheduled Pinned Locked Moved The Lounge
questioncsscomgame-dev
29 Posts 17 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Michael Dunn

    Binary search? Mouse 1 drinks from bottles 1-500, mouse 2 drinks from bottles 501-1000, mouse 3 drinks from bottles 1-125, and so on until you have some REALLY drunk mice. ;)

    --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ

    R Offline
    R Offline
    Raj Lal
    wrote on last edited by
    #7

    Wow that will be a hell of a party for the mice --- My first article^

    1 Reply Last reply
    0
    • R Raj Lal

      Ok i am back, with some more mind toppling puzzles To strengthen the genius in you on a boring friday and for some of you to ponder in the weekend. You are a programmer turned mad scientist, and decide to have a Party ONE MONTH from today. -> You have one thousand bottles of wine -> You suddenly discover that one of them is poisoned. -> The poison takes a LITTLE LESS THAN a month to take effect. -> You have a LOTS of lab mice at your disposal. -> What is the SMALLEST number of mice that must drink from the bottles to find the poisoned one? Hint, hint: It’s a hint :) So What could be a GOOD RESPONSE for this a Give the right answers in a legit form of the English language b Give wrong answers that sound better than any stupid right answer by the way, one of the movie i saw recently OFFICESPACE was one of the best i saw in the decade. if not already GO AND CHECK IT OUT this weekend --- My first article^

      J Offline
      J Offline
      Jeremy Falcon
      wrote on last edited by
      #8

      1 If you don't die then the poision is someone else's problem. :) Jeremy Falcon

      1 Reply Last reply
      0
      • R Raj Lal

        Ok i am back, with some more mind toppling puzzles To strengthen the genius in you on a boring friday and for some of you to ponder in the weekend. You are a programmer turned mad scientist, and decide to have a Party ONE MONTH from today. -> You have one thousand bottles of wine -> You suddenly discover that one of them is poisoned. -> The poison takes a LITTLE LESS THAN a month to take effect. -> You have a LOTS of lab mice at your disposal. -> What is the SMALLEST number of mice that must drink from the bottles to find the poisoned one? Hint, hint: It’s a hint :) So What could be a GOOD RESPONSE for this a Give the right answers in a legit form of the English language b Give wrong answers that sound better than any stupid right answer by the way, one of the movie i saw recently OFFICESPACE was one of the best i saw in the decade. if not already GO AND CHECK IT OUT this weekend --- My first article^

        C Offline
        C Offline
        code frog 0
        wrote on last edited by
        #9

        Since it takes roughly 1 month for the poison to ill/kill you only get one shot. Your supply of mice is infinite you only have 1000 bottles of wine. So it requires 999 mice. The problem is that there's not enough information to make a good choice. How do you know 1 bottle is bad? You say "suddenly discover" that means that someone either told you one was bad or 30 days ago someone drank from the bad one and is now sick. In that case you simply find the open bottle. If someone tipped you off to a bad bottle 999 mice are going to have one heck of evening. - Rex

        A Plain English signature. Code-frog System Architects, Inc.

        R 1 Reply Last reply
        0
        • M Michael Dunn

          Binary search? Mouse 1 drinks from bottles 1-500, mouse 2 drinks from bottles 501-1000, mouse 3 drinks from bottles 1-125, and so on until you have some REALLY drunk mice. ;)

          --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ

          A Offline
          A Offline
          Andrew Bleakley
          wrote on last edited by
          #10

          So thats what three blind mice really are.

          1 Reply Last reply
          0
          • G Gary Kirkham

            10 The folks at PETA would get an injunction to stop it however. Gary Kirkham Forever Forgiven and Alive in the Spirit He is no fool who gives what he cannot keep to gain what he cannot lose. - Jim Elliot Me blog, You read

            A Offline
            A Offline
            Andrew Bleakley
            wrote on last edited by
            #11

            Use VB programmers then. No one would complain

            R 1 Reply Last reply
            0
            • R Raj Lal

              Ok i am back, with some more mind toppling puzzles To strengthen the genius in you on a boring friday and for some of you to ponder in the weekend. You are a programmer turned mad scientist, and decide to have a Party ONE MONTH from today. -> You have one thousand bottles of wine -> You suddenly discover that one of them is poisoned. -> The poison takes a LITTLE LESS THAN a month to take effect. -> You have a LOTS of lab mice at your disposal. -> What is the SMALLEST number of mice that must drink from the bottles to find the poisoned one? Hint, hint: It’s a hint :) So What could be a GOOD RESPONSE for this a Give the right answers in a legit form of the English language b Give wrong answers that sound better than any stupid right answer by the way, one of the movie i saw recently OFFICESPACE was one of the best i saw in the decade. if not already GO AND CHECK IT OUT this weekend --- My first article^

              L Offline
              L Offline
              Luis Alonso Ramos
              wrote on last edited by
              #12

              I'll drink without thinking about it... Come on, I could drink at most 3 or 4 bottles, and that ending very drunk... So if by chance I get the bad bottle, who cares? it was my turn to die! ;P (and I'll be so drunk I won't even notice I'm dying!) -- LuisR


              Luis Alonso Ramos Intelectix - Chihuahua, Mexico Not much here: My CP Blog!

              The amount of sleep the average person needs is five more minutes. -- Vikram A Punathambekar, Aug. 11, 2005

              1 Reply Last reply
              0
              • A Andrew Bleakley

                Use VB programmers then. No one would complain

                R Offline
                R Offline
                Raj Lal
                wrote on last edited by
                #13

                Andrew Bleakley wrote:

                Use VB programmers then

                thousands and thousands available for disposal :laugh: --- My first article^

                1 Reply Last reply
                0
                • C code frog 0

                  Since it takes roughly 1 month for the poison to ill/kill you only get one shot. Your supply of mice is infinite you only have 1000 bottles of wine. So it requires 999 mice. The problem is that there's not enough information to make a good choice. How do you know 1 bottle is bad? You say "suddenly discover" that means that someone either told you one was bad or 30 days ago someone drank from the bad one and is now sick. In that case you simply find the open bottle. If someone tipped you off to a bad bottle 999 mice are going to have one heck of evening. - Rex

                  A Plain English signature. Code-frog System Architects, Inc.

                  R Offline
                  R Offline
                  Raj Lal
                  wrote on last edited by
                  #14

                  code-frog wrote:

                  The problem is that there's not enough information to make a good choice. How do you know 1 bottle is bad? You say "suddenly discover" that means that someone either told you one was bad or 30 days ago someone drank from the bad one and is now sick.

                  thats why i said programmer turned mad scientist, you can assume that he had one unopened poisoned bottle which he mixed up with 999 bottles --- My first article^

                  1 Reply Last reply
                  0
                  • R Raj Lal

                    Ok i am back, with some more mind toppling puzzles To strengthen the genius in you on a boring friday and for some of you to ponder in the weekend. You are a programmer turned mad scientist, and decide to have a Party ONE MONTH from today. -> You have one thousand bottles of wine -> You suddenly discover that one of them is poisoned. -> The poison takes a LITTLE LESS THAN a month to take effect. -> You have a LOTS of lab mice at your disposal. -> What is the SMALLEST number of mice that must drink from the bottles to find the poisoned one? Hint, hint: It’s a hint :) So What could be a GOOD RESPONSE for this a Give the right answers in a legit form of the English language b Give wrong answers that sound better than any stupid right answer by the way, one of the movie i saw recently OFFICESPACE was one of the best i saw in the decade. if not already GO AND CHECK IT OUT this weekend --- My first article^

                    M Offline
                    M Offline
                    Mike_V
                    wrote on last edited by
                    #15

                    9 10. Explanation below. Number them 0-9. Number the bottles 0-999, in binary. Each bottle then corresponds to a certain combination of mice (each 1 bit on the bottle). Feed each bottle to the appropriate mice. (Ex. bottle 10 (1010) is fed to mouse 3 and mouse 1). After a month the mice who die tell you the number of the bottle. ;) -- modified at 11:35 Saturday 18th March, 2006. Thanks to Steve, see below. :-O

                    R S 2 Replies Last reply
                    0
                    • R Raj Lal

                      Ok i am back, with some more mind toppling puzzles To strengthen the genius in you on a boring friday and for some of you to ponder in the weekend. You are a programmer turned mad scientist, and decide to have a Party ONE MONTH from today. -> You have one thousand bottles of wine -> You suddenly discover that one of them is poisoned. -> The poison takes a LITTLE LESS THAN a month to take effect. -> You have a LOTS of lab mice at your disposal. -> What is the SMALLEST number of mice that must drink from the bottles to find the poisoned one? Hint, hint: It’s a hint :) So What could be a GOOD RESPONSE for this a Give the right answers in a legit form of the English language b Give wrong answers that sound better than any stupid right answer by the way, one of the movie i saw recently OFFICESPACE was one of the best i saw in the decade. if not already GO AND CHECK IT OUT this weekend --- My first article^

                      E Offline
                      E Offline
                      El Corazon
                      wrote on last edited by
                      #16

                      Quartz... wrote:

                      -> You suddenly discover that one of them is poisoned. -> What is the SMALLEST number of mice that must drink from the bottles to find the poisoned one?

                      None, you discovered it. ;P:laugh: don't you DARE make me think after work on friday! :rolleyes: hey! I just figured something.... you are a freaking mad scientist!! buy one more bottle of "good" wine and just give the others to your guests!! who gives a heck what happens to them, you are a freaking mad scientist!! :laugh: _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb) -- modified at 19:47 Friday 17th March, 2006

                      1 Reply Last reply
                      0
                      • M Mike_V

                        9 10. Explanation below. Number them 0-9. Number the bottles 0-999, in binary. Each bottle then corresponds to a certain combination of mice (each 1 bit on the bottle). Feed each bottle to the appropriate mice. (Ex. bottle 10 (1010) is fed to mouse 3 and mouse 1). After a month the mice who die tell you the number of the bottle. ;) -- modified at 11:35 Saturday 18th March, 2006. Thanks to Steve, see below. :-O

                        R Offline
                        R Offline
                        Raj Lal
                        wrote on last edited by
                        #17

                        Genius --- My first article^

                        1 Reply Last reply
                        0
                        • R Raj Lal

                          Ok i am back, with some more mind toppling puzzles To strengthen the genius in you on a boring friday and for some of you to ponder in the weekend. You are a programmer turned mad scientist, and decide to have a Party ONE MONTH from today. -> You have one thousand bottles of wine -> You suddenly discover that one of them is poisoned. -> The poison takes a LITTLE LESS THAN a month to take effect. -> You have a LOTS of lab mice at your disposal. -> What is the SMALLEST number of mice that must drink from the bottles to find the poisoned one? Hint, hint: It’s a hint :) So What could be a GOOD RESPONSE for this a Give the right answers in a legit form of the English language b Give wrong answers that sound better than any stupid right answer by the way, one of the movie i saw recently OFFICESPACE was one of the best i saw in the decade. if not already GO AND CHECK IT OUT this weekend --- My first article^

                          S Offline
                          S Offline
                          Srikanth N Remani
                          wrote on last edited by
                          #18

                          The answer is 10 1. The best way of identifying the wine bottle is to number each wine bottle from 1 to 1000 2. use the mice as binary bits. i.e. since 2 power 10 is 1024 which is nearest number to 1000 we can represent any number from 0 - 1000 using 10 mice. 3. Arrange the mice in the following order, (10) (9) (8) (7) (6) (5) (4) (3) (2) (1) The bottle number say 33 is fed to (5) and (1) since 10001 represents 33 in binary, again 66 will be fed to (6) and (2) since 100010 represents 66 in binary. So, by feeding 10 mice. I can identify which bottle is poisonous. Cheers.

                          S S 2 Replies Last reply
                          0
                          • R Raj Lal

                            Ok i am back, with some more mind toppling puzzles To strengthen the genius in you on a boring friday and for some of you to ponder in the weekend. You are a programmer turned mad scientist, and decide to have a Party ONE MONTH from today. -> You have one thousand bottles of wine -> You suddenly discover that one of them is poisoned. -> The poison takes a LITTLE LESS THAN a month to take effect. -> You have a LOTS of lab mice at your disposal. -> What is the SMALLEST number of mice that must drink from the bottles to find the poisoned one? Hint, hint: It’s a hint :) So What could be a GOOD RESPONSE for this a Give the right answers in a legit form of the English language b Give wrong answers that sound better than any stupid right answer by the way, one of the movie i saw recently OFFICESPACE was one of the best i saw in the decade. if not already GO AND CHECK IT OUT this weekend --- My first article^

                            D Offline
                            D Offline
                            devang_bison
                            wrote on last edited by
                            #19

                            Lets have scientific answer of this.. Let me see...P(X)=probability of event X A=1 out of 1000 bottles is poissioned.. Hence P(A)=1/1000 B=mouse like to drink wine(50/50 chance) hence P(B)=1/2 A^B = event A and B occurs at the same time hence P(A^B)=P(A)P(B)(:laugh:Since A and B event are independent from each other) P(A^B)=1/2000 so chances of A, B occuring at same time is 1 out of 2000 so inorder to have atleast one mouse to drink from that poisioned bottle we have to have 2000 mice at our disposal.;P What you think is what you get

                            S R 2 Replies Last reply
                            0
                            • S Srikanth N Remani

                              The answer is 10 1. The best way of identifying the wine bottle is to number each wine bottle from 1 to 1000 2. use the mice as binary bits. i.e. since 2 power 10 is 1024 which is nearest number to 1000 we can represent any number from 0 - 1000 using 10 mice. 3. Arrange the mice in the following order, (10) (9) (8) (7) (6) (5) (4) (3) (2) (1) The bottle number say 33 is fed to (5) and (1) since 10001 represents 33 in binary, again 66 will be fed to (6) and (2) since 100010 represents 66 in binary. So, by feeding 10 mice. I can identify which bottle is poisonous. Cheers.

                              S Offline
                              S Offline
                              Saurabh Garg
                              wrote on last edited by
                              #20

                              So you are gonna feed wine from all 1000 bottles to each mice. I bet all of them are gonna die due to alcohol poisoining :rolleyes: -Saurabh

                              1 Reply Last reply
                              0
                              • D devang_bison

                                Lets have scientific answer of this.. Let me see...P(X)=probability of event X A=1 out of 1000 bottles is poissioned.. Hence P(A)=1/1000 B=mouse like to drink wine(50/50 chance) hence P(B)=1/2 A^B = event A and B occurs at the same time hence P(A^B)=P(A)P(B)(:laugh:Since A and B event are independent from each other) P(A^B)=1/2000 so chances of A, B occuring at same time is 1 out of 2000 so inorder to have atleast one mouse to drink from that poisioned bottle we have to have 2000 mice at our disposal.;P What you think is what you get

                                S Offline
                                S Offline
                                Steve Mayfield
                                wrote on last edited by
                                #21

                                no...since there are only 1000 bottles, brute force says you only need 1000 mice. The one who drunk from the poison bottle would die... Steve

                                1 Reply Last reply
                                0
                                • S Srikanth N Remani

                                  The answer is 10 1. The best way of identifying the wine bottle is to number each wine bottle from 1 to 1000 2. use the mice as binary bits. i.e. since 2 power 10 is 1024 which is nearest number to 1000 we can represent any number from 0 - 1000 using 10 mice. 3. Arrange the mice in the following order, (10) (9) (8) (7) (6) (5) (4) (3) (2) (1) The bottle number say 33 is fed to (5) and (1) since 10001 represents 33 in binary, again 66 will be fed to (6) and (2) since 100010 represents 66 in binary. So, by feeding 10 mice. I can identify which bottle is poisonous. Cheers.

                                  S Offline
                                  S Offline
                                  Steve Mayfield
                                  wrote on last edited by
                                  #22

                                  hopefully the mice are resistant to alcohol poisoning since each mouse would be fed between 488 and 500 samples Steve

                                  1 Reply Last reply
                                  0
                                  • M Mike_V

                                    9 10. Explanation below. Number them 0-9. Number the bottles 0-999, in binary. Each bottle then corresponds to a certain combination of mice (each 1 bit on the bottle). Feed each bottle to the appropriate mice. (Ex. bottle 10 (1010) is fed to mouse 3 and mouse 1). After a month the mice who die tell you the number of the bottle. ;) -- modified at 11:35 Saturday 18th March, 2006. Thanks to Steve, see below. :-O

                                    S Offline
                                    S Offline
                                    Steve Mayfield
                                    wrote on last edited by
                                    #23

                                    you would need 10...number the bottles from 0 to 999 and feed each mouse with samples that meet the following criteria.. Mouse Boolean Condition 1 bottle AND 1 is TRUE 2 bottle AND 2 is TRUE 3 bottle AND 4 is TRUE 4 bottle AND 8 is TRUE 5 bottle AND 16 is TRUE 6 bottle AND 32 is TRUE 7 bottle AND 64 is TRUE 8 bottle AND 128 is TRUE 9 bottle AND 256 is TRUE 10 bottle AND 512 is TRUE Steve

                                    M 1 Reply Last reply
                                    0
                                    • S Steve Mayfield

                                      you would need 10...number the bottles from 0 to 999 and feed each mouse with samples that meet the following criteria.. Mouse Boolean Condition 1 bottle AND 1 is TRUE 2 bottle AND 2 is TRUE 3 bottle AND 4 is TRUE 4 bottle AND 8 is TRUE 5 bottle AND 16 is TRUE 6 bottle AND 32 is TRUE 7 bottle AND 64 is TRUE 8 bottle AND 128 is TRUE 9 bottle AND 256 is TRUE 10 bottle AND 512 is TRUE Steve

                                      M Offline
                                      M Offline
                                      Mike_V
                                      wrote on last edited by
                                      #24

                                      Doh! :doh: My reasoning was that 1 byte (8 bits) can store 256 possible values, therefore one additional bit would be the 512-bit. Moral: Always think before posting. Mike

                                      1 Reply Last reply
                                      0
                                      • R Raj Lal

                                        Ok i am back, with some more mind toppling puzzles To strengthen the genius in you on a boring friday and for some of you to ponder in the weekend. You are a programmer turned mad scientist, and decide to have a Party ONE MONTH from today. -> You have one thousand bottles of wine -> You suddenly discover that one of them is poisoned. -> The poison takes a LITTLE LESS THAN a month to take effect. -> You have a LOTS of lab mice at your disposal. -> What is the SMALLEST number of mice that must drink from the bottles to find the poisoned one? Hint, hint: It’s a hint :) So What could be a GOOD RESPONSE for this a Give the right answers in a legit form of the English language b Give wrong answers that sound better than any stupid right answer by the way, one of the movie i saw recently OFFICESPACE was one of the best i saw in the decade. if not already GO AND CHECK IT OUT this weekend --- My first article^

                                        A Offline
                                        A Offline
                                        Ashley van Gerven
                                        wrote on last edited by
                                        #25

                                        REAL programmers drink beer :D But my guess would be 999 (but I have a feeling the actual answer is not mathematical but logical - so i'm probably wrong :()

                                        "... This man is obviously a psychotic." "We-he-ell, uh, I'd like to hold off judgement on a thing like that, sir, until all the facts are in." (Dr. Strangelove or: How I Learned to Stop Worrying and Love the Bomb)

                                        ~ ScrollingGrid (cross-browser freeze-header control)

                                        A 1 Reply Last reply
                                        0
                                        • A Ashley van Gerven

                                          REAL programmers drink beer :D But my guess would be 999 (but I have a feeling the actual answer is not mathematical but logical - so i'm probably wrong :()

                                          "... This man is obviously a psychotic." "We-he-ell, uh, I'd like to hold off judgement on a thing like that, sir, until all the facts are in." (Dr. Strangelove or: How I Learned to Stop Worrying and Love the Bomb)

                                          ~ ScrollingGrid (cross-browser freeze-header control)

                                          A Offline
                                          A Offline
                                          Anton Afanasyev
                                          wrote on last edited by
                                          #26

                                          welp, IMO you need at LEAST one mouse. If you get lucky, it dies (ironic, eh?). But yeah. Thats the right answer i think...or at least it is in most problems of this kind :p rara avis in terris

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups