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. General Programming
  3. Algorithms
  4. Puzzle Challenge Site

Puzzle Challenge Site

Scheduled Pinned Locked Moved Algorithms
helpquestionphpdatabasecom
14 Posts 3 Posters 4 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.
  • A Offline
    A Offline
    Are Jay
    wrote on last edited by
    #1

    Problem in question: You may solve this problem with or without programming, but it has been optimised for solution with a programming method. The Fibonacci sequence of numbers is defined as: F[0]=0 F[1]=1 and for all x>1, F[x]=F[x-1]+F[x-2] PLEASE do not post the answer. What is the smallest value of x>0 such that F[x]=0 mod 2^32 PLEASE do not post the answer. I never thought I'd revert to posting here to get help with this question from a Puzzel Challange Site[^]. The history behind it, I've been stuck on this for a year. Not a solid year but off and on. I've written a LongMath Class[^] to help me solve it but I still haven't found the the answer. I've read through the posts on the challange site and they're talk'n about, "If you understand the Fibonacci sequence you won't need a program to figure it out. I'm looking for help in solving the problem on my own. The site is older and not alot of visitors to the forums. I've applied my LonMath Class to a sandbox app to help solve it but I'm not sure if I'm performing F[x]=0 mod 2^32 correctly. Fibonacci Pilot[^]

    I'm listening but I only speak GEEK.

    P L 3 Replies Last reply
    0
    • A Are Jay

      Problem in question: You may solve this problem with or without programming, but it has been optimised for solution with a programming method. The Fibonacci sequence of numbers is defined as: F[0]=0 F[1]=1 and for all x>1, F[x]=F[x-1]+F[x-2] PLEASE do not post the answer. What is the smallest value of x>0 such that F[x]=0 mod 2^32 PLEASE do not post the answer. I never thought I'd revert to posting here to get help with this question from a Puzzel Challange Site[^]. The history behind it, I've been stuck on this for a year. Not a solid year but off and on. I've written a LongMath Class[^] to help me solve it but I still haven't found the the answer. I've read through the posts on the challange site and they're talk'n about, "If you understand the Fibonacci sequence you won't need a program to figure it out. I'm looking for help in solving the problem on my own. The site is older and not alot of visitors to the forums. I've applied my LonMath Class to a sandbox app to help solve it but I'm not sure if I'm performing F[x]=0 mod 2^32 correctly. Fibonacci Pilot[^]

      I'm listening but I only speak GEEK.

      P Offline
      P Offline
      PIEBALDconsult
      wrote on last edited by
      #2

      I'm intrigued, but I'm not about to log on to that site, is that the full text of the puzzle? I ask because it seems to me that 0 mod 2^32 equals 0; so, as stated, the puzzle has no solution.

      L 1 Reply Last reply
      0
      • P PIEBALDconsult

        I'm intrigued, but I'm not about to log on to that site, is that the full text of the puzzle? I ask because it seems to me that 0 mod 2^32 equals 0; so, as stated, the puzzle has no solution.

        L Offline
        L Offline
        Luc Pattyn
        wrote on last edited by
        #3

        Nono, in real life as well as in maths, numbers have no upper bound and no limit as to the number of bits; so there might well be non-zero Fibonnacci numbers that take a divisor of 2^32. In fact, I can assure you there are infinitely many solutions to this one, and the smallest of them can be calculated with a simple calculator ! The puzzle site is very challenging, and yes, most often the problem descriptions are short, and sometimes very ... puzzling. :)

        Luc Pattyn

        P 1 Reply Last reply
        0
        • A Are Jay

          Problem in question: You may solve this problem with or without programming, but it has been optimised for solution with a programming method. The Fibonacci sequence of numbers is defined as: F[0]=0 F[1]=1 and for all x>1, F[x]=F[x-1]+F[x-2] PLEASE do not post the answer. What is the smallest value of x>0 such that F[x]=0 mod 2^32 PLEASE do not post the answer. I never thought I'd revert to posting here to get help with this question from a Puzzel Challange Site[^]. The history behind it, I've been stuck on this for a year. Not a solid year but off and on. I've written a LongMath Class[^] to help me solve it but I still haven't found the the answer. I've read through the posts on the challange site and they're talk'n about, "If you understand the Fibonacci sequence you won't need a program to figure it out. I'm looking for help in solving the problem on my own. The site is older and not alot of visitors to the forums. I've applied my LonMath Class to a sandbox app to help solve it but I'm not sure if I'm performing F[x]=0 mod 2^32 correctly. Fibonacci Pilot[^]

          I'm listening but I only speak GEEK.

          L Offline
          L Offline
          Luc Pattyn
          wrote on last edited by
          #4

          Hi, there are several bulletin boards on the caesum site, there is one per level, and one per problem (only accessible once you solved it!). The fibber problem can be cracked easily by programming; there are tsraightforward ways, and even better ones. It can also be solved by hand using a simple calculator (hint: scan the Fibonacci sequence looking for a pattern in the powers of 2). :)

          Luc Pattyn

          A 1 Reply Last reply
          0
          • L Luc Pattyn

            Nono, in real life as well as in maths, numbers have no upper bound and no limit as to the number of bits; so there might well be non-zero Fibonnacci numbers that take a divisor of 2^32. In fact, I can assure you there are infinitely many solutions to this one, and the smallest of them can be calculated with a simple calculator ! The puzzle site is very challenging, and yes, most often the problem descriptions are short, and sometimes very ... puzzling. :)

            Luc Pattyn

            P Offline
            P Offline
            PIEBALDconsult
            wrote on last edited by
            #5

            Yes, but as stated, we're not dividing (or MODing) the xth Fibonnacci number by 2^32, but comparing it with 0 mod 2^32 which ought to be 0; isn't 0 mod anything (except 0) always 0? So the mod 2^32 is unnecessary. That simplifies the puzzle to F[x]=0, but that's only true when x=0, and the puzzle is to find a solution where x>0, that's why I see no solution. Certainly, if the puzzle stated

            mod 2^32 = 0
            , then I would understand it.

            L 1 Reply Last reply
            0
            • P PIEBALDconsult

              Yes, but as stated, we're not dividing (or MODing) the xth Fibonnacci number by 2^32, but comparing it with 0 mod 2^32 which ought to be 0; isn't 0 mod anything (except 0) always 0? So the mod 2^32 is unnecessary. That simplifies the puzzle to F[x]=0, but that's only true when x=0, and the puzzle is to find a solution where x>0, that's why I see no solution. Certainly, if the puzzle stated

              mod 2^32 = 0
              , then I would understand it.

              L Offline
              L Offline
              Luc Pattyn
              wrote on last edited by
              #6

              mathematician use a lot of different notations for modulo arithmetic. All of the following are equivalent: a ≡ b (mod M) a = b (mod M) a ≡ b mod M a = b mod M and they all actually mean: a % M = b % M so the modulo operator is often mentioned only once, and sometimes not at all (but just implied by text or context) Therefore the problem at hand is really asking for the first Fibonacci number that is a multiple of 2^32. Of course, a more programmer-friendly notation would have been: find x such that F(x) mod 2^32 = 0 instead of: F(x) = 0 mod 2^32 :)

              Luc Pattyn

              P A 2 Replies Last reply
              0
              • L Luc Pattyn

                mathematician use a lot of different notations for modulo arithmetic. All of the following are equivalent: a ≡ b (mod M) a = b (mod M) a ≡ b mod M a = b mod M and they all actually mean: a % M = b % M so the modulo operator is often mentioned only once, and sometimes not at all (but just implied by text or context) Therefore the problem at hand is really asking for the first Fibonacci number that is a multiple of 2^32. Of course, a more programmer-friendly notation would have been: find x such that F(x) mod 2^32 = 0 instead of: F(x) = 0 mod 2^32 :)

                Luc Pattyn

                P Offline
                P Offline
                PIEBALDconsult
                wrote on last edited by
                #7

                Aside: Well, if a = b mod M means a % M = b % M how would I express a = b % M ?

                L 1 Reply Last reply
                0
                • P PIEBALDconsult

                  Aside: Well, if a = b mod M means a % M = b % M how would I express a = b % M ?

                  L Offline
                  L Offline
                  Luc Pattyn
                  wrote on last edited by
                  #8

                  Program statements must be accurate and unambiguous; thats what compilers need, and programmers must provide. Mathematical equations must also be accurate and unambiguous. However math publications try to come up with the clearest and/or shortest notation, often at the expence of some ambiguity (which then should be resolved by adding a textual description of the local conventions, if necessary). It is important to recognize which is which. On most of the CP message boards, there is no doubt, it is code in one of the many standard programming languages. On the Maths and Algos board, some of it is math equations, and must be treated as such. ;)

                  Luc Pattyn

                  1 Reply Last reply
                  0
                  • L Luc Pattyn

                    mathematician use a lot of different notations for modulo arithmetic. All of the following are equivalent: a ≡ b (mod M) a = b (mod M) a ≡ b mod M a = b mod M and they all actually mean: a % M = b % M so the modulo operator is often mentioned only once, and sometimes not at all (but just implied by text or context) Therefore the problem at hand is really asking for the first Fibonacci number that is a multiple of 2^32. Of course, a more programmer-friendly notation would have been: find x such that F(x) mod 2^32 = 0 instead of: F(x) = 0 mod 2^32 :)

                    Luc Pattyn

                    A Offline
                    A Offline
                    Are Jay
                    wrote on last edited by
                    #9

                    Luc Pattyn wrote:

                    find x such that F(x) mod 2^32 = 0

                    Your correct that the author mentions that the above equation is another way to look at it. Thank you for the help in this puzzle. I've been reviewing the series for a pattern of numbers that follow a power of 2, but I'm not much of a mathematician.

                    I'm listening but I only speak GEEK.

                    P 1 Reply Last reply
                    0
                    • L Luc Pattyn

                      Hi, there are several bulletin boards on the caesum site, there is one per level, and one per problem (only accessible once you solved it!). The fibber problem can be cracked easily by programming; there are tsraightforward ways, and even better ones. It can also be solved by hand using a simple calculator (hint: scan the Fibonacci sequence looking for a pattern in the powers of 2). :)

                      Luc Pattyn

                      A Offline
                      A Offline
                      Are Jay
                      wrote on last edited by
                      #10

                      I've been running the squence and squaring each number looking for an noticable pattern but I'm not seeing anything. Most of the puzzles I've run into have an underlying reson for the puzzle. Would you know where else this information would be used? Why would I be looking at a pattern of squared numbers?

                      I'm listening but I only speak GEEK.

                      L 1 Reply Last reply
                      0
                      • A Are Jay

                        I've been running the squence and squaring each number looking for an noticable pattern but I'm not seeing anything. Most of the puzzles I've run into have an underlying reson for the puzzle. Would you know where else this information would be used? Why would I be looking at a pattern of squared numbers?

                        I'm listening but I only speak GEEK.

                        L Offline
                        L Offline
                        Luc Pattyn
                        wrote on last edited by
                        #11

                        Squaring ?? :confused: Just look at the Fib numbers in binary...

                        Luc Pattyn

                        A 1 Reply Last reply
                        0
                        • L Luc Pattyn

                          Squaring ?? :confused: Just look at the Fib numbers in binary...

                          Luc Pattyn

                          A Offline
                          A Offline
                          Are Jay
                          wrote on last edited by
                          #12

                          sorry just miss typed, was meaning, (power of 2) not squared.

                          I'm listening but I only speak GEEK.

                          1 Reply Last reply
                          0
                          • A Are Jay

                            Luc Pattyn wrote:

                            find x such that F(x) mod 2^32 = 0

                            Your correct that the author mentions that the above equation is another way to look at it. Thank you for the help in this puzzle. I've been reviewing the series for a pattern of numbers that follow a power of 2, but I'm not much of a mathematician.

                            I'm listening but I only speak GEEK.

                            P Offline
                            P Offline
                            PIEBALDconsult
                            wrote on last edited by
                            #13

                            That would be why I asked if you could post the full actual text of the puzzle.

                            1 Reply Last reply
                            0
                            • A Are Jay

                              Problem in question: You may solve this problem with or without programming, but it has been optimised for solution with a programming method. The Fibonacci sequence of numbers is defined as: F[0]=0 F[1]=1 and for all x>1, F[x]=F[x-1]+F[x-2] PLEASE do not post the answer. What is the smallest value of x>0 such that F[x]=0 mod 2^32 PLEASE do not post the answer. I never thought I'd revert to posting here to get help with this question from a Puzzel Challange Site[^]. The history behind it, I've been stuck on this for a year. Not a solid year but off and on. I've written a LongMath Class[^] to help me solve it but I still haven't found the the answer. I've read through the posts on the challange site and they're talk'n about, "If you understand the Fibonacci sequence you won't need a program to figure it out. I'm looking for help in solving the problem on my own. The site is older and not alot of visitors to the forums. I've applied my LonMath Class to a sandbox app to help solve it but I'm not sure if I'm performing F[x]=0 mod 2^32 correctly. Fibonacci Pilot[^]

                              I'm listening but I only speak GEEK.

                              P Offline
                              P Offline
                              PIEBALDconsult
                              wrote on last edited by
                              #14

                              Take a look at http://mathworld.wolfram.com/FibonacciNumber.html[^] Particularly the paragraph just below the big triangle.

                              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