• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Big O notation.

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    Big O notation.

    Does anyone know anything about this?

    I'm really struggling to learn it - I dont know if it's cause I dont have a maths background or what...but it's making my eyes bleed.

    All I've got to do is use it to classify addition....and I just can't get my head round it at all!!!!

    The pope is a tard.

    #2
    Originally posted by SallyAnne View Post
    Does anyone know anything about this?

    I'm really struggling to learn it - I dont know if it's cause I dont have a maths background or what...but it's making my eyes bleed.

    All I've got to do is use it to classify addition....and I just can't get my head round it at all!!!!

    Sod that. What did you end up doing over the weekend Sally ?



    (\__/)
    (>'.'<)
    ("")("") Born to Drink. Forced to Work

    Comment


      #3
      Originally posted by SallyAnne View Post
      Does anyone know anything about this?

      I'm really struggling to learn it - I dont know if it's cause I dont have a maths background or what...but it's making my eyes bleed.

      All I've got to do is use it to classify addition....and I just can't get my head round it at all!!!!

      I've seen much of the rest of the world. It is brutal and cruel and dark, Rome is the light.

      Comment


        #4
        I thought the thread was going to be something about orgasms
        Originally posted by cailin maith
        Hang on - there is actually a place called Cheddar??

        Comment


          #5
          Originally posted by FSM with Cheddar View Post
          I thought the thread was going to be something about orgasms
          Roy Orbison
          Knock first as I might be balancing my chakras.

          Comment


            #6
            Originally posted by Francko View Post
            Sorry - was that me trying to talk about something relating to computing again?

            What a nob I am - when will I learn?!!


            The pope is a tard.

            Comment


              #7
              In CS It's often used as a measure of how long a function will takes to compute. The stuff inside the O representing the highest (most significant) order term in an equation that describes how long a function would take to run given a size of input n. In some case a function would run in constant time irrespective of the size of n and other cases would become much slower to run as the size of n increases. You often need to know.

              E.g. Some examples from quickest to slowest:
              Constant time: O(1)
              Searching an already sorted list: O(n log n)
              Linear time (e.g. searching an unordered list): O(n)
              Quadratic time (some slow sorts) : O(n^2)
              Exponential time: O(n!)
              etc

              Addition would be O(n) because the the problem only gets slower in direct proportion to the number of bits/bytes being added, and multiplication could be as high as O(n^2). The latter (quadratic time) not being too bad, at least compared to exponential functions, but not as fast as linear or constant time algorithms.

              Comment


                #8
                I think what you need Sal is all explained in "The story of O"
                I am not qualified to give the above advice!

                The original point and click interface by
                Smith and Wesson.

                Step back, have a think and adjust my own own attitude from time to time

                Comment


                  #9
                  Originally posted by SallyAnne View Post
                  Sorry - was that me trying to talk about something relating to computing again?

                  What a nob I am - when will I learn?!!


                  SA, what is this obsession with anything that is big?
                  I've seen much of the rest of the world. It is brutal and cruel and dark, Rome is the light.

                  Comment


                    #10
                    There's a Wikipedia article here.

                    Writing f(x) = O(log(x)) for example just means that for sufficiently large x, |f(x)| is less than C.log(x) for some constant C.

                    Likewise, if f(x) is a polynomial, say x^n + .. + x + 5 then f(x) = O(x^n), because for sufficiently large x the leading term (with the highest power) dominates all the others however large their coefficients, and this argument can easily be formalized:

                    |a_n.x^n + .. + a_1.x + a_0| <=

                    <= |a_n.x^n| + .. + |a_1.x| + |a_0|

                    <= |a.x^n| + .. + |a.x| + |a| where |a| = max(|a_i|)

                    = |a| . (|x^n| + .. + |x| + 1)

                    <= |a| . (|x^n| + .. + |x^n| + |x^n|)

                    = (n+1) . |a| . |x^n|

                    So the constant C can be taken as (n + 1).|a|
                    Work in the public sector? Read the IR35 FAQ here

                    Comment

                    Working...
                    X