EECS 4101/5101, Fall 2022
EECS 4101/5101: Advanced Data Structures
Fall 2022
Web page contents:
General Information
Announcements
Important Dates
Resources
Reading
Course Handouts
General Information
Instructor: Eric Ruppert
Email: [my last name]@eecs.yorku.ca (Please use a York email account when sending me email, and start your subject line with "[4101]" or "[5101]".)
Lectures: Tuesdays and Thursdays 17:30-19:00 in room 224 of Stong College.
Office Hours: Tuesdays 19:00-20:00 in lecture room; Thursdays 14:00-15:00 in person in my office or via zoom link on eclass; or by appointment; or drop by my office when I'm there.
Learning Outcomes
In this course, you will be invited to develop your ability to think clearly and carefully about data structures and the algorithms that operate on them, and to improve your skills in expressing those thoughts about data structures in a precise way.
Data structures are a crucial component of most computer applications. Understanding them is a key ingredient for writing correct and efficient computer programmes.
By the end of this course, you will be able to do the following things.
-
Describe important classes of data structures (dictionaries, priority queues, disjoint set union) and explain how they work.
Before trying to design your own data structures, it is important to be aware of a good collection of classical ones. They are useful in their own right, but the ideas that underlie them are also useful for new data structures.
-
Augment data structures to expand their functionality.
If one of the standard data structures doesn't work for the task at hand, it is useful to be able to tweak an existing one to fit your purpose.
-
Analyze the efficiency of data structures, including the use of amortized analysis and online competitive analysis.
In many cases, there are multiple data structures that could be used to solve a problem. In some cases, it is important to be able to analyze the different options and choose the one that will solve the problem most efficiently. Amortized and competitive analysis are two special types of analysis that are useful in some settings.
-
Demonstrate knowledge of important themes in data structure design such as persistence, self-adjustment, concurrency.
This course is not just about going through a catalogue of data structures. Certain ideas can be applied in the construction of many different data structures, and we want to understand those concepts too. Persistence deals with maintaining multiple versions of stored data so that old versions can be accessed when needed. Self-adjustment is used instead of carefully rebalancing data structures to improve the shape of the data structure in response to the sequence of operations performed on it. Concurrent data structures allow multiple threads to access the data simultaneously.
-
Select or design appropriate data structures to help solve problems for algorithmic applications.
The ultimate goal is to ensure that you can find (or build) the right data structure for whatever task you want to solve. You should also be able to justify your design choices and explain why the algorithms that operate on the data structures are correct.
How to Learn This Material
Much of the material in this course is in the same vein as the material of EECS3101. To develop your understanding of the material, it is important to do more than just read the textbook and attend lectures: you must work through exercises.
You can often learn by struggling with problems. However, if you get too stuck or don't know how to begin, help is available. Talk to your classmates (however; see the notes below about academic honesty regarding discussing assignment problems with others). Use the office hours; the instructor is there to help you! You also learn by making mistakes and getting feedback about those mistakes. Just make sure that you use the feedback to improve your understanding.
Groups of students can learn a lot by explaining their solutions to the suggested exercises from the textbook to one another and critiquing the solutions of others. After all, learning how to explain solutions clearly is one of the goals of this course. Seeing where other students' solutions are unclear to you helps you make your own explanations clearer. Be aware that a problem may have many different correct solutions; just because someone's solution is different from yours doesn't necessarily mean that one of them is wrong.
It takes time to build new skills, so it helps if you work on exercises regularly: don't leave all the work to the days right before a test. Similarly, some of the homework assignments will be difficult to finish if you leave them to the last minute.
Academic Honesty
The key to academic honesty for this course is simply this: Solutions that you submit should be your own work.
Although you may discuss the general approach to solving a homework problem
with other people, you should not discuss the solution in detail.
You must not take any written notes away from such a discussion.
Also, you must list on the cover page of your solutions any
people with whom you have discussed the problems.
The solutions you hand in should be your own work. While
writing them, you may look at the course textbook and your own
lecture notes but no other outside sources.
It is not acceptable to try to find the answer to a homework question on the web, put it in your own words and submit it. You may learn a little by doing this, but you will learn much, much more by working on the problem yourself, and the purpose of this course is to help you learn how to design and analyze data structures on your own.
Furthermore, the web will not be available during your exam (or during your job interview at Google), so you should learn to solve problems yourself, instead of relying on others to do your thinking for you.
As time runs out, students are sometimes tempted to get help from other students on assignments in a way that would violate the preceding policy on academic honesty. DO NOT DO THIS! If you do, I will refer the case to the Dean's Office, which is unpleasant for everyone. The assignments are worth very little, so it is not worth risking a sizable punishment. (Furthermore, I have noticed that the students who cheat on the homework assignments almost always fail the tests and exams, so even if I do not catch you cheating, you will likely fail the course if you do not do your own work on the homework assignments.)
It is important that you look at the departmental
guidelines
on academic honesty.
Marking Scheme
| EECS4101 | EECS5101 |
Homework exercises | 20% | 20% |
Test 1 | 20% | 15% |
Test 2 | 20% | 15% |
Wikipedia assignment (EECS5101 only) | 0% | 10% |
Exam | 40% | 30% |
It's a very good idea to type your solutions to homework assignments, since it allows you to edit and polish the answers, but handwritten solutions are also acceptable, as long as they are legible. If you want to type your solutions, LaTeX produces elegantly typeset documents, is available for free, and was built to handle even the most complicated mathematical notation. It can take a while to learn how to use it, but once you do, you will probably not want to type documents any other way.
You should make every effort to make your answers as brief as possible, while still being thorough. Brevity requires careful thought and editing. (Pascal once excused himself for writing a long letter, saying that he did not have enough time to write a shorter one.) Students who write copious amounts usually do not know what they want to say, or are saying it in a very disorganized way.
Usually, an answer to a homework question should fit on one sheet of paper. If you are writing much more than that, you probably have not found the best way to solve it. On tests, your answer should usually fit into the space provided for it.
Announcements
- Dec 2: Extra office hours before exam: I'll be available in my office on Mon Dec 5 from 14:00-15:00, Thu Dec 8 from 14:00-16:00. The lecture on Tue Dec 6 is also an opportunity for you to ask questions about the course. I will be around other times during the week (except probably not much on Wednesday) if you want to drop by or set up an appointment.
- Dec 1: For information about summer research projects for undergraduates, see this link.
- Nov 24: Please fill out a course evaluation. It is useful for me to get feedback from students. If at least 80% of the class completes the course evaluations, then I will drop your lowest homework assignment mark when computing final grades.
- Nov 21: Solutions to Assignment 7 are posted on the eclass website.
- Nov 18: Prior to test 2, I will have some additional office hours on Monday, Nov 21, 15:00-16:00 and Tuesday, Nov 22, 12:00-13:00, both in Lassonde 3052.
- Nov 17: Today's class will be online. A zoom link was sent to you by email.
- Nov 16: Bethune College has a "Coffee with Profs" event with a focus on exam preparation. You can also book a free one-on-one academic skills appointment with Bethune's learning strategies coach via this link.
- Nov 16: I posted some notes on splitting B-trees on the course's eclass site.
- Nov 16: You will be allowed one 8.5x11-inch sheet of paper with handwritten notes on both sides for test 2.
- Nov 6: I forgot to mention in my solutions to Assignment 4 that this assignment was based on the paper "On Finding Lowest Common Ancestors in Trees" by Aho, Hopcroft, Ullman from 1973. (All three authors are Turing Award winners.)
- Oct 28: A student pointed out an error in Assignment 4. The LINK(r,s) routine should have a third argument d_y, and the call to LINK on line 38 should
pass d_y as an argument. In other words, you can use the value d_y
returned by the call to FIND on line 37 inside the LINK routine.
- Oct 27: Celebrate Ada Lovelace Day with a wikipedia edit-a-thon. See this link for details.
- Oct 20: The exam schedule has been posted. The EECS4101 exam is quite early in the schedule, so don't leave studying for it to the last minute.
- Oct 8: In the solution to Assignment 2 that I handed out, line 16 and line 17 of the pseudocode should be swapped. The +1 on line 4 should be deleted.
- Oct 6: For test 1, you may bring one 8.5-by-11-inch sheet of paper with handwritten notes on one side of the page.
- Oct 6: Unusual office hours during reading week will be Tue 17:30-18:30 via zoom link in eclass, Thu 14:00-15:00 in my office.
- Sept 27: Due to popular demand, deadlines for assignments will be on Fridays instead of Wednesdays. Friday office hours will be changed to Thursdays at 2pm, starting in October.
- Sept 20: Due to popular demand, deadlines for assignments will be at 23:59 instead of 17:00.
- Sept 16: Clarification for assignment 1, questions 2(b) and 3(b) are asking for a tight bound on the worst-case time for a sequence of m operations. Correction to assignment 1, question 3: the counter should support three operations, Increment, Decrement and Double.
- Sept 15: Today's class will be online. The Zoom link was sent to you by email, and posted on eclass.
- See this link for information about returning to in-person classes during the pandemic. Summary: York is strongly encouraging wearing masks in indoor settings (such as classrooms) and receiving a complete vaccine series to protect everyone's health. Don't come to campus if you are feeling unwell.
Important Dates
First class | Thursday, September 8 |
Reading week (no classes) | October 8-14 |
Test 1 | October 20 in Accolade West 006 |
Last date to drop course without receiving a grade | Friday, November 11 |
Test 2 | November 22 in Accolade West 006 |
Last class | Tuesday, December 6 |
Last date to withdraw from course (receiving W on transcript) | Wednesday, December 7 |
Exam period | December 8-23 |
Resources
Textbook
- Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest and
Clifford Stein, Introduction to Algorithms, 4th edition,
MIT Press & McGraw-Hill, 2022. For solutions to some of the textbook's exercises and known bugs in the text, see the textbook's web page.
You can access an electronic version of the textbook through the York Library website.
If you have the older third edition of the book, that's fine.
Other References
- Gonzalo Navarro, Compact Data Structures, Cambridge University Press, 2016.
- Peter Brass, Advanced Data Structures, Cambridge University Press, 2008. Available online through York library.
- Ronald L. Graham, Donald E. Knuth, and Oren Patashnik, Concrete
Mathematics: A Foundation for Computer Science (2nd edition),
Addison-Wesley, 1994.
- Pat Morin, Open data structures.
- Hanan Samet, Foundations of Multidimensional and Metric Data Structures, Elsevier/Morgan Kaufmann, 2006.
- Clifford A. Shaffer, Data Structures and Algorithm Analysis, edition 3.2.0.10, 2013.
- Daniel Solow, How to Read and Do Proofs (6th edition), Wiley, 2013.
Reading
This section will be filled in as the term progresses.
Don't fall behind with your reading.
Date | Topics | Reading in CLRS (4th ed) | Suggested questions, mostly from CLRS (4th ed) | Equivalent reading in CLRS (3rd ed) | Equivalent questions in CLRS (3rd ed) |
Sep 8 |
Introduction |
partial notes |
|
|
|
Sep 13 |
Aggregate Analysis |
16.1 |
16.1-1 to 16.1-3, 16-2 |
17.1 |
17.1-1 to 17.1-3, 17-2 |
Sep 15 |
Accounting Method |
16.2 |
16.2-1 to 16.2-3 |
17.2 |
17.2-1 to 17.2-3 |
Sep 20 |
Potential Method |
16.3 |
16.3-1 to 16.3-6 |
17.3 |
17.3-1 to 17.3-7 |
Sep 20 |
Dynamic Tables, including eager doubling/halving (not in text) |
16.4 |
16.4-4 |
17.4 |
17.4-3 |
Sep 22 |
Binomial Heaps |
handout |
handout: 19.1-2, 19.2-1 to 19.2-4 |
|
|
Sep 27 |
Fibonacci Heaps |
19 in removed material |
from removed chapter: 19-2, 19.2-1, 19.3-2, 19.4-1, 19.4-2, 19-3 |
19.0 |
19-2, 19.2-1, 19.3-2, 19.4-1, 19.4-2, 19-3 |
Oct 4 |
Union-Find Data Structures |
19 |
19.2-1, 19.3-1, 19.3-2, 19.3-3, 19.3-4, 19.3-5, 19-1, 19-2, 19-3 |
21 |
21.2-1, 21.3-1, 21.3-2, 21.3-3, 21.3-4, 21.3-5, 21-1, 21-2, 21-3 |
Oct 25 |
Binary Search Trees (quick review from EECS2011) |
12.1-12.3 |
12.1-3, 12.1-5, 12.2-4, 12.2-7, 12.3-3, 12-2 |
12.1-12.3 |
12.1-3, 12.1-5, 12.2-4, 12.2-7, 12.3-3, 12-2 |
Oct 25 |
Random BSTs |
12.4 in removed material (Randomly Built BSTs) |
12.4-2, 12.4-3, 12-3 |
12.4 |
12.4-2, 12.4-3, 12-3 |
Nov 1 |
Red Black Trees |
13 |
13.1-4, 13.1-6, 13.1-7, 13.1-8, 13.2-4, 13.3-2, 13.3-3, 13.4-4, 13.4-7, 13.4-8, 13.4-9, 13-3 |
13 |
13.1-4, 13.1-6, 13.1-7, 13.2-4, 13.3-2, 13.3-3, 13.4-3, 13.4-6, 13.4-7, 13-3, 13-4, 17-4 |
Nov 8 |
Augmenting Data Structures |
17 |
17.1-3, 17.1-5, 17.2-1, 17.2-2, 17.2-3, 17.3-5, 17-1, 17-2, 16-3 |
14 |
14.1-3, 14.1-5, 14.2-1, 14.2-2, 14.2-3, 14.2-4, 14.3-6, 14-2, 17-3 |
Nov 10 |
B-Trees |
18 |
18.1-2, 18.1-3, 18.1-4, 18.2-1, 18.2-6, 18-1 |
18 |
18.1-2, 18.1-3, 18.1-4, 18.2-1, 18.2-6, 18-1 |
Nov 15 |
Hashing |
review 11.1 and 11.2; read 11.3, Section 11.5 from removed material (Perfect Hashing) |
11.1-4, 11.3-1, 11-4
|
review 11.1 and 11.2; read 11.3, 11.5 |
11.1-4, 11.3-1, 11-4 |
Nov 29 |
Lock-free data structures |
Some slides (we won't cover all of them) |
|
|
|
Course Handouts

Updated December 2, 2022