Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Big O notation
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Infinite asymptotics === {{Dark mode invert|image=yes|[[File:comparison computational complexity.svg|thumb|Graphs of functions commonly used in the analysis of algorithms, showing the number of operations <math>N </math> versus input size <math>n </math> for each function]]}} Big O notation is useful when [[analysis of algorithms|analyzing algorithms]] for efficiency. For example, the time (or the number of steps) it takes to complete a problem of size <math> n</math> might be found to be <math> T(n)=4n^2-2n+2 </math>. As <math> n</math> grows large, the <math> n^2</math> [[Summand|term]] will come to dominate, so that all other terms can be neglected—for instance when <math> n=500</math>, the term <math> 4n^2</math> is 1000 times as large as the <math> 2n</math> term. Ignoring the latter would have negligible effect on the expression's value for most purposes. Further, the [[coefficient]]s become irrelevant if we compare to any other [[Orders of approximation|order]] of expression, such as an expression containing a term <math> n^3</math> or <math> n^4</math>. Even if <math> T(n)=1000000n^2</math>, if <math> U(n)=n^3</math>, the latter will always exceed the former once {{mvar|n}} grows larger than <math> 1000000</math>, ''viz.'' <math display="block"> T(1000000)=1000000^3=U(1000000)</math>. Additionally, the number of steps depends on the details of the machine model on which the algorithm runs, but different types of machines typically vary by only a constant factor in the number of steps needed to execute an algorithm. So the big O notation captures what remains: we write either :<math>T(n)= O(n^2) </math> or :<math>T(n) \in O(n^2) </math> and say that the algorithm has ''order of {{math|n<sup>2</sup>}}'' time complexity. The sign "{{math|1==}}" is not meant to express "is equal to" in its normal mathematical sense, but rather a more colloquial "is", so the second expression is sometimes considered more accurate (see the "[[#Equals sign|Equals sign]]" discussion below) while the first is considered by some as an [[abuse of notation]].<ref name="clrs3" />
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Big O notation
(section)
Add topic