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, 3-6PM 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. 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: Monday 3:10-4:00pm. Office: Chung Hall 325.
Teaching Assistant:
Tin Vu (tvu032@ucr.edu)
TBA's office hours: Tuesday 4-5pm. Location: Chung Hall 110.
Lectures:
MWF, 10:10am-11: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, 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
Divide and conquer: linear-time selection, Strassen, FFT, Integer multiplication
Randomized: selection in expected linear time, polynomial verification
Greedy: task scheduling, factional knapsack, Huffman codes, Dijkstra, Prim, Kruskal
Union-Find: list and tree implementation, union by rank and path compression, analysis
Dynamic programming: Subset sum, LCS, matrix chain multiplication, Floyd-Warshall
Graph algorithms: Network Flow and Bipartite Matching
Actual list of topics
F, Sep 28: Course overview, Analysis (1-12)
WEEK 1
M, Oct 1: Analysis (13-28)
W, Oct 3: Analysis (29-42) [HW1 posted]
F, Oct 5: Analysis (43-56)
WEEK 2
M, Oct 8: Analysis (57-60) [Entrance quiz (30mins, in class, closed book, closed notes)]
W, Oct 10: Analysis (61-end) [HW1 due, HW2 posted]
F, Oct 12: Divide and Conquer (1-11)
WEEK 3
M, Oct 15: Divide and Conquer (12-26)
W, Oct 17: Divide and Conquer (27-41) [HW2 due, HW3 posted]
F, Oct 19: Divide and Conquer (42-65)
WEEK 4
M, Oct 22: Divide and Conquer (66-73)
W, Oct 24: Divide and Conquer (74-end) [HW3 due]
F, Oct 26: Greedy (1-22)
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 post-review, Greedy (23-35)
WEEK 6
M, Nov 5: Greedy (50-58)
W, Nov 7: Greedy (35-46)[HW4 due, HW5 posted]
F, Nov 9: Greedy (47-49, 59-76)
WEEK 7
M, Nov 12: HOLIDAY - Veterans' day
W, Nov 14: Greedy (77-87, 100-end, skipped 88-99), Dynamic programming (1-7) [HW5 due, HW6 posted]
F, Nov 16: Dynamic programming (7-27)
WEEK 8
M, Nov 19: Dynamic programming (28-43)
W, Nov 21: Dynamic programming (44-66)[HW6 due]
F, Nov 23: HOLIDAY - Thanksgiving
WEEK 9
M, Nov 26: Dynamic programming (67-end), 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 post-review[HW7 due]
F, Dec 7: Final review
FINALS' WEEK
M, Dec 10, 3-6PM: 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 hand-drawn), 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 turned-in 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 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 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 upper-case 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.