CS 218: Design and Analysis of Algorithms

Fall Quarter, 2016

News

  • (Nov 29) Solution homework 8 posted
  • (Nov 29) Practice problems posted
  • (Nov 28) Network Flow slides updated
  • (Nov 27) Homework 7 solution posted
  • (Nov 21) Homework 8 posted, final syllabus
  • (Nov 17) Homework 6 solution
  • (Nov 17) Network Flow slides posted
  • (Nov 16) Dynamic programming slides updated
  • (Nov 14) Homework 7 posted
  • (Nov 9) Midterm (and solution) posted
  • (Nov 7) Practice problem posted
  • (Nov 2) Dynamic Programming slides posted
  • (Nov 1) Mock exam posted
  • (Oct 31) Homework 5 updated, homework 6 posted, midterm syllabus posted
  • (Oct 20) Greedy slides posted
  • (Oct 17) Homework 4 posted, and homework 3 solution posted
  • (Oct 12) Homework 3 posted, and homework 2 solution posted
  • (Oct 7) Homework 1 solution posted
  • (Oct 5) Divide and conquer slides posted, second homework posted
  • (Oct 4) Entrance exam posted
  • (Sep 28) First homework posted
  • (Sep 12) First lecture is Monday September 26th, 3:40pm
  • Overview

    Catalog description: 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.

    Basic information

    Instructor: Stefano Lonardi (stelo AT cs.ucr.edu)
    Office hours: Tuesday 3:40-5pm. Office: Chung Hall 325.

    Teaching Assistant:
  • Sihuan Li (sli049 AT ucr.edu)
    Sihuan Li's office hours: Thursday 10am-11am. Location: Chung Hall 110.

  • Hui Yang (hyang028 AT ucr.edu)
    Hui Yang's office hours: Tuesday 1pm-2pm. Location: Chung Hall 110.

  • Lectures:
  • MW, 3:40pm-5:00pm 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. Students without an undergraduate courses in algorithms (CS 141 equivalent) and basic data structures (CS 14 equivalent) will not allowed to enroll.

  • 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
  • Divide and conquer: linear-time selection, Strassen, FFT, Integer multiplication
  • Randomized: selection in expected linear time, polynomial verification
  • Greedy: task scheduling, factional knapsack, Huffman codes, Dijkstra, Prim, Kruskal
  • Union-Find: list and tree implementation, union by rank and path compression, analysis
  • Dynamic programming: Subset sum, LCS, matrix chain multiplication, Floyd-Warshall
  • Graph algorithms: Network Flow and Bipartite Matching
  • Actual list of topics

  • M, Sep 26: Course overview, Analysis of Algorithms (1-25)
  • W, Sep 28: Analysis of Algorithms (26-50) [HW1 posted]
  • M, Oct  3: Analysis of Algorithms (51-60) [Entrance quiz (40mins, in class, closed book, closed notes)]
  • W, Oct  5: Analysis of Algorithms (61-77) [HW1 due, HW2 posted]
  • M, Oct 10: Analysis of Algorithms (77-end), Divide and Conquer/Randomized (1-34)
  • W, Oct 12: Divide and Conquer/Randomized (35-59) [HW2 due, HW3 posted]
  • M, Oct 17: Divide and Conquer/Randomized (60-85)
  • W, Oct 19: Divide and Conquer/Randomized (86-end) [HW3 due, HW4 posted]
  • M, Oct 24: Greedy (1-29)
  • W, Oct 26: Greedy (30-55) [HW4 due, HW5 posted]
  • M, Oct 31: Greedy (56-76), Union-Find (77-81)
  • W, Nov  2: Union-Find (81-98) [HW5 due, HW6 posted]
  • M, Nov  7: Midterm Prep
  • W, Nov  9: [Midterm (80mins, in class, closed book, closed notes)]
  • M, Nov 14: Midterm review, Union-Find (99-end), Dynamic programming (1-24)
  • W, Nov 16: Dynamic programming (24-63) [HW6 due, HW7 posted]
  • M, Nov 21: Dynamic programming (64-end), Network flow (1-26)
  • W, Nov 23: Network flow (26-) [HW7 due, HW8 posted]
  • M, Nov 28: Network flow (-)
  • W, Nov 30: Review [HW8 due]
  • F, Dec  9: 3-6pm[Final (180 mins, in class, closed book, closed notes)]
  • Slides

  • Intro [PDF 2pages/slide]
  • Algorithm Analysis [PDF 2pages/slide]
  • Divide and Conquer (and randomized) algorithms [PDF 2pages/slide]
  • Greedy algorithms [PDF 2pages/slide]
  • Dynamic Programming algorithms [PDF 2pages/slide]
  • Network flow algorithms [PDF 2pages/slide, updated]
  • Homework

    Quizzes/Exams

    Policies