CS 218: Design and Analysis of Algorithms

Winter Quarter, 2005

News

  • (Mar 10th) Homework 5 solution posted.
  • (Mar 7th) Homework 5 updated.
  • (Mar 4th) Final syllabus posted.
  • (Mar 2nd) Homework 5 deadline postponed.
  • (Feb 25th) Midterm II solution posted.
  • (Feb 24th) Midterm II posted.
  • (Feb 24th) Homework 5 posted.
  • (Feb 22nd) Homework 4 solution posted.
  • (Feb 15th) Midterm II syllabus posted.
  • (Feb 11th) Homework 3 solution posted.
  • (Feb 10th) Homework 4 posted.
  • (Feb 4th) Midterm I solution posted.
  • (Feb 3rd) Midterm I posted.
  • (Jan 28th) Homework 3 and Homework 2 solution posted.
  • (Jan 25th) Midterm I syllabus posted.
  • (Jan 20th) Homework 1 solution posted.
  • (Jan 18th) Homework 2 posted.
  • (Jan 13th) Entrance quiz posted.
  • (Jan 6th) Homework 1 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: Surge Bldg. 320.

    Teaching Assistant:
  • Nitin Kumar (nkumar AT cs.ucr.edu), Office hours: Tuesdays 3-4PM, Surge 352.

  • Lectures:
  • TR, 5:10pm-6:30pm OLMH 421

  • 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, recurrence equations, sets (operations on sets, relations, functions), counting (permutations, sets, combinations, binomial coefficients), probability (independence, random variable, expected value), recurrence relations
  • 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 4th: Course overview, Analysis of Algorithms (slides 1-35)
  • Jan 6th: Analysis of Algorithms (slides 36-52) [HW1 posted]
  • Jan 11th: Analysis of Algorithms (slides 53-end), [Entrance quiz (40mins)]
  • Jan 13th: String Matching (slides 1-end)
  • Jan 18th: Greedy+UnionFind (slides 1-41) [HW1 due, HW2 posted]
  • Jan 20th: Greedy+UnionFind (slides 42-83)
  • Jan 25th: Greedy+UnionFind (slides 84-125)
  • Jan 27th: Greedy+UnionFind (slides 126-end), DivideConquer (slides 1-18) [HW2 due, HW3 posted]
  • Feb 1st: DivideConquer (slides 19-51)
  • Feb 3rd: [Midterm I (80mins, in class, closed book, closed notes)]
  • Feb 8th: Midterm I review, DivideConquer (slides 52-64)
  • Feb 10th: DivideConquer (slides 65-end), DynProgramming (slides 1-20) [HW3 due, HW4 posted]
  • Feb 15th: DynProgramming (slides 20-50)
  • Feb 17th: DynProgramming (slides 51-63 76-end)
  • Feb 22nd: DynProgramming (slides 64-75), Flow (slides 1-13) [HW4 due]
  • Feb 24th: [Midterm II (80mins, in class, closed book, closed notes)][HW5 posted]
  • Mar 1st: Midterm II review, Flow (slides 13-17)
  • Mar 3rd: Flow (slides 18-36)
  • Mar 8th: Flow (slides 37-end (skipped slides 71 and 72 for lack of time))
  • Mar 10th: Review [HW5 due]
  • Mar 15th: [Final 7-10PM (in class, closed book, closed notes)]
  • Slides

  • Intro [PDF 2pages/slide]
  • Intro to the Analysis of Algorithms [PDF 2pages/slide]
  • String Matching [PDF 2pages/slide]
  • Greedy+UnionFind [PDF 2pages/slide]
  • Divide and conquer [PDF 2pages/slide]
  • Dynamic Programming [PDF 2pages/slide]
  • Flow and Matching [PDF 2pages/slide]
  • Homework

    Quizzes

    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 madeonlythrough 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