CS 218: Design and Analysis of Algorithms

Winter Quarter, 2006

News

  • Mar 16: "problems" slides posted.
  • Mar 15: Homework 5 solution posted.
  • Mar 10: Sample final (and solution) posted.
  • Mar 2: Homework 4 solution posted.
  • Mar 2: Homework 5 posted.
  • Feb 28: "Network flow" slides posted.
  • Feb 28: "Pattern matching" slides posted.
  • Feb 22: Homework 3 solution posted.
  • Feb 21: Homework 4 posted.
  • Feb 21: "Dynamic programming" slides updated.
  • Feb 17: Midterm and solution posted.
  • Feb 10: "Dynamic programming" slides posted.
  • Feb 8: Sample midterm (and solution) posted.
  • Feb 7: Homework 3 posted.
  • Feb 7: Homework 2 solution posted.
  • Feb 2: Homework 2 revised.
  • Feb 2: "Greedy" slides updated.
  • Jan 31: "Divide and conquer" slides posted.
  • Jan 27: "Greedy" slides updated.
  • Jan 26: due date of Hw2 postponed.
  • Jan 24: Homework 2 posted.
  • Jan 24: Homework 1 solution posted.
  • Jan 17: "Greedy algorithms" slides posted.
  • Jan 12: Homework 1 posted.
  • Jan 11: office hours today are cancelled.
  • Jan 9: "Algorithm analysis" slides posted.
  • Lecture Schedule  Email list   Resources   Tutorials   Animations

    Overview

    Catalog description: CS 218. Design and Analysis of Algorithms (4) Lecture, 3 hours; outside research, 3 hours. Prerequisite(s): CS 141. Study of efficient data structures and algorithms for solving problems from a variety of areas such as sorting, searching, selection, linear algebra, graph theory, and computational geometry. Worst-case and average-case analysis using recurrence relations, generating functions, upper and lower bounds, and other methods. UCR course schedule, UCR course catalog.

    Basic information

    Instructor: Stefano Lonardi (stelo AT cs.ucr.edu)
    Office hours: Wednesday 4-5:30pm. Office: Engineering 2, 317.

    Teaching Assistant:
  • Kan Liu (kanliu AT cs.ucr.edu)
    Office hours: Monday 10-11am (EBU II 110).

  • Lectures:
  • TR, 2:10pm-3:30pm Engineering 2, 139

  • Text Book:
  • Introduction to Algorithms (2nd Edition) by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Cliff Stein, MIT Press.

  • Prerequisites:
  • Graduate standing, undergraduate courses in algorithms and data structures.

  • Prerequisites by topic:
  • Discrete Math: asymptotic notation, basic summation formulas, sets (operations on sets, relations, functions), counting (permutations, sets, combinations, binomial coefficients), probability (independence, random variable, expected value)
  • Basic Data Structures: array, list, queue, stack, binary search trees, balanced binary search trees, heap
  • Sorting and Searching: quicksort, mergesort, heapsort, radix-sort, binary search
  • Graph algorithms: DFS, BFS, connected components, biconnected components, transitive closure
  • Digraph algorithms: DFS, BFS, strongly connected components, topological sorting
  • Lectures


    Tentative list of topics
  • Intro to Analysis: recurrence relations, master theorem, amortized analysis
  • Pattern matching: brute force, KMP, tries and suffix trees
  • Greedy: task scheduling, factional knapsack, Huffman codes, Dijkstra, Prim, Kruskal
  • Union-Find: list and tree implementation, union by rank and path compression, analysis
  • Divide and conquer: lineat-time selection, Strassen, FFT, Integer multiplication
  • Dynamic programming: Subset sum, LCS, matrix chain multiplication, Floyd-Warshall
  • Graph algorithms: Flow and matching
  • Numerical algorithms: primality testing, RSA
  • Data structures: binomial heaps and Fibonacci heaps, splay trees
  • Actual list of topics

  • Jan 10: Course overview, Analysis of Algorithms (slides 1-21)
  • Jan 12: Analysis of Algorithms (slides 22-45) [HW1 posted]
  • Jan 17: Analysis of Algorithms (slides 46-61)
  • Jan 19: Analysis of Algorithms (slides 62-end), Greedy+UnionFind (slides 1-30)
  • Jan 24: Greedy+UnionFind (slides 31-54) [HW1 due, HW2 posted]
  • Jan 26: Greedy+UnionFind (slides 55-82)
  • Jan 31: Greedy+UnionFind (slides 83-124)
  • Feb 2: Greedy+UnionFind (slides 125-end), DivideEtImpera (slide 1-8)
  • Feb 7: DivideEtImpera (slide 9-49) [HW2 due, HW3 posted]
  • Feb 9: DivideEtImpera (slide 50-end)
  • Feb 14: Midterm review
  • Feb 16: [Midterm (80mins, in class, closed book, closed notes)]
  • Feb 21: Dynamic Programming (slides 1-23)[HW3 due, HW4 posted]
  • Feb 23: Dynamic Programming (slides 24-40)
  • Feb 28: Dynamic Programming (slides 41-63)
  • Mar 2: Dynamic Programming (slides 64-end), Pattern Matching (slides 1-25)[HW4 due, HW5 posted]
  • Mar 7: Pattern Matching (26-end), Flow (1-13)
  • Mar 9: Flow (14-51, skipped 45-49)
  • Mar 14: Flow (51-end)[HW5 due]
  • Mar 16: Review
  • Mar 20: 11:30-2:30pm [Final (in class, closed book, closed notes)]
  • Slides

  • Intro [PDF 2pages/slide]
  • Algorithm Analysis [PDF 2pages/slide]
  • Greedy algorithms [PDF 2pages/slide, updated Feb 2]
  • Divide and Conquer algorithms [PDF 2pages/slide]
  • Dynamic Programming algorithms [PDF 2pages/slide]
  • Pattern Matching algorithms [PDF 2pages/slide]
  • Network flow algorithms [PDF 2pages/slide]
  • Problems [PDF 2pages/slide]
  • Homework

    Quizzes/Exams

    General course features and policies

    Course email list

    Course mailing list (send mail now or access the archive): Be sure to sign up to receive important announcements, which will be made only through the course email list. You must use your CS or EE account, or else some other UCR account, so be sure to learn how to read those accounts or at least automatically forward messages to your personal email address (just create in your home directory a file named ".forward" containing your personal email address).

    Tutorials

    Algorithm Animations