1 / 24

Complexity and Big-O Notation

Complexity and Big-O Notation. Example N! = # ways to put N objects in linear order. Generating all such orderings (permutations) on N objects takes at least N! time. Example Adding two n-bit integers at most 2n bit operations. Time estimate for two methods. Time complexity.

ananda
Download Presentation

Complexity and Big-O Notation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Complexity and Big-O Notation Example N! = # ways to put N objects in linear order. Generating all such orderings (permutations) on N objects takes at least N! time. Example Adding two n-bit integers at most 2n bit operations.

  2. Time estimate for two methods

  3. Time complexity

  4. Order of a function

  5. Definitions

  6. Example

  7. Example

  8. Theorem

  9. Proof

  10. Example

  11. Big-O is transitive

  12. Corollary

  13. Some common functions Decreasing order

  14. Example

  15. Example

  16. Example

  17. Example

  18. Select a theta notation

  19. Fibonacci sequence as the worst case for gcd

  20. Comparing a gcd computation with Fibonacci seq. 62=2.23+16 23=16+7 16=2.7+2 7=3.2+1 2=2.1+0 13=8+5 8=5+3 5=3+2 3=2+1 2=2.1+0

  21. Theorem

  22. Corollary

More Related