CS 218: Design and Analysis of Algorithms
Spring Quarter, 2017
(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) Matrixchain multiplication posted
(May 18) Midterm and solution posted
(May 16) Homework 5 solution posted, homework 6 posted
(May 15) Warmup 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
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. Worstcase and averagecase analysis using
recurrence relations, generating functions, upper and lower bounds,
and other methods.
Instructor:
Stefano Lonardi (stelo AT cs.ucr.edu)
Office hours: Tuesday 3:405pm. Office: Chung Hall 325.
Teaching Assistant:
Ryan Holt (rholt002 AT ucr.edu)
Ryan's office hours: Mondays 23pm. Location: Chung Hall 110.
Shweti Mahajan (smaha004 AT ucr.edu)
Shweti's office hours: Tuesdays 1:102:10pm. Location: Chung Hall 110.
Lectures:
TR, 9:40pm11: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, radixsort,
binary search
Graph algorithms: DFS, BFS, connected components, biconnected components,
transitive closure
Digraph algorithms: DFS, BFS, strongly connected components, topological sorting
Tentative list of topics
Intro to Analysis: recurrence relations, master theorem, amortized analysis
Divide and conquer: lineartime selection, Strassen, FFT, Integer multiplication
Randomized: selection in expected linear time, polynomial verification
Greedy: task scheduling, factional knapsack, Huffman codes, Dijkstra, Prim, Kruskal
UnionFind: list and tree implementation, union by rank and path compression, analysis
Dynamic programming: Subset sum, LCS, matrix chain multiplication, FloydWarshall
Graph algorithms: Network Flow and Bipartite Matching
Actual list of topics
T, Apr 4: Course overview, Analysis of Algorithms (130)
R, Apr 6: Analysis of Algorithms (3160) [HW1 posted]
T, Apr 11: Analysis of Algorithms (6168) [Entrance quiz (40mins, in class, closed book, closed notes)]
R, Apr 13: Analysis of Algorithms (69end), Divide and Conquer/Randomized (115) [HW1 due, HW2 posted]
T, Apr 18: Entrance exam review, Divide and conquer/Randomized (1657)
R, Apr 20: Divide and conquer/Randomized (5886) [HW2 due, HW3 posted]
T, Apr 25: Divide and conquer/Randomized (87end), Greedy and UF (114)
R, Apr 27: Greedy and UF (1552)[HW3 due, HW4 posted]
T, May 2: Greedy and UF (5383)
R, May 4: Greedy and UF (84end) [HW4 due, HW5 posted]
T, May 9: Dynamic Programming (143)
R, May 11: Dynamic Programming (44end) [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 (114)
R, May 25: Network Flow (1535)[HW6 due, HW7 posted]
T, May 30: Network Flow (3667)
R, Jun 1: Network Flow (68end)[HW7 due, HW8 posted]
T, Jun 6: Review
R, Jun 8: Review [HW8 due]
Thursday, Jun 15: 811am[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:Matrixchain multiplication [PDF 2pages/slide]
Network flow algorithms [PDF 2pages/slide]

Academic dishonesty: Cheating
will be strongly punished (typically
with an F in the course). Assignment
submissions must represent your
original work. Copying from any
sources (web, other books, past or
current students, etc.) is strictly
prohibited. While discussing highlevel ideas about
assignments together is
tolerated, pooling common answers
is not allowed. Be aware that all
exams will be scanned,
for comparison with exams submitted
for regrades. Also, be aware that
lying to an instructor in order to be
able to makeup a missed exam or in
other ways to obtain a better grade
can be treated as academic dishonesty.

Regrade policy: Regrade
requests must be submitted in
within two weeks of
the distribution of the graded
material. The entire
homework/test/assignment may be
regraded, not just the problem in
question, so the grade may go up or
down. Thus, think your regrade
requests through carefully. Recording errors should also be pointed out to
the instructor before the last class.

Final grades: Per university
policy, changes to your final grade
will be made only in the event
of a clerical error.

Communicating with the instructors
: When sending electronic
mail to the instructors or
graders, please include your full
name, student ID
number, and UCR email
address, so that we may properly
identify you (remember, many students
have similar names). Also, please try
to be polite and use reasonable
grammar and formatting.

Laptops, tablets and cell phones: During lectures
please turn off your
cell phone. During exams, all electronic devices
must not be visible (e.g., store them
inside a backpack).

Written Assignments: All
assignments and solutions will be
posted on the class homepage. Write
your full name with uppercase LAST
name, assignment number, student ID,
login. Assignment have to be typed
(figures can be hand drawn). Written
assignments have to be submitted
before the beginning of the
class on the due date on the
instructor's desk. No
late assignment will be accepted.