CS 218: Design and Analysis of Algorithms

Winter Quarter, 2014

News

  • (Mar 14) Problems discussed in class posted
  • (Mar 11) Final time/location CHANGED back to the original time/place
  • (Mar 10) Homework 4 solution posted
  • (Mar 8) Final syllabus posted
  • (Mar 4) Dyn Programming slides updated
  • (Mar 4) Network flow slides posted
  • (Mar 4) Homework 3 solution posted
  • (Mar 4) Homework 5 posted
  • (Feb 25) Dynamic Programming slides posted
  • (Feb 25) Midterm and solutions posted
  • (Feb 18) Problems presented in class posted
  • (Feb 18) Greedy slides updated
  • (Feb 10) Mock exam (midterm) posted w solutions
  • (Feb 10) Midterm syllabus posted
  • (Feb 10) Homework 2 solution posted
  • (Feb 3) Homework 3 posted
  • (Jan 28) Greedy slides posted
  • (Jan 28) Homework 1 solution posted
  • (Jan 23) Homework 2 posted
  • (Jan 16) Divide and conquer slides posted
  • (Jan 15) Entrance quiz (w solutions) posted
  • (Jan 10) Homework 1 posted
  • (Jan 10) Entrance exam slides posted
  • (Jan 1) Happy New Year
  • Lecture Schedule

    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.

    Basic information

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

    Teaching Assistant:
  • Rachid Ounit (rouni001 AT ucr.edu)
    Office hours: Thursday 3:40-4:40pm. Location: Chung Hall 110.

  • Lectures:
  • TR, 2:10pm-3:30pm MSE 103

  • 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
  • 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: linear-time selection, Strassen, FFT, Integer multiplication
  • Dynamic programming: Subset sum, LCS, matrix chain multiplication, Floyd-Warshall
  • Graph algorithms: Network Flow and Bipartite Matching
  • (time permitting) Numerical algorithms: primality testing, RSA
  • (time permitting) Advanced Data structures: binomial heaps and Fibonacci heaps, splay trees
  • Actual list of topics

  • Jan 7: Course overview, Analysis of Algorithms (1-27)
  • Jan 9: Analysis of Algorithms (28-53) [HW1 posted]
  • Jan 14: Analysis of Algorithms (54-63) [Entrance quiz]
  • Jan 16: Analysis of Algorithms (64-end), Divide and Conquer (1-15)
  • Jan 21: Divide and Conquer (16-28)
  • Jan 23: Divide and Conquer (29-73) [HW1 due, HW2 posted]
  • Jan 28: Divide and Conquer (74-end)
  • Jan 30: Greedy (1-29)
  • Feb 4: Greedy (30-71, skipped Huffman codes)
  • Feb 6: Greedy (72-88) [HW2 due, HW3 posted]
  • Feb 11: Greedy (89-)
  • Feb 13: Union-Find (-end)
  • Feb 18: Midterm Prep
  • Feb 20: [Midterm (80mins, in class, closed book, closed notes)][HW3 due, HW4 posted]
  • Feb 25: Midterm review, Dynamic Programming (1-24)
  • Feb 27: Dynamic Programming (25-53)
  • Mar 4: Dynamic Programming (68-end)
  • Mar 6: Network Flow (1-30)[HW4 due, HW5 posted]
  • Mar 11: Network Flow (31-end)
  • Mar 13: Review
  • Mar 19: Final [HW5 due] & [Final (MSE 103, 8am-11am, 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 Feb 18]
  • Dynamic Programming algorithms [PDF 2pages/slide, updated Mar 4]
  • Network flow algorithms [PDF 2pages/slide]
  • Python

  • Python examples
  • Homework

    Quizzes/Exams

    General course features and policies