CS 218: Design and Analysis of Algorithms

Spring Quarter, 2018

News

  • (Jun 10) Solution hw8 posted
  • (Jun 8) Problems discussed in class posted
  • (May 30) Midterm II posted
  • (May 25) Final syllabus posted
  • (May 25) Problems discussed in class posted
  • (May 21) Homework 7 and Homework 8 posted
  • (May 21) Updated Dynamic Programming slides, Practice Midterm II posted
  • (May 17) Network Flow/Matching slides posted
  • (May 17) Homework 5 solution posted
  • (May 16) Homework 6 posted
  • (May 16) Dyn Programmming slides posted
  • (May 8) Homework 5 posted
  • (May 5) Midterm I and solution posted
  • (May 3) Homework 4 solution posted
  • (Apr 30) Midterm I syllabus, practice Midterm I posted
  • (Apr 27) Greedy slides posted
  • (Apr 25) Homework 4 posted
  • (Apr 18) Homework 3 posted, solution of homework 2
  • (Apr 13) Divide and Conquer slides posted
  • (Apr 12) Solution to hw1 posted
  • (Apr 11) Homework 2 posted
  • (Apr 11) Entrance exam posted
  • (Apr 4) Homework 1 posted
  • (Mar 26) First lecture is Monday April 2nd, 2:10pm
  • 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: Monday 3:10-4:00pm. Office: Chung Hall 325.

    Teaching Assistant:
  • Dipankar ranjan Baisya (dipankar0705018 AT gmail.com)
    Dipankar's office hours: Friday 1-2pm. Location: Chung Hall 110.

  • Lectures:
  • MWF, 2:10pm-3:00pm Chung Hall 143

  • 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, Apr  2: Course overview, Analysis (1-19)
  • W, Apr  4: Analysis (20-35) [HW1 posted]
  • F, Apr  6: Analysis (36-54)
  • M, Apr  9: Analysis (55-61) [Entrance quiz (30mins, in class, closed book, closed notes)]
  • W, Apr 11: Analysis (62-70) [HW1 due, HW2 posted]
  • F, Apr 13: Analysis (71-end)
  • M, Apr 16: Divide and conquer (1-45) by Dipankar
  • W, Apr 18: Divide and conquer (45-55) [HW2 due, HW3 posted]
  • F, Apr 20: Divide and conquer (56-71)
  • M, Apr 23: Divide and conquer (72-87)
  • W, Apr 25: Divide and conquer [HW3 due, HW4 posted]
  • F, Apr 27: Divide and conquer (-end), Greedy (1-14)
  • M, Apr 30: Greedy (15-35)
  • W, May  2: Review for midterm[HW4 due]
  • F, May  4: [Midterm I (50mins, in class, closed book, closed notes)]
  • M, May  7: Greedy (36-)
  • W, May  9: Midterm review, Greedy/UF (-57)[HW5 posted]
  • F, May 11: Greedy/UF (58-79)
  • M, May 14: Greedy/UF (80-end, skipped 87-99), Dyn Programming (1-18)
  • W, May 16: Dyn Programming (19-40) [HW5 due, HW6 posted]
  • F, May 18: Dyn Programming (41-62)
  • M, May 21: Dyn Programming (63-end)
  • W, May 23: Network Flow [HW6 due, HW7 posted]
  • F, May 25: Network Flow, Midterm II review
  • M, May 28: HOLIDAY - Memorial Day
  • W, May 30: [Midterm II (50mins, in class, closed book, closed notes)]
  • F, Jun  1: Network Flow [HW7 due, HW8 posted]
  • M, Jun  4: Network Flow
  • W, Jun  6: Network Flow
  • F, Jun  8: Review [HW8 due]
  • Monday, June 11: 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 (updated) [PDF 2pages/slide]
  • Network flow algorithms [PDF 2pages/slide]
  • Homework

    Homework papers should be prepared in LaTeX or some other word-processing system that can handle equations (figures can be hand-drawn), then converted/scanned to pdf format and turned in via Gradescope. Each student's work should be fully authored by his or her self, in his or her own words - that is, each student should turn in only text authored by his or her self. Each student is responsible for understanding all text that they submit. Finally, in each turned-in work, each student should appropriately cite any help or ideas that came from any other source. Violation of this policy is plagiarism and will be referred to the UCR student conduct office.

    Exams

    Policies