CS 218: Design and Analysis of Algorithms

Fall Quarter, 2012

News

  • (Dec 13) homework 5 solution posted
  • (Dec 6) problems discussed in class posted
  • (Nov 28) network flow slides posted, hw3 posted, hw4 solution posted, final syllabus posted
  • (Nov 14) greedy slides updated
  • (Nov 13) hw4 posted, hw3 solution posted, dynamic programming slides posted
  • (Nov 8) Midterm and solution posted
  • (Oct 30) hw2 solution posted, hw3 posted, greedy slides updated, midterm syllabus posted, mock exam posted
  • (Oct 23) slides "divide and conquer" updated
  • (Oct 22) Hw1 solution posted
  • (Oct 16) Hw2 posted
  • (Oct 12) Python examples posted
  • (Oct 8) Entrance exam posted
  • (Oct 2) Hw1 posted
  • (Oct 1) Our TA is Yi-Wen Yang
  • Lecture Schedule  Resources   Tutorials

    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 10:30-12noon. Office: Chung Hall 325.

    Teaching Assistant:
  • Yi-Wen Yang (yyang027@ucr.edu)
    Office hours: Mondays 2-3pm. Location: Chung Hall 110.

  • Lectures:
  • TR, 11:10am-12:30pm Chung Hall 142

  • Text Book:
  • Introduction to Algorithms (3rd 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

  • Sep 27: Course overview, Analysis of Algorithms (1-27)
  • Oct 2: Analysis of Algorithms (28-53) [HW1 posted]
  • Oct 4: Analysis of Algorithms (54-61) [Entrance quiz]
  • Oct 9: Analysis of Algorithms (62-end), Divide and Conquer (1-15)
  • Oct 11: Divide and Conquer (16-35)
  • Oct 16: Divide and Conquer (36-64) [HW1 due, HW2 posted]
  • Oct 18: Divide and Conquer (65-end)
  • Oct 23: Greedy (1-33)
  • Oct 25: Greedy (34-58)
  • Oct 30: Greedy (59-79) [HW2 due, HW3 posted]
  • Nov 1: Greedy (80-119)
  • Nov 6: Midterm Prep
  • Nov 8: [Midterm (80mins, in class, closed book, closed notes)]
  • Nov 13: Midterm review, Greedy (120-end), [HW3 due, HW4 posted]
  • Nov 15: Dynamic Programming (1-26) guest lecture by Prof. Chrobak
  • Nov 20: Greedy (union-find proof), Dynamic Programming (27-35)
  • Nov 22: Thanksgiving
  • Nov 27: Dynamic Programming (36-end)[HW4 due, HW5 posted]
  • Nov 29: Network Flow (1-)
  • Dec 4: Network Flow (-end)
  • Dec 6: Review
  • Dec 13: Final [HW5 due] & [Final (time 11:30-2:30pm, closed book, closed notes)]
  • Slides

  • Intro [PDF 2pages/slide]
  • Algorithm Analysis [PDF 2pages/slide]
  • Divide and Conquer algorithms [PDF 2pages/slide]
  • Greedy algorithms [PDF 2pages/slide, updated Oct 30]
  • Dynamic Programming algorithms [PDF 2pages/slide]
  • Network flow algorithms [PDF 2pages/slide]
  • Python

  • Python examples
  • Homework

    Quizzes/Exams

    General course features and policies

    Tutorials