Test 1 Review for CS 5633, Spring 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 Recurrence: 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) [Randomized runtime analysis will not be needed]
    • Sample Questions:
      • For a given Sequence of numbers what will be the runtime when Quicksort, Radixsort or Countingsort is used?
      • Show different steps (pivot, and the partitions) of sorting an array using Quicksort.
      • Deterministic Quicksort
  9. Sorting
    • Radix Sort:
      • Runtime: O(bn/log n)
    • Counting Sort:
      • Runtime: O(n+k)
    • Decision Trees:
      • For a given (sorting) algorithm
  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)