Asymptotic Analysis

  1. Merge Sort

    • Divide & Conquer
    • 意義

      N/2,要除幾次才會得到1

  2. Insertion Sort/Selection Sort/Bubble Sort

    • Time complexity:
  3. Worst Case Analysis
    • easy to find, more general.
  4. Constant factors depends on architectures, compilers, programming implementations or even compiler optimizations. No need to precise the constants.
  5. We identify Fast Algorithms as “worst-case running time grows slowly with input size”.
    • Suppress for two:
      • constant factors, too system-dependent.
      • lower order terms, irrelevant for large inputs.
  6. Linear Time is some of the cases the best scenario.
  7. Big-Oh (, Upper Bound)
    • If there exist constants , , such that , for all
  8. Big Omega (, Lower Bound)
  9. Big Theta (, sandwitch)
  10. Little-Oh notation:
    • Strictly, no equal
    • , For all , there exists some , such that for all .

results matching ""

    No results matching ""