CS 218: Design and Analysis of Algorithms
Winter Quarter, 2020
(Mar 13) Problems in the practice exam posted
(Mar 13) Homework 7 solution posted
(Mar 11) Final syllabus posted
(Mar 10) Inperson finals not allowed due to COVID19, evaluating alternatives
(Mar 10) Location of final is now Bourns Hall B118
(Mar 4) Network flow slides posted
(Mar 4) Homework 7 posted
(Mar 4) Midterm II posted
(Mar 1) Practice problems for Midterm II posted
(Feb 27) Homework 6 solution posted
(Feb 26) Midterm 2 practice posted
(Feb 26) Midterm 2 syllabus posted
(Feb 24) The final is Wed, Mar 18 2020, 11:30am2:30pm in Boyce Hall 1471
(Feb 20) Homework 6 posted
(Feb 19) Homework 5 solution posted
(Feb 19) Homework 4 solution posted
(Feb 15) Dyn Programming slides posted
(Feb 13) Homework 5 posted
(Feb 8) Midterm I posted
(Feb 4) Practice problems for Midterm I posted
(Jan 30) Hw3 solution, hw4, posted
(Jan 29) Greedy slides posted
(Jan 29) Midterm I syllabus, mock midterm, posted
(Jan 23) Midterm I postponed
(Jan 23) Hw 3 posted
(Jan 23) Hw 2 solution posted
(Jan 20) Slides posted
(Jan 16) Homework 1 solution posted
(Jan 15) Homework 2 posted
(Jan 14) Entrance exam posted
(Jan 6) Homework 1 posted
(Jan 5) Intro slides posted
(Jan 1) Happy New Year! The first lecture is Monday Jan 6th, 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 34pm or by appointment. Office: MRB 3130.
Teaching Assistant:
Huong Luu (huong.luu AT email.ucr.edu)
Huong's office hours: Tuesday 34pm or by appointment. Location: Chung Hall 362.
Lectures:
MWF, 10:00am10:50am, Boyce Hall 1471
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, lower bounds, amortized analysis
Divide and conquer: lineartime selection, FFT, integer multiplication
Randomized: selection in expected linear time, polynomial verification
Greedy: task scheduling, 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
WEEK 1
M, Jan 6: Course overview, Analysis (112)
W, Jan 8: Analysis (1330) [HW1 posted]
F, Jan 10: Analysis (3147)
WEEK 2
M, Jan 13: Analysis (4849) [Entrance quiz (30mins, in class, closed book, closed notes)]
W, Jan 15: Analysis (5062) [HW1 due, HW2 posted]
F, Jan 17: Analysis (6373)
WEEK 3
M, Jan 20: HOLIDAY  MLK Jr Day
W, Jan 22: Analysis (74end), Divide and Conquer (18) [HW2 due, HW3 posted]
F, Jan 24: Divide and Conquer (926)
WEEK 4
M, Jan 27: Divide and Conquer (2751)
W, Jan 29: Divide and Conquer (5266)[HW3 due]
F, Jan 31: Divide and Conquer (6775)
WEEK 5
M, Feb 3: Divide and Conquer (76end), Greedy (114)
W, Feb 5: Midterm I review [HW4 posted]
F, Feb 7: [Midterm I (50mins, in class, closed book, closed notes)]
WEEK 6
M, Feb 10: Greedy (1534)
W, Feb 12: Midterm review, Greedy (3541) [HW4 due, HW5 posted]
F, Feb 14: Greedy (4243, 7182)
WEEK 7
M, Feb 17: HOLIDAY  Presidents' day
W, Feb 19: Greedy (83102, 4455)[HW5 due, HW6 posted]
F, Feb 21: Greedy (55end)
WEEK 8
M, Feb 24: Dynamic programming (125)
W, Feb 26: Dynamic programming (2657, skipped Linearspace LCS)[HW6 due]
F, Feb 28: Dynamic programming (58)
WEEK 9
M, Mar 2: Midterm II review
W, Mar 4: [Midterm II (50mins, in class, closed book, closed notes)][HW7 posted]
F, Mar 6: Network Flow (127)
WEEK 10
M, Mar 9: Network Flow (2842)
W, Mar 11: Network Flow (43end)[HW7 due]
F, Mar 13: Practice test online via gradescope
FINALS' WEEK
Wed, Mar 18 2020, 11:30am2:30pm: Final online via gradescope[Final (180 mins, 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. A very good LaTeX editor is Overleaf. 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.