Opposites Attract: Understanding O Notation in Math & CS

  • Thread starter Thread starter Max.Planck
  • Start date Start date
  • Tags Tags
    Cs Notation
AI Thread Summary
The discussion clarifies the use of the O notation in mathematics and computer science, highlighting that the limit approaches differ: mathematics uses limits as x approaches 0, while computer science uses limits as x approaches infinity. Despite seeming contradictory, both interpretations are valid within their contexts. The key is to specify the limit when using O notation, as this determines the outcome. This distinction resolves the confusion regarding the application of O notation in different fields. Understanding these nuances is essential for accurate mathematical and computational analysis.
Max.Planck
Messages
128
Reaction score
0
Hi, I noticed in mathematics the O symbol is used in the following way:

A term T is in O(x^p), if lim x->0 T/x^p=c, for a constant c.

While in computer science the O symbol is used is this way:

A term T is in O(x^p), if lim x->∞ T/x^p is a constant.

What gives, these two notations seem to be the complete opposite of each other?
 
Mathematics news on Phys.org
The O symbol is valid in both cases. It is up to you to define what the x limit is.
 
mathman said:
The O symbol is valid in both cases. It is up to you to define what the x limit is.

But don't they contradict each other?

For example, in the first case x^7 is in O(x^5), but in the second case it is not.
 
No, they are just two distinct cases of a general concept. We should aways say "f(x)= O(g(x)) as x-> a and specify a. They are using two different values of a and so getting two different results.
 
HallsofIvy said:
No, they are just two distinct cases of a general concept. We should aways say "f(x)= O(g(x)) as x-> a and specify a. They are using two different values of a and so getting two different results.

Aha, thanks!
 
Thread 'Video on imaginary numbers and some queries'
Hi, I was watching the following video. I found some points confusing. Could you please help me to understand the gaps? Thanks, in advance! Question 1: Around 4:22, the video says the following. So for those mathematicians, negative numbers didn't exist. You could subtract, that is find the difference between two positive quantities, but you couldn't have a negative answer or negative coefficients. Mathematicians were so averse to negative numbers that there was no single quadratic...
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Thread 'Unit Circle Double Angle Derivations'
Here I made a terrible mistake of assuming this to be an equilateral triangle and set 2sinx=1 => x=pi/6. Although this did derive the double angle formulas it also led into a terrible mess trying to find all the combinations of sides. I must have been tired and just assumed 6x=180 and 2sinx=1. By that time, I was so mindset that I nearly scolded a person for even saying 90-x. I wonder if this is a case of biased observation that seeks to dis credit me like Jesus of Nazareth since in reality...
Back
Top