CS 218: Design and Analysis of Algorithms
Fall Quarter, 2018
(Dec 6) Problems discussed in class posted
(Dec 5) Updated slides on Flow
(Dec 2) Midterm 2 posted
(Nov 28) Problems discussed in class posted
(Nov 20) The final is Monday, December 10, 36PM in MSE 103
(Nov 14) Mock midterm 2 posted
(Nov 14) Midterm syllabus posted
(Nov 14) Homework 6 posted
(Nov 13) Slides posted
(Nov 8) Homework 5 posted
(Nov 6) Slides posted
(Oct 31) Homework 4 posted
(Oct 31) Midterm I posted
(Oct 25) Mock midterm 1 posted
(Oct 25) Midterm syllabus posted
(Oct 24) Slides posted
(Oct 17) Homework 3 posted
(Oct 9) Entrance exam posted
(Oct 9) Slides posted
(Oct 9) Homework 2 posted
(Oct 2) Homework 1 posted
(Sep 28) Slides posted
(Sep 7) First lecture is Friday September 28th, 10:10am
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:
Tin Vu (tvu032@ucr.edu)
TBA's office hours: Tuesday 45pm. Location: Chung Hall 110.
Lectures:
MWF, 10:10am11:00am, 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. 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
F, Sep 28: Course overview, Analysis (112)
WEEK 1
M, Oct 1: Analysis (1328)
W, Oct 3: Analysis (2942) [HW1 posted]
F, Oct 5: Analysis (4356)
WEEK 2
M, Oct 8: Analysis (5760) [Entrance quiz (30mins, in class, closed book, closed notes)]
W, Oct 10: Analysis (61end) [HW1 due, HW2 posted]
F, Oct 12: Divide and Conquer (111)
WEEK 3
M, Oct 15: Divide and Conquer (1226)
W, Oct 17: Divide and Conquer (2741) [HW2 due, HW3 posted]
F, Oct 19: Divide and Conquer (4265)
WEEK 4
M, Oct 22: Divide and Conquer (6673)
W, Oct 24: Divide and Conquer (74end) [HW3 due]
F, Oct 26: Greedy (122)
WEEK 5
M, Oct 29: Midterm 1 review
W, Oct 31: [Midterm I (50mins, in class, closed book, closed notes)][HW4 posted]
F, Nov 2: Midterm 1 postreview, Greedy (2335)
WEEK 6
M, Nov 5: Greedy (5058)
W, Nov 7: Greedy (3546)[HW4 due, HW5 posted]
F, Nov 9: Greedy (4749, 5976)
WEEK 7
M, Nov 12: HOLIDAY  Veterans' day
W, Nov 14: Greedy (7787, 100end, skipped 8899), Dynamic programming (17) [HW5 due, HW6 posted]
F, Nov 16: Dynamic programming (727)
WEEK 8
M, Nov 19: Dynamic programming (2843)
W, Nov 21: Dynamic programming (4466)[HW6 due]
F, Nov 23: HOLIDAY  Thanksgiving
WEEK 9
M, Nov 26: Dynamic programming (67end), Network Flow (1)
W, Nov 28: Midterm 2 review[HW7 posted]
F, Nov 30: [Midterm II (50mins, in class, closed book, closed notes)]
WEEK 10
M, Dec 3: Network Flow ()
W, Dec 5: Network Flow (end), Midterm 2 postreview[HW7 due]
F, Dec 7: Final review
FINALS' WEEK
M, Dec 10, 36PM: Final [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 (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 GradeScope
within two weeks of
the distribution of the graded
material.

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.