CS 218: Design and Analysis of Algorithms
Spring Quarter, 2018
(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
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: Monday 3:104:00pm. Office: Chung Hall 325.
Teaching Assistant:
Dipankar ranjan Baisya (dipankar0705018 AT gmail.com)
Dipankar's office hours: Friday 12pm. Location: Chung Hall 110.
Lectures:
MWF, 2:10pm3: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, 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
M, Apr 2: Course overview, Analysis (119)
W, Apr 4: Analysis (2035) [HW1 posted]
F, Apr 6: Analysis (3654)
M, Apr 9: Analysis (5561) [Entrance quiz (30mins, in class, closed book, closed notes)]
W, Apr 11: Analysis (6270) [HW1 due, HW2 posted]
F, Apr 13: Analysis (71end)
M, Apr 16: Divide and conquer (145) by Dipankar
W, Apr 18: Divide and conquer (4555) [HW2 due, HW3 posted]
F, Apr 20: Divide and conquer (5671)
M, Apr 23: Divide and conquer (7287)
W, Apr 25: Divide and conquer [HW3 due, HW4 posted]
F, Apr 27: Divide and conquer (end), Greedy (114)
M, Apr 30: Greedy (1535)
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 (5879)
M, May 14: Greedy/UF (80end, skipped 8799), Dyn Programming (118)
W, May 16: Dyn Programming (1940) [HW5 due, HW6 posted]
F, May 18: Dyn Programming (4162)
M, May 21: Dyn Programming (63end)
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: 36pm[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 papers should be prepared in LaTeX or some other wordprocessing system that can handle equations (figures can be handdrawn), 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 turnedin 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.

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.