CS 218: Design and Analysis of Algorithms
Winter Quarter, 2014
(Mar 14) Problems discussed in class posted
(Mar 11) Final time/location CHANGED back to the original time/place
(Mar 10) Homework 4 solution posted
(Mar 8) Final syllabus posted
(Mar 4) Dyn Programming slides updated
(Mar 4) Network flow slides posted
(Mar 4) Homework 3 solution posted
(Mar 4) Homework 5 posted
(Feb 25) Dynamic Programming slides posted
(Feb 25) Midterm and solutions posted
(Feb 18) Problems presented in class posted
(Feb 18) Greedy slides updated
(Feb 10) Mock exam (midterm) posted w solutions
(Feb 10) Midterm syllabus posted
(Feb 10) Homework 2 solution posted
(Feb 3) Homework 3 posted
(Jan 28) Greedy slides posted
(Jan 28) Homework 1 solution posted
(Jan 23) Homework 2 posted
(Jan 16) Divide and conquer slides posted
(Jan 15) Entrance quiz (w solutions) posted
(Jan 10) Homework 1 posted
(Jan 10) Entrance exam slides posted
(Jan 1) Happy New Year
Lecture Schedule
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.
Instructor:
Stefano Lonardi (stelo AT cs.ucr.edu)
Office hours: Tuesday 3:40-4:40pm. Office: Chung Hall 325.
Teaching Assistant:
Rachid Ounit (rouni001 AT ucr.edu)
Office hours: Thursday 3:40-4:40pm. Location: Chung Hall 110.
Lectures:
TR, 2:10pm-3:30pm 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.
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
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: linear-time selection, Strassen, FFT, Integer multiplication
Dynamic programming: Subset sum, LCS, matrix chain multiplication, Floyd-Warshall
Graph algorithms: Network Flow and Bipartite Matching
(time permitting) Numerical algorithms: primality testing, RSA
(time permitting) Advanced Data structures: binomial heaps and Fibonacci heaps, splay trees
Actual list of topics
Jan 7: Course overview, Analysis of Algorithms (1-27)
Jan 9: Analysis of Algorithms (28-53) [HW1 posted]
Jan 14: Analysis of Algorithms (54-63) [Entrance quiz]
Jan 16: Analysis of Algorithms (64-end), Divide and Conquer (1-15)
Jan 21: Divide and Conquer (16-28)
Jan 23: Divide and Conquer (29-73) [HW1 due, HW2 posted]
Jan 28: Divide and Conquer (74-end)
Jan 30: Greedy (1-29)
Feb 4: Greedy (30-71, skipped Huffman codes)
Feb 6: Greedy (72-88) [HW2 due, HW3 posted]
Feb 11: Greedy (89-)
Feb 13: Union-Find (-end)
Feb 18: Midterm Prep
Feb 20: [Midterm (80mins, in class, closed book, closed notes)][HW3 due, HW4 posted]
Feb 25: Midterm review, Dynamic Programming (1-24)
Feb 27: Dynamic Programming (25-53)
Mar 4: Dynamic Programming (68-end)
Mar 6: Network Flow (1-30)[HW4 due, HW5 posted]
Mar 11: Network Flow (31-end)
Mar 13: Review
Mar 19: Final [HW5 due] & [Final (MSE 103, 8am-11am, closed book, closed notes)]
Slides
Intro [PDF 2pages/slide]
Algorithm Analysis [PDF 2pages/slide]
Divide and Conquer algorithms [PDF 2pages/slide]
Greedy algorithms [PDF 2pages/slide, updated Feb 18]
Dynamic Programming algorithms [PDF 2pages/slide, updated Mar 4]
Network flow algorithms [PDF 2pages/slide]
Python
Python examples
-
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 high-level 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.
-
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.