CPSC 221: Basic Algorithms and Data Structures
2014 Summer Term 1
Administration


Home Learning Goals Schedule Administration Readings Lab/Lecture Notes Assignments Computing

Description: Design and analysis of basic algorithms and data structures; algorithm analysis methods, searching and sorting algorithms, basic data structures, graphs.

For information on prerquisites, corequisites, and the like, please see the UBC calendar entry for CPSC 221.

Texts:

Office hours: See schedule


Labs: Labs are required and marked. Lab writeups may contain a "Pre-Lab" section, which you must complete before the lab! You should aim to finish your lab and get it marked by the end of your registered lab session, but if necessary, you may continue to work on it afterwards. To get credit for the lab, though, you must get it marked by the beginning of the next lab session in the lab section in which you are registered. You may not make-up missed labs by attending a lab section in which you are not enrolled.

Labs will introduce C++; however, as 2nd year students, much of the responsibility of learning the new language will fall on you. If you need C++ programming resources, check the textbook section of the website.

Evaluation:
Your final course mark will be based roughly on the following breakdown. The staff reserves the right to change this scheme (but do not anticipate using that right).

Labs 10%
"Assignments"10%   Computed as max(assignments, midterm, final)
"Midterm"30%   Computed as max(midterm, final)
Final Exam50%

To pass the course, you must obtain a 50% overall mark and, in addition, you must pass the final exam. Students who fail the final exam will receive as their course grade the minimum of their normally computed grade and 45%.

Approximate Topic Schedule:

Topics Readings from the Koffman text Readings from the Epp text (4th edition)
Background that you're supposed to already know
Basics: Ch 1
Functions: 7.1, 7.2, 7.3, 11.1
Induction: 5.2, 5.3, 5.4
Logic: Ch 2
Proofs: Ch 4
Quantifiers: Ch 3
Sets: 1.2, 6.1, 6.2, 6.3
Week 1
May 12-16
Overview;
Linked lists, stacks, and queues; Introduction to algorithm analysis
Lists: 4.5
Stacks: 5
Queues: 6.1-6.3
Big-O: Ch 2.6
Optional: Iterators 4.6-4.7
Analysis of algorithms: 4.8, 11.3
Big-O Notation: 11.2
Summations: 5.2
Week 2
May 19-23
Big O, Big Omega, Big Theta; Summations; Induction; Recursion; Recurrence Relations Big-O: Ch 2.6
Recursion: 7
Analysis of Binary Search: 11.4, 11.5
Big-O Notation: 11.2
Recurrence Relations: 5.7
Recursion: 5.6
Summations: 5.2
Week 3
May 26-30
Runtime Analysis; Recursion; Correctness of Recursive Algorithms; Loop invariants
Trees, tree traversal, and binary search trees
Recursion: 7
Insertion Sort: 10.4
Trees: 8.1-8.4
AVL Trees: 11.1-11.2
Correctness of Algorithms: 5.5
InsertionSort: 11.3
Logs: 7.1, 7.2, 11.4
Trees: 10.5, 10.6
Week 4
June 2-6
Note: midterm in class June 4
Review
Dictionaries: Successor, FindClosest, RangeQuery
Priority Queues: Implemented with arrays or AVL trees
PQSort
Priority Queues: pp. 489-490
Dictionaries (=Maps): 9.2, 9.6
Week 5
June 9-14
B-Trees
Sorting: Select, Insert, Merge, Quick
Hashing
B-Trees: 11.4-11.5
Sorting: 10.2, 10.4, 10.7, 10.9
Hashing: 9.3-9.5
Week 6
June 16-20
Graphs
Counting
Review
Graphs: Ch 12 Graphs: Ch 10
Counting: 9.1-9.6
Week 7
June 23-27
Exam, Thursday June 26


Communication: Most electronic communication should go to the discussion area on Piazza. (You are expected to read the Announcements on Piazza daily! Personal questions or those that might violate academic conduct standards if posted should go to cs221@ugrad.cs.ubc.ca for response by any staff member or to the individual staff member you wish to contact (see the home page).

Assignments: There will be roughly three programming assignments and three written assignments during the term.

Exams: There will be one midterm exam and one final exam.

Academic Conduct:

Collaboration enhances the learning experience. We encourage collaboration in various ways throughout the course, subject to the rules stated here:

Violation of any of these rules constitutes academic misconduct and is subject to penalties ranging from a grade of zero on a particular assignment to indefinite suspension from the University. If you are uncertain as to what is or is not reasonable collaboration, please contact the instructor. If you are having problems understanding or keeping up with the material, please contact your instructor or TA to discuss how we can fix the problem. Don't cheat!

 
cs221@ugrad.cs.ubc.ca