CS 218: Design and Analysis of Algorithms
Winter Quarter, 2007
Mar 15: Homework 5 solution posted.
Mar 5: final syllabus posted.
Mar 2: Homework 4 solution posted.
Mar 1: Homework 5 posted.
Feb 27: "pattern matching" and "network flow" slides posted.
Feb 22: Homework 4 revised.
Feb 21: Homework 3 solution posted.
Feb 20: Homework 4 posted.
Feb 20: revised midterm solution posted.
Feb 17: midterm and solution posted.
Feb 8: prep exam for midterm posted (with solution).
Feb 8: midterm syllabus posted.
Feb 6: Homework 3 posted.
Feb 3: Homework 2 solution posted.
Jan 30: "divide and conquer" slides posted.
Jan 19: Homework 2 posted.
Jan 18: Homework 1 solution posted.
Jan 16: "Greedy" slides posted.
Jan 9: Homework 1 posted.
Jan 2: "Intro" and "Analysis" slides posted.
Lecture Schedule Email list Resources Tutorials Animations
Catalog description: CS 218. 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. Worst-case and average-case analysis using
recurrence relations, generating functions, upper and lower bounds,
and other methods. UCR course schedule,
UCR course
catalog.
Instructor:
Stefano Lonardi (stelo AT cs.ucr.edu)
Office hours: Wednesdays, 10:30am-12noon. Office: Engineering 2, 317.
Teaching Assistant:
Elena Harris (elenah AT cs.ucr.edu)
Office hours: TR 12:00noon-1:00PM (EBU II 110).
Lectures:
TR, 2:10pm-3:30pm Engineering 2, 139
Text Book:
Introduction to Algorithms (2nd 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.
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, radix-sort,
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
Pattern matching: brute force, KMP, tries and suffix trees
Greedy: task scheduling, factional knapsack, Huffman codes, Dijkstra, Prim, Kruskal
Union-Find: list and tree implementation, union by rank and path compression, analysis
Divide and conquer: lineat-time selection, Strassen, FFT, Integer multiplication
Dynamic programming: Subset sum, LCS, matrix chain multiplication, Floyd-Warshall
Graph algorithms: Flow and matching
Numerical algorithms: primality testing, RSA
Data structures: binomial heaps and Fibonacci heaps, splay trees
Actual list of topics
Jan 4: Course overview, Analysis of Algorithms (slides 1-21)
Jan 9: Analysis of Algorithms (slides 22-44) [HW1 posted]
Jan 11: Analysis of Algorithms (slides 44-65)
Jan 16: Analysis of Algorithms (slides 66-end), Greedy (1-33)
Jan 18: Greedy (34-66) [HW1 due, HW2 posted]
Jan 23: Greedy (67-85)
Jan 25: Greedy+Union-Find (86-124)
Jan 30: Union-Find (125-end)
Feb 1: DivideEtImpera (1-44) [HW2 due]
Feb 6: DivideEtImpera (45-67) [HW3 posted]
Feb 8: DivideEtImpera (68-end), Dynamic Programming (1-15)
Feb 13: Midterm prep
Feb 15: [Midterm (80mins, in class, closed book, closed notes)]
Feb 20: Midterm post-mortem, Dynamic Programming (16-31)[HW3 due, HW4 posted]
Feb 22: Dynamic Programming (32-59)
Feb 27: Dynamic Programming (59-end)
Mar 1: Pattern Matching (1-32)[HW4 due, HW5 posted]
Mar 6: Pattern Matching (33-end), Flow (1-24)
Mar 8: Network Flow (25-57)
Mar 13: Network Flow (58-end) [HW5 due]
Mar 15: Review
Mar 22: 11:30 am - 2:30 pm[Final (in class, closed book, closed notes)]
Slides
Intro [PDF 2pages/slide]
Algorithm Analysis [PDF 2pages/slide]
Greedy algorithms [PDF 2pages/slide]
Divide and Conquer algorithms [PDF 2pages/slide]
Dynamic Programming algorithms [PDF 2pages/slide]
Pattern Matching algorithms [PDF 2pages/slide]
Network flow algorithms [PDF 2pages/slide]
-
Academic dishonesty: Cheating
will be strongly punished (typically
with an F in the course). You can
report cheating anonymously at:
https://www.cs.ucr.edu/cheating/. Assignment
submissions must represent your
original work. Copying from any
sources (web, other books, past or
current students, etc.) is strictly
prohibited. While discussing
assignments together is
encouraged, pooling common answers
is not allowed. Be aware that a
subset of exams may be photocopied,
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
writing and 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.
-
Cell phones: During lectures
please turn off your
cell phone. During exams, cell phones
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 upper-case 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. Any
problem with grading of a written
assignment should be addressed at the
latest two weeks after the
assignment is returned to you.
Course mailing list
(send mail now or
access the archive): Be sure to sign up to receive important
announcements, which will be made only through the course email list. You
must use your CS or EE account, or else some other UCR account, so be sure to
learn how to read those accounts or at least automatically forward messages to
your personal email address (just create in your home directory a file named
".forward" containing your personal email address).