CSC 421: Algorithm Design & Analysis
Spring 2014

Course Overview


Object-oriented programming review
  design goals: highly cohesive, loosely coupled
  OO concepts: class vs. object, interfaces, inheritance, polymorphism
  data structures: List, Set, Map, Stack, Queue, Graph, ...
  algorithm analysis: big-Oh, rate-of-growth, analyzing algorithms, recursion
  
Algorithmic design
  brute force algorithms
    straightforward, one-time approach
    examples: league standings, circle of friends (HW1)
    exhaustive search: string matching
    generate-and-test: N-queens, Traveling Salesman, Knapsack
  decrease-and-conquer
    reduce problem to single, smaller instance
    by-constant: sequential search, insertion sort, topological sort
    by-constant-factor: binary search, fake coin problem
    by-variable-amount: BST search, selection problem, dishonest hangman (HW2)
  divide-and-conquer algorithms
    reduce problem to multiple smaller instances
    examples: merge sort, quick sort, closest points, multiplication
    trees: size, contains, toString, ... (HW3)
    Master Theorem
  transform-and-conquer: 
    transform problem into a different, more easily solved problem
    examples: presorting, balanced BST algorithms, Horner's Rule
    problem reduction: lcm --> gcd  
  greedy 
    solve by making a sequence of choices/actions, select locally optimal
    examples: minimal change, job scheduling
    minimal spanning tree: Prim's algorithm
    shortest path: modified BFS,  Dijkstra's algorithm
    data compression: Huffman codes
  backtracking
    solve by making a sequence of choices/actions, back up and retry if fail
    examples: N-queens, blob count, Boggle, KenKen (HW4)
    branch-and-bound: job assignment
    game search: game trees, minimax search, alpha-beta pruning
  dynamic: 
    bottom-up alternative to divide-and-conquer, avoids redundancy
    examples: binomial coefficient, World Series puzzle, game probabilities (HW5)
    all-pairs shortest path: Floyd's algorithm
    top-down with caching: change maker
    
Algorithm analysis
  recursion
    analysis via recurrence relation, Master Theorem
  space vs. time tradeoffs
    examples: heap sort, hash tables, BinaryTree
    string matching: Horspool's algorithm, Boyer-Moore algorithm
  complexity theory
    lower bounds on problems
      brute force, info-theoretic, adversary argument, reduction
      decision trees: searching, sorting
    tractable vs. intractable vs. undecidable (Halting Problem)
    P vs. NP, Turing machine vs. non-deterministic Turing machine
    NP-complete problems (e.g., SAT), reductions (e.g., SAT --> CLIQUE)