CS 218: Design and Analysis of Algorithms

Spring Quarter, 2017

News

  • (Jun 8) Hw8 solution posted, problems discussed in class
  • (Jun 6) final syllabus posted
  • (Jun 1) Hw7 solution posted
  • (May 25) Hw6 solution, hw7, hw8 posted
  • (May 23) Network flow posted
  • (May 23) Matrix-chain multiplication posted
  • (May 18) Midterm and solution posted
  • (May 16) Homework 5 solution posted, homework 6 posted
  • (May 15) Warm-up problems posted
  • (May 4) Dynamic programming slides posted
  • (May 4) Homework 5 posted, solution to hw4
  • (May 2) Mock midterm exam posted
  • (Apr 25) Greedy slides posted
  • (Apr 20) hw3 posted, solution to hw2
  • (Apr 13) Solution to hw1, and hw2 posted
  • (Apr 11) Entrance exam posted (w solutions)
  • (Apr 11) Divide and Conquer slides posted
  • (Apr 3) Intro and Analysis slides posted
  • (Mar 28) The lectures will be in HMNSS 1503 (sits 62 students)
  • (Mar 27) First lecture is Tuesday April 4th, 9:40am
  • 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:
  • Ryan Holt (rholt002 AT ucr.edu)
    Ryan's office hours: Mondays 2-3pm. Location: Chung Hall 110.

  • Shweti Mahajan (smaha004 AT ucr.edu)
    Shweti's office hours: Tuesdays 1:10-2:10pm. Location: Chung Hall 110.

  • Lectures:
  • TR, 9:40pm-11:00am Humanities and Social Sciences 1503

  • 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

  • T, Apr  4: Course overview, Analysis of Algorithms (1-30)
  • R, Apr  6: Analysis of Algorithms (31-60) [HW1 posted]
  • T, Apr 11: Analysis of Algorithms (61-68) [Entrance quiz (40mins, in class, closed book, closed notes)]
  • R, Apr 13: Analysis of Algorithms (69-end), Divide and Conquer/Randomized (1-15) [HW1 due, HW2 posted]
  • T, Apr 18: Entrance exam review, Divide and conquer/Randomized (16-57)
  • R, Apr 20: Divide and conquer/Randomized (58-86) [HW2 due, HW3 posted]
  • T, Apr 25: Divide and conquer/Randomized (87-end), Greedy and U-F (1-14)
  • R, Apr 27: Greedy and U-F (15-52)[HW3 due, HW4 posted]
  • T, May  2: Greedy and U-F (53-83)
  • R, May  4: Greedy and U-F (84-end) [HW4 due, HW5 posted]
  • T, May  9: Dynamic Programming (1-43)
  • R, May 11: Dynamic Programming (44-end) [HW5 due, HW6 posted]
  • T, May 16: Midterm Prep
  • R, May 18: [Midterm (80mins, in class, closed book, closed notes)]
  • T, May 23: Midterm Review, Dynamic Programming:Matrix Chain, Network Flow (1-14)
  • R, May 25: Network Flow (15-35)[HW6 due, HW7 posted]
  • T, May 30: Network Flow (36-67)
  • R, Jun  1: Network Flow (68-end)[HW7 due, HW8 posted]
  • T, Jun  6: Review
  • R, Jun  8: Review [HW8 due]
  • Thursday, Jun 15: 8-11am[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]
  • Dynamic Programming:Matrix-chain multiplication [PDF 2pages/slide]
  • Network flow algorithms [PDF 2pages/slide]
  • Homework

    Exams

    Policies