
Data Structures and Algorithms (call #12071)
Algorithm analysis (asymptotic complexity, bigO
notation, bigomega notation, induction, recurrence
relations), algorithm design (divide and conquer,
greedy, dynamic programming), string matching
algorithms (KMP), graph algorithms (connectivity,
minimum cost spanning tree, singlesource shortest
path, allpairs shortest path), 24 trees, NP
completeness
Download syllabus
Instructors
John Cleary (john AT cs.ucr.edu)
Stefano Lonardi (stelo AT cs.ucr.edu)
Course Format and Grading
Two 80 minutes lectures and threehour lab per week
Tests (65%)
Midterm (25%)
Final (40%)
Assignments (35%)
Two programming assignment (10% + 15%)
Two written assignment (10%)
To ensure minimum competency in successive courses requiring a C or better in this course, the following grading scheme will be used:
regardless of the components' weighted sum, a C in both tests and assignments is necessary to achieve a C or better in the course;
otherwise, the final course grade will be a D+ or less. For example, a B in the assignments and a D in the tests might
yield a weighted sum of a C, but would instead result in a final course grade of D+.
Prerequisites
CS 14 (C or better)
MATH 009C or MATH 09HC
MATH 112
Ability to program in C++
Class Meetings
Section 001: Tue/Thu 3:40pm5:00pm OLMH 1208
Section 002: Tue/Thu 5:10pm6:30pm STAT B650
Lab Meetings
(021) Mon 11:10am2pm SURGE 171 (Ann Ratanamahatana, ratana AT cs.ucr.edu)
(022) Tue 11:10am2pm SURGE 171 (Theodore Ilie, theo AT cs.ucr.edu)
(023) Thu 11:10am2pm SURGE 171 (Yu Luo, yuluo AT cs.ucr.edu)
(024) Wed 8:10am11am SURGE 172 (Fu Zheng, zfu AT cs.ucr.edu)
(025) Fri 8:10am11am SURGE 171 (Qing Zhang, qzhang AT cs.ucr.edu)
Workload
This is a fourunit course. As such, you should expect to
spend the following approximate amount of time:
3 hours/week attending the lectures
3 hours/week attending the lab sessions
6 to 10 hours/week doing individual study (readings, homeworks, programming, lab preparation, etc.)
Please do not underestimate the time you will need to
spend on this course. These are real time amounts spent by
average successful past students.
Office hours
John Cleary: Mon/Wed 12:30pm1:30pm, SURGE 348
Stefano Lonardi: Wed/Fri 4:305:30pm, SURGE 320
TAs office hours
TA office hours are held in SURGE 282
Ann Ratanamahatana: Mon 9am11am
Yu Luo: Thu 10am11am
Qing Zhang: Fri 11am12pm
Theodore Ilie: Tue 10am11am
Fu Zheng: Wed 2pm3pm
Workshop
CS141 Academic Excellence Workshop
Textbook
Algorithm Design (Foundations, Analysis, and Internet Examples) by Michael T. Goodrich and Roberto Tamassia, Wiley.
References
Introduction to Algorithms (2nd Edition) by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Cliff Stein, MIT Press.
Data Structures and Algorithms in JAVA (2nd edition) by Michael T. Goodrich and Roberto Tamassia, Wiley.
Tentative list of topics
Jan 7: Course overview, analysis of algorithms
Jan 14: Discrete math for algorithm analysis
Jan 21: Greedy approach for algorithm design
Jan 28: Divide and conquer, dynamic programming
Feb 4: Graphs, and their representation
Feb 11: Graph traversal, connectivity
Feb 18: Minimum cost spanning tree, singlesource shortest path
MIDTERM (Feb 18, in class, closed book, closed notes)
Feb 25: Allpais shortest path
Mar 4: String matching, KMP
Mar 11: NP completeness, review
FINAL (Sec 1: Mar 19, 3pm6pm, OLMH 1208  Sec 2: Mar 18, 7pm10pm, STAT B650)
Actual list of topics
Jan 7: Course overview, Algorithm Analysis (slides pp.122) [Stefano]
Jan 9: Algorithm Analysis (slides pp.2344) [Stefano]
Jan 14: Algorithm Analysis (slides pp.4577) [Stefano]
Jan 16: Algorithm Analysis (slides pp.7895) [Stefano]
Jan 21: Algorithm Analysis (slides pp.95113) [Stefano]
Jan 23: Algorithm vs. Specific Implementation, Data Packing, Bitwise Operators and Masks [John]
Jan 28: Greedy Algorithms (change machine, map colors, scheduling, Huffman) [John]
Jan 30: Divide and Conquer Algorithms [John]
Feb 4: Divide and Conquer Algorithms (Strassen), Dynamic programming (Fibonacci, Pascal's triangle) [John]
Feb 6: Dynamic programming (StageCoach problem, Probability Maximization, Project Planning) [John]
Feb 11: Graphs (slides pp.143) [Stefano]
Feb 13: Graphs (slides pp.4468) [Stefano]
Feb 18: MIDTERM (in class, closed book, closed notes)
Feb 20: Graphs (slides pp.6998) [Stefano]
Feb 25: Graphs (slides pp.99end), Strings (slides pp.19) [Stefano]
Feb 27: Weighted Graphs (slides pp.118) [John]
Mar 4: Weighted Graphs (C++ Review) [John]
Mar 6: Weighted Graphs (slides pp.1936) [John]
Mar 11: Weighted Graphs (slides pp.3772) [John]
Mar 13: 24 trees [John]
Mailing list and Newsgroup
Register to CS141 mailing list with your CS account
or read the newsgroup
Slides (not available anymore) (Notes: if you use Internet Explorer rightclick on the slides, "Save Target As...", and open the files from the hard disk. If you use Netscape, rightclick and select "Save Link As ...", and open the files from the hard disk)
Slides [PDF Format 3 slides/page] (Course Overview)
Slides [PDF Format 2 slides/page] (Course Overview)
Slides [PDF Format 3 slides/page] (Algorithm Analysis)
Slides [PDF Format 2 slides/page] (Algorithm Analysis)
Slides [PDF Format 3 slides/page] (Divide and conquer, greedy, dynamic programming)
Slides [PDF Format 2 slides/page] (Divide and conquer, greedy, dynamic programming)
Slides [PDF Format 3 slides/page] (Graphs)
Slides [PDF Format 2 slides/page] (Graphs)
Slides [PDF Format 3 slides/page] (Weighted Graphs)
Slides [PDF Format 2 slides/page] (Weighted Graphs)
Slides [PDF Format 3 slides/page] (String Matching)
Slides [PDF Format 2 slides/page] (String Matching)
Slides [PDF Format 3 slides/page] (24 trees)
Slides [PDF Format 2 slides/page] (24 trees)
Cheating policies
The rules of the game
Homeworks (not available anymore)
Homework 1 [PDF] (posted Jan 9, due Jan 23)
Homework 2 [PDF] (posted Feb 7, due Feb 20)
Homework solutions (not available anymore)
Homework 1 solution [PDF] (posted Jan 23, updated Jan 30)
Homework 2 solution [PDF] (posted Feb 21)
Programming assignments (not available anymore)
Project 1 [LINK] (posted Jan 23, due Feb 6)
Project 2 [LINK] (posted Feb 20, due Mar 6)
Programming assignment solutions (not available anymore)
Project solution [.tar.gz] (posted Feb 7)
Practise Questions, Past Exams, etc. (not available anymore)
CS 141 Spring 2002, quiz1 [PDF]
CS 141 Spring 2002, quiz2 [PDF]
CS 141 Spring 2002, hw1 [PDF]
CS 141 Spring 2002, solution hw1 [PDF]
CS 141 Spring 2002, hw2 [PDF]
CS 141 Spring 2002, solution hw2 [PDF]
Practise Questions MIDTERM [PDF]
Midterm Syllabus [LINK]
Final Syllabus [LINK]
Practise Questions FINAL [PDF]
Exams (not available anymore)
Midterm 1/A[PDF]
Midterm 1/B[PDF]
Midterm 2/A[PDF]
Midterm 2/B[PDF]
Tutorials
Kelsey's tutorial on Linux and C++
STL guide
Mumit's STL guide
Tao's tutorial on Recurrence Relations
David's tutorial on Longest Common Subsequence
David's tutorial on Graphs, graph representation, and traversal
David's tutorial on Minimum Spanning Trees
David's tutorial on Shortest Path
Theoretical Computer Science Cheat Sheet [PDF format]
Algorithm Animations
Data Structure Animation
Splay trees animation
Graph Algorithms Animation (Dijkstra, Prim, Kruskal, FordFulkerson)
Animated Algorithms (sorting, priority queues, Huffman, Matrix chain multiplication, MST, Dijkstra)
JAWAA (DFS,BFS)
String matching algorithm animation
Another string matching algorithm animation
Brute Force string matching animation
KMP string matching animation
Suffix tree applet
