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. Mathematicians - Treat for the weekend / might drive you crazy

Mathematicians - Treat for the weekend / might drive you crazy

Scheduled Pinned Locked Moved The Lounge
game-devhelpquestion
40 Posts 8 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.
  • R Raj Lal

    (Actually, This is an old problem but just to stop smartsy CPians from using the word "nanosecond" forever let's blast them with it! ). There are 2 integers a and b (Though programmers like i and j more as integers) And two CPian A and B. (The result will decide who are they) Rules of the game ------------------------------- I. 2 <= a,b <= 100 II. A is told the product of a and b III. B is told the sum of a and b. IV. Neither is told the values The cPians conversation ::: ------------------------------- 1=> B: I cannot determine a, b. 2=> A: I cannot determine a, b 3=> B: I already knew that. 4=> A: In that case, I now know them 5=> B: In that case, I too now know a, b. What are the numbers ??? ------------------------------- Is'nt it simple and beautiful ? I can hear you saying " huh! " cheers. "Not everything that counts can be counted..." -Albert Einstein

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

    where r u guys ! "Not everything that counts can be counted..." -Albert Einstein

    R 1 Reply Last reply
    0
    • R Raj Lal

      (Actually, This is an old problem but just to stop smartsy CPians from using the word "nanosecond" forever let's blast them with it! ). There are 2 integers a and b (Though programmers like i and j more as integers) And two CPian A and B. (The result will decide who are they) Rules of the game ------------------------------- I. 2 <= a,b <= 100 II. A is told the product of a and b III. B is told the sum of a and b. IV. Neither is told the values The cPians conversation ::: ------------------------------- 1=> B: I cannot determine a, b. 2=> A: I cannot determine a, b 3=> B: I already knew that. 4=> A: In that case, I now know them 5=> B: In that case, I too now know a, b. What are the numbers ??? ------------------------------- Is'nt it simple and beautiful ? I can hear you saying " huh! " cheers. "Not everything that counts can be counted..." -Albert Einstein

      D Offline
      D Offline
      David Stone
      wrote on last edited by
      #3

      Quartz... wrote:

      2 <= a,b <= 100

      Do you mean 2 <= a <= 100 and 2 <= b <= 100 or 2 <= a and b <= 100 ?


      Picture a huge catholic cathedral. In it there's many people, including a gregorian monk choir. You know, those who sing beautifully. Then they start singing, in latin, as they always do: "Ad hominem..." -Jörgen Sigvardsson

      R 2 Replies Last reply
      0
      • R Raj Lal

        where r u guys ! "Not everything that counts can be counted..." -Albert Einstein

        R Offline
        R Offline
        Rui A Rebelo
        wrote on last edited by
        #4

        Quartz... wrote:

        where r u guys !

        Thinking! Obsessivelly!:mad: "Thanks" for wrecking my weekend!:mad: X| Rui A. Rebelo I don't smoke, don't gamble, don't sniff, don't drink and don't womanize. My only defect is that I lie just a little bit, sometimes. Tim Maia (brazilian pop singer)

        R 1 Reply Last reply
        0
        • R Raj Lal

          (Actually, This is an old problem but just to stop smartsy CPians from using the word "nanosecond" forever let's blast them with it! ). There are 2 integers a and b (Though programmers like i and j more as integers) And two CPian A and B. (The result will decide who are they) Rules of the game ------------------------------- I. 2 <= a,b <= 100 II. A is told the product of a and b III. B is told the sum of a and b. IV. Neither is told the values The cPians conversation ::: ------------------------------- 1=> B: I cannot determine a, b. 2=> A: I cannot determine a, b 3=> B: I already knew that. 4=> A: In that case, I now know them 5=> B: In that case, I too now know a, b. What are the numbers ??? ------------------------------- Is'nt it simple and beautiful ? I can hear you saying " huh! " cheers. "Not everything that counts can be counted..." -Albert Einstein

          R Offline
          R Offline
          Rui A Rebelo
          wrote on last edited by
          #5

          The numbers are 3 and 4. Explanation: B is told the sum: 7. He knows that only 2 different pairs of numbers greater than 2 can give a sum of 7 : 3+4 and 2+5. Therefore:

          Quartz... wrote:

          1=> B: I cannot determine a, b.

          A is told the product: 12. He knows that there are just 2 different pairs of numbers greater than 2 which give this result: 2*6 and 3*4. So:

          Quartz... wrote:

          2=> A: I cannot determine a, b

          Now, B knows 2 things. He knows A's ambiguity if the numbers are 3 and 4. And he knows that if they were 2 and 5 (as B considered) then A wouldn't have an ambiguity; these 2 numbers would generate a unique product of 10. Facing A's ambiguity:

          Quartz... wrote:

          3=> B: I already knew that.

          A perceives that B solved it's own ambiguity and the only possibility of this happening is that the numbers are 3 and 4. If they were 2 and 6 as he considered the sum would be 8, wich would give 3 diferent possibilities to B (4+4, 2+6, 3+5). So:

          Quartz... wrote:

          4=> A: In that case, I now know them

          And B already knew the answer. Makes sense? Did I preserve my sanity? Rui A. Rebelo I don't smoke, don't gamble, don't sniff, don't drink and don't womanize. My only defect is that I lie just a little bit, sometimes. Tim Maia (brazilian pop singer)

          R 2 Replies Last reply
          0
          • D David Stone

            Quartz... wrote:

            2 <= a,b <= 100

            Do you mean 2 <= a <= 100 and 2 <= b <= 100 or 2 <= a and b <= 100 ?


            Picture a huge catholic cathedral. In it there's many people, including a gregorian monk choir. You know, those who sing beautifully. Then they start singing, in latin, as they always do: "Ad hominem..." -Jörgen Sigvardsson

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

            The First one 2 <= a <= 100 and 2 <= b <= 100 "Not everything that counts can be counted..." -Albert Einstein

            1 Reply Last reply
            0
            • R Rui A Rebelo

              The numbers are 3 and 4. Explanation: B is told the sum: 7. He knows that only 2 different pairs of numbers greater than 2 can give a sum of 7 : 3+4 and 2+5. Therefore:

              Quartz... wrote:

              1=> B: I cannot determine a, b.

              A is told the product: 12. He knows that there are just 2 different pairs of numbers greater than 2 which give this result: 2*6 and 3*4. So:

              Quartz... wrote:

              2=> A: I cannot determine a, b

              Now, B knows 2 things. He knows A's ambiguity if the numbers are 3 and 4. And he knows that if they were 2 and 5 (as B considered) then A wouldn't have an ambiguity; these 2 numbers would generate a unique product of 10. Facing A's ambiguity:

              Quartz... wrote:

              3=> B: I already knew that.

              A perceives that B solved it's own ambiguity and the only possibility of this happening is that the numbers are 3 and 4. If they were 2 and 6 as he considered the sum would be 8, wich would give 3 diferent possibilities to B (4+4, 2+6, 3+5). So:

              Quartz... wrote:

              4=> A: In that case, I now know them

              And B already knew the answer. Makes sense? Did I preserve my sanity? Rui A. Rebelo I don't smoke, don't gamble, don't sniff, don't drink and don't womanize. My only defect is that I lie just a little bit, sometimes. Tim Maia (brazilian pop singer)

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

              There is a flaw in it ...... ;P i leave it to you to rect... "Not everything that counts can be counted..." -Albert Einstein

              1 Reply Last reply
              0
              • R Raj Lal

                (Actually, This is an old problem but just to stop smartsy CPians from using the word "nanosecond" forever let's blast them with it! ). There are 2 integers a and b (Though programmers like i and j more as integers) And two CPian A and B. (The result will decide who are they) Rules of the game ------------------------------- I. 2 <= a,b <= 100 II. A is told the product of a and b III. B is told the sum of a and b. IV. Neither is told the values The cPians conversation ::: ------------------------------- 1=> B: I cannot determine a, b. 2=> A: I cannot determine a, b 3=> B: I already knew that. 4=> A: In that case, I now know them 5=> B: In that case, I too now know a, b. What are the numbers ??? ------------------------------- Is'nt it simple and beautiful ? I can hear you saying " huh! " cheers. "Not everything that counts can be counted..." -Albert Einstein

                C Offline
                C Offline
                ColinDavies
                wrote on last edited by
                #8

                6 and 7 The answer to everything. :-) Regardz Colin J Davies The most LinkedIn CPian (that I know of anyhow) :-)

                R 1 Reply Last reply
                0
                • C ColinDavies

                  6 and 7 The answer to everything. :-) Regardz Colin J Davies The most LinkedIn CPian (that I know of anyhow) :-)

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

                  The answer to everything but this one :) No explanation ??? The solution is so simple that it will explain everything and everything fits into the picture perfectly like a jigsaw puzzle "Not everything that counts can be counted..." -Albert Einstein

                  C 1 Reply Last reply
                  0
                  • R Raj Lal

                    The answer to everything but this one :) No explanation ??? The solution is so simple that it will explain everything and everything fits into the picture perfectly like a jigsaw puzzle "Not everything that counts can be counted..." -Albert Einstein

                    C Offline
                    C Offline
                    ColinDavies
                    wrote on last edited by
                    #10

                    explanations are for sissys Regardz Colin J Davies The most LinkedIn CPian (that I know of anyhow) :-)

                    R 1 Reply Last reply
                    0
                    • R Raj Lal

                      (Actually, This is an old problem but just to stop smartsy CPians from using the word "nanosecond" forever let's blast them with it! ). There are 2 integers a and b (Though programmers like i and j more as integers) And two CPian A and B. (The result will decide who are they) Rules of the game ------------------------------- I. 2 <= a,b <= 100 II. A is told the product of a and b III. B is told the sum of a and b. IV. Neither is told the values The cPians conversation ::: ------------------------------- 1=> B: I cannot determine a, b. 2=> A: I cannot determine a, b 3=> B: I already knew that. 4=> A: In that case, I now know them 5=> B: In that case, I too now know a, b. What are the numbers ??? ------------------------------- Is'nt it simple and beautiful ? I can hear you saying " huh! " cheers. "Not everything that counts can be counted..." -Albert Einstein

                      C Offline
                      C Offline
                      ColinDavies
                      wrote on last edited by
                      #11

                      Interpreting your qu differently gives 4, 13. I think this used to be called "the impossible problem" Regardz Colin J Davies The most LinkedIn CPian (that I know of anyhow) :-)

                      R 1 Reply Last reply
                      0
                      • C ColinDavies

                        explanations are for sissys Regardz Colin J Davies The most LinkedIn CPian (that I know of anyhow) :-)

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

                        Guessing two numbers between 2 and 100, gives a probability of 0.02020202020202020202020202020201 chances of getting it correct so it is not. As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality.-Albert Einstein

                        C 1 Reply Last reply
                        0
                        • R Raj Lal

                          Guessing two numbers between 2 and 100, gives a probability of 0.02020202020202020202020202020201 chances of getting it correct so it is not. As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality.-Albert Einstein

                          C Offline
                          C Offline
                          ColinDavies
                          wrote on last edited by
                          #13

                          I believe its abit less than that. Regardz Colin J Davies The most LinkedIn CPian (that I know of anyhow) :-)

                          P 1 Reply Last reply
                          0
                          • R Raj Lal

                            (Actually, This is an old problem but just to stop smartsy CPians from using the word "nanosecond" forever let's blast them with it! ). There are 2 integers a and b (Though programmers like i and j more as integers) And two CPian A and B. (The result will decide who are they) Rules of the game ------------------------------- I. 2 <= a,b <= 100 II. A is told the product of a and b III. B is told the sum of a and b. IV. Neither is told the values The cPians conversation ::: ------------------------------- 1=> B: I cannot determine a, b. 2=> A: I cannot determine a, b 3=> B: I already knew that. 4=> A: In that case, I now know them 5=> B: In that case, I too now know a, b. What are the numbers ??? ------------------------------- Is'nt it simple and beautiful ? I can hear you saying " huh! " cheers. "Not everything that counts can be counted..." -Albert Einstein

                            G Offline
                            G Offline
                            Gary R Wheeler
                            wrote on last edited by
                            #14

                            OK, your post has been up for several hours now. How about posting your solution? Personally, I think the problem is indeterminate, at least without additional constraints.


                            Software Zen: delete this;

                            R 2 Replies Last reply
                            0
                            • R Raj Lal

                              (Actually, This is an old problem but just to stop smartsy CPians from using the word "nanosecond" forever let's blast them with it! ). There are 2 integers a and b (Though programmers like i and j more as integers) And two CPian A and B. (The result will decide who are they) Rules of the game ------------------------------- I. 2 <= a,b <= 100 II. A is told the product of a and b III. B is told the sum of a and b. IV. Neither is told the values The cPians conversation ::: ------------------------------- 1=> B: I cannot determine a, b. 2=> A: I cannot determine a, b 3=> B: I already knew that. 4=> A: In that case, I now know them 5=> B: In that case, I too now know a, b. What are the numbers ??? ------------------------------- Is'nt it simple and beautiful ? I can hear you saying " huh! " cheers. "Not everything that counts can be counted..." -Albert Einstein

                              L Offline
                              L Offline
                              leppie
                              wrote on last edited by
                              #15

                              2 & 3 or vica versa My reasoning the lowest 2 numbers that are not 2 & 2. 1. B: (a x b) = 6 2. A: (a + b) = 5 3. B: a != b and a < 4 and b < 4 4. A: Can only be 2 & 3 5: B: Can only be 2 & 3 :confused: Probably very incorrect... :p [update] Similar to Rui A. Rebelo's solution [update] xacc.ide-0.1-rc3 released! Download and screenshots -- modified at 12:23 Saturday 12th November, 2005

                              R 2 Replies Last reply
                              0
                              • C ColinDavies

                                I believe its abit less than that. Regardz Colin J Davies The most LinkedIn CPian (that I know of anyhow) :-)

                                P Offline
                                P Offline
                                p daddy
                                wrote on last edited by
                                #16

                                I liked the 6 and 7 answer - it is indeed the answer to everything.... Paul

                                1 Reply Last reply
                                0
                                • R Raj Lal

                                  (Actually, This is an old problem but just to stop smartsy CPians from using the word "nanosecond" forever let's blast them with it! ). There are 2 integers a and b (Though programmers like i and j more as integers) And two CPian A and B. (The result will decide who are they) Rules of the game ------------------------------- I. 2 <= a,b <= 100 II. A is told the product of a and b III. B is told the sum of a and b. IV. Neither is told the values The cPians conversation ::: ------------------------------- 1=> B: I cannot determine a, b. 2=> A: I cannot determine a, b 3=> B: I already knew that. 4=> A: In that case, I now know them 5=> B: In that case, I too now know a, b. What are the numbers ??? ------------------------------- Is'nt it simple and beautiful ? I can hear you saying " huh! " cheers. "Not everything that counts can be counted..." -Albert Einstein

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

                                  For those who are still trying for the solution here is a clue to drive you more crazy 3=> B: I already knew that. i will post the solution by tonight "Not everything that counts can be counted..." -Albert Einstein

                                  L 1 Reply Last reply
                                  0
                                  • L leppie

                                    2 & 3 or vica versa My reasoning the lowest 2 numbers that are not 2 & 2. 1. B: (a x b) = 6 2. A: (a + b) = 5 3. B: a != b and a < 4 and b < 4 4. A: Can only be 2 & 3 5: B: Can only be 2 & 3 :confused: Probably very incorrect... :p [update] Similar to Rui A. Rebelo's solution [update] xacc.ide-0.1-rc3 released! Download and screenshots -- modified at 12:23 Saturday 12th November, 2005

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

                                    Check the clue below that can filter the range of numbers its better to try the other way (backward :) ) "Not everything that counts can be counted..." -Albert Einstein

                                    1 Reply Last reply
                                    0
                                    • G Gary R Wheeler

                                      OK, your post has been up for several hours now. How about posting your solution? Personally, I think the problem is indeterminate, at least without additional constraints.


                                      Software Zen: delete this;

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

                                      Check the clue below that can filter the range of numbers its better to try the other way (backward :) ) I don't like to keep you waiting but some people are still trying. I will post the solution tonight. May be before that you might hit the light bulb moment :) "Not everything that counts can be counted..." -Albert Einstein

                                      1 Reply Last reply
                                      0
                                      • R Raj Lal

                                        For those who are still trying for the solution here is a clue to drive you more crazy 3=> B: I already knew that. i will post the solution by tonight "Not everything that counts can be counted..." -Albert Einstein

                                        L Offline
                                        L Offline
                                        leppie
                                        wrote on last edited by
                                        #20

                                        Is A and B necesary CPians? Or can they be other kinds of people too? If the former, my original hunch was perhaps the user id of 2 specific users under 10000 that can be broken down to the requirements... (long shot :) ) xacc.ide-0.1-rc3 released! Download and screenshots

                                        R 2 Replies Last reply
                                        0
                                        • L leppie

                                          Is A and B necesary CPians? Or can they be other kinds of people too? If the former, my original hunch was perhaps the user id of 2 specific users under 10000 that can be broken down to the requirements... (long shot :) ) xacc.ide-0.1-rc3 released! Download and screenshots

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

                                          looooong shot... No, i added it just to make it look more homely :-D "Not everything that counts can be counted..." -Albert Einstein

                                          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