Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Big O notation
(section)
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!
=== Use in computer science === {{Further|Analysis of algorithms}} Informally, especially in computer science, the big ''O'' notation often can be used somewhat differently to describe an asymptotic [[Upper and lower bounds#Tight bounds|tight]] bound where using big Theta Ξ notation might be more factually appropriate in a given context.<ref>{{harvtxt|Cormen|Leiserson|Rivest|Stein|2009}}, p. 64: "Many people continue to use the ''O''-notation where the Ξ-notation is more technically precise."</ref> For example, when considering a function ''T''(''n'') = 73''n''<sup>3</sup> + 22''n''<sup>2</sup> + 58, all of the following are generally acceptable, but tighter bounds (such as numbers 2 and 3 below) are usually strongly preferred over looser bounds (such as number 1 below). #{{nowrap|1=''T''(''n'') = ''O''(''n''<sup>100</sup>)}} #{{nowrap|1=''T''(''n'') = ''O''(''n''<sup>3</sup>)}} #{{nowrap|1=''T''(''n'') = Ξ(''n''<sup>3</sup>)}} The equivalent English statements are respectively: #''T''(''n'') grows asymptotically no faster than ''n''<sup>100</sup> #''T''(''n'') grows asymptotically no faster than ''n''<sup>3</sup> #''T''(''n'') grows asymptotically as fast as ''n''<sup>3</sup>. So while all three statements are true, progressively more information is contained in each. In some fields, however, the big O notation (number 2 in the lists above) would be used more commonly than the big Theta notation (items numbered 3 in the lists above). For example, if ''T''(''n'') represents the running time of a newly developed algorithm for input size ''n'', the inventors and users of the algorithm might be more inclined to put an upper asymptotic bound on how long it will take to run without making an explicit statement about the lower asymptotic bound.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)