Editing Asymptotic analysis

Jump to: navigation, search

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.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 227: Line 227:
 
* A cubic-time algorithm will suffice for <math>n</math> up to about 300.
 
* A cubic-time algorithm will suffice for <math>n</math> up to about 300.
 
* A quadratic-time algorithm will suffice for <math>n</math> up to about 5000.
 
* A quadratic-time algorithm will suffice for <math>n</math> up to about 5000.
* An <math>O(n \log n)</math> time algorithm will suffice for <math>n</math> up to about 200000. The number 100000 is a very common bound on input size in olympiad problems, and almost always suggests that a contestant should aim to invent an algorithm with time complexity of around <math>O(n \log n)</math>. (This aspect of olympiad contests has been criticized.)<ref>Ribiero, P. and Guerreiro, P. ''Improving the Automatic Evaluation of Problem Solutions in Programming Contests''. Olympiads in Informatics, 2009, Vol. 3, 132–143. Retrieved from http://www.mii.lt/olympiads_in_informatics/pdf/INFOL048.pdf</ref> <math>O(n^2)</math> is almost always too slow in this case.
+
* An <math>O(n \log n)</math> time algorithm will suffice for <math>n</math> up to about 200000. The number 100000 is a very common bound on input size in olympiad problems, and almost always suggests that a contestant should aim to invent an algorithm with time complexity of around <math>O(n \log n)</math>. (This aspect of olympiad contests has been criticized.) <math>O(n^2)</math> is almost always too slow in this case.
 
* A linear-time algorithm is typically required if the input can be even larger than this, usually 300000 or more lines.
 
* A linear-time algorithm is typically required if the input can be even larger than this, usually 300000 or more lines.
  
Line 308: Line 308:
 
===Amortized analysis===
 
===Amortized analysis===
 
TODO
 
TODO
 
==References==
 
<references/>
 
 
[[Category:Pages needing diagrams]]
 
[[Category:Pages needing diagrams]]
 
[[Category:Incomplete]]
 
[[Category:Incomplete]]

Please note that all contributions to PEGWiki are considered to be released under the Attribution 3.0 Unported (see PEGWiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, 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. Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)