CS 218: Design and Analysis of Algorithms
Fall Quarter, 2015
(Dec 3) homework 8 solution (updated on Dec 8)
(Dec 2) more "warmup" problems posted
(Dec 1) final syllabus posted
(Dec 1) Flow slides updated
(Nov 25) hw7 solution posted
(Nov 25) hw8 posted
(Nov 25) dyn programming slides updated
(Nov 19) hw7 posted
(Nov 19) hw6 solution posted
(Nov 16) Midterm posted
(Nov 9) Some "warmup" problems posted (updated on Nov 10)
(Nov 5) Hw6 posted
(Nov 5) updated "greedy" slides
(Nov 4) Hw5 solution posted
(Oct 28) Hw4 solution posted
(Oct 28) Mock midterm posted
(Oct 28) Midterm list of topics
(Oct 28) Hw5 posted
(Oct 28) Hw3 solution posted
(Oct 22) divide and conquer slides updated again
(Oct 21) Hw4 posted
(Oct 12) Hw3 posted
(Oct 12) divide and conquer slides updated
(Oct 8) Hw 1 solution posted
(Oct 7) Hw 2 posted
(Oct 7) Entrance exam posted
(Oct 7) Midterm is Monday, Nov 16th
(Oct 5) Final is Wednesday, Dec 9th
(Sep 9) First lecture is Monday September 28th
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 Assistants:
Weihua Pan (wpan005 AT ucr.edu)
Office hours: Friday 45pm. Location: Chung Hall 110.
Abbas Roayaei (roayaei AT gmail.com)
Office hours: Thursday 10:3011:30am. Location: Chung Hall 110.
Lectures:
MW, 3:40pm5: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
Greedy: task scheduling, factional knapsack, Huffman codes, Dijkstra, Prim, Kruskal
UnionFind: list and tree implementation, union by rank and path compression, analysis
Divide and conquer: lineartime selection, Strassen, FFT, Integer multiplication
Randomized: selection in expected linear time, polynomial verification
Dynamic programming: Subset sum, LCS, matrix chain multiplication, FloydWarshall
Graph algorithms: Network Flow and Bipartite Matching
Actual list of topics
M, Sep 28: Course overview, Analysis of Algorithms (125)
W, Sep 30: Analysis of Algorithms (2647) [HW1 posted]
M, Oct 5: Analysis of Algorithms (4861) [Entrance quiz]
W, Oct 7: Analysis of Algorithms (6276)[HW1 due, HW2 posted]
M, Oct 12: Analysis of Algorithms (77end), Divide and Conquer / Randomized (134)
W, Oct 14: Divide and Conquer / Randomized (3557) [HW2 due, HW3 posted]
M, Oct 19: Divide and Conquer / Randomized (5883)
W, Oct 21: Divide and Conquer / Randomized (8498) [HW3 due, HW4 posted]
M, Oct 26: Divide and Conquer / Randomized (99end), Greedy (128)
W, Oct 28: Greedy (2955) [HW4 due, HW5 posted]
M, Nov 2: Greedy (5679)
W, Nov 4: UnionFind (80101) [HW5 due]
M, Nov 9: UnionFind (102end), Midterm Prep
W, Nov 11: Holiday [HW6 posted]
M, Nov 16: [Midterm (80mins, in class, closed book, closed notes)]
W, Nov 18: Dynamic Programming (134) [HW6 due, HW7 posted]
M, Nov 23: Dynamic Programming (35end)
W, Nov 25: Network Flow (127)[HW7 due, HW8 posted]
M, Nov 30: Network Flow (28end)
W, Dec 2: Review [HW8 due]
W, Dec 9: 36pm[Final (180 mins, closed book, closed notes)]
Slides
Intro [PDF 2pages/slide]
Algorithm Analysis [updated Oct 1, PDF 2pages/slide]
Divide and Conquer (and randomized) algorithms [updated Oct 22, PDF 2pages/slide]
Greedy algorithms [updated Nov 5, PDF 2pages/slide]
Dynamic Programming algorithms [PDF 2pages/slide, update Nov 25]
Network flow algorithms [PDF 2pages/slide, updated Dec 1]

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. Asking your
instructor how far you were from a
cutoff and what extra work you can do
to improve the grade is not
appropriate.

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. Write legibly: what cannot be
read will not be graded. Consider
typing the assignment if you
handwriting is hard to read. 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.