Test 1 Review for CMPS 2200, Fall 2012

Relevant Material:

  1. Analyzing Algorithms
  2. Asymptotic Notation (О, Ω, Θ, ο)
  3. Recursion:
  4. Recursion Tree: Find a guess what a (runtime) recurrence could solve to using Recursion Tree method
  5. Solving Recurrences: Solve a runtime recurrence (i.e., find and asymptotic bound for a recursively given T(n)):
  6. Probability, Random Variables and Expected Values
  7. Randomized Algorithms
  8. Quicksort
    • Runtime:
      • Best case: O(n log n) [When each pivot partitions the array into two roughly equal pieces]
      • Worst case: O(n^2) [When the array is already sorted either increasing or decresing order]
      • Average Case: O(n log n)
  9. Sorting
    • Counting Sort:
      • Runtime: O(n+k)
    • Decision Trees:
      • For a given (sorting or searching) algorithm
      • Lower bound for comparison sorting (or searching) algorithms.
  10. Order Statistics
    • Select Algorithm: to select the i-th smallest element
      • Randomized Select: Runtime
        • Worst Case: O(n^2)
        • Average Case/Expected Runtime: O(n)
      • [Deterministic Select: Runtime O(n)]

Practice Problems from the Book: