EECS 3101Z, Winter 2023

EECS 3101Z: Design and Analysis of Algorithms
Winter 2023

Web page contents:

General Information
Announcements
Important Dates
Resources
Reading
Course Documents

General Information

Instructor: Eric Ruppert
Office: Room 3052 of the Lassonde Building
Telephone: (416) 736-2100 ext. 33948
Lectures: Mondays and Wednesdays, 14:30-16:00 in room 105 of Life Sciences Building
Tutorials: Fridays, 14:30-16:00 in room 105 of Life Sciences Building
Email: [my last name]@cse.yorku.ca (Please use a York email account when sending me email, and start your subject line with "[3101]".)
Professor's Office Hours: Mondays 16:10-17:00 and Wednesdays 11:40-12:30 in Lassonde 3052 (or send email to make an appointment at other times)

Learning Outcomes

In this course, you will be invited to develop your ability to think clearly and carefully about algorithms, and to improve your skills in expressing those thoughts about algorithms in a precise way. Algorithms lie at the heart of computer science; in fact, some would say that computer science is the study of algorithms, so this course plays a central role in your education as a computer scientist. By the end of this course, you will be able to do the following things.

How to Learn This Material

Some of the skills that you will develop in this course may be quite new to you, and different from things you have done in previous courses. This is good: it means you're learning new and (I hope) exciting things. However, it means that you will need practice to master them. Just participating in classes isn't enough. There are suggested exercises from the textbook. Web pages for this course in previous terms also include many more problems to work on. The books listed below under "Additional Resources" include more exercises. Do lots.

You 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). Go to office hours; the instructor and TA are there to help you! You also learn by making mistakes and getting feedback about them. 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 learning objectives 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.

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 algorithms 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 will be very unpleasant for you. 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

Homework exercises 15%
Quiz5%
Test #1 20%
Test #2 20%
Exam 40%

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

Important Dates

First class Monday, January 9
Quiz Friday, January 27
Test 1 Friday, February 10
Reading week (no classes) February 20-24
Last date to drop course without receiving a gradeFriday, March 17
Test 2 Wednesday, March 22
Good Friday (no class) Friday, April 7
Last class Monday, April 10 (Friday schedule)
Last date to withdraw from course (receiving W on transcript)Monday, April 10
Exam period April 12-27

Resources

Textbook

Optional Supplementary Reading

Other References

Web Links

Reading

This section will be filled in as the term progresses. Don't fall behind with your reading.

DateTopics Reading in CLRS (4th ed) Suggested questions, mostly from CLRS (4th ed)
January 9 Introduction 1; optional supplementary reading: Boyer-Moore algorithm and notes on correctness 1-1
January 11 Proving loops correct. Two examples of multiplication algorithms. 2.1, 2.2 2.1-2, 2.1-4, 2.1-5, 2.2-2, 2.2-4
January 13 Example of proving loop correct: binary search Section 5.1 of Parberry's book
January 16 Euclid's algorithm, recursive algorithms 2.3, 31.2 up to Lame's Theorem 31.2-8, 2.3-2, 2.3-3, 2.3-5 to 2.3-8
January 18 Proving recursive algorithms correct. Examples: repeated squaring, binary search 2.3.1, p.934-935, 2-3, Section 5.2 of Parberry's book
January 20 Review of asymptotic notation, examples of proofs of correctness 3 3.2-1, 3.2-2, 3.2-3, 3.2-5, 3.3-8, 3-2
January 23 Divide and Conquer 4.0-4.2, time bound for fast multiplication 4.1-3, 30-1
Jan 25 Analyzing divide-and-conquer algorithms 4.3-4.5 4.3-1, 4.4-1, 4.5-1
Jan 30 Linear time selection 9.1, 9.3 (and skim 9.2) 9.1-1, 9.1-2, 9.1-3, 9.3-1, 9.3-6, 9.3-7, 9.3-8, 9.3-9, 9.3-10, 9-1
Feb 1 Finding the closest pair of points; Sorting lower bound Section 33.4 (in chapter on Computational Geometry) from removed material, 8.1 33.4-1, 33.4-6 in removed material; 8.1-1, 8-6
Feb 3 Review of sorting techniques pages 157-204 (this should be a review) 6.1-1 to 6.1-6, 6.2-7, 6.4-2, 6.4-4, 6.5-7, 6-2, 7.2-4, 7.3-1, 7-1, 7-2
Feb 6 Counting Sort, Radix Sort 8.2, 8.3 8.2-1, 8.2-3, 8.2-5, 8.2-6, 8.2-7, 8.3-2, 8.3-4, 8.3-5, 8-2, 8-3
Feb 8 Bucket sort Use C.2, C.3 as references if you need to look up something about probability. 8.4 8.4-1, 8.4-2, 8.4-5
Feb 13 Greedy algorithms 15.1, 15.2 15.1-2, 15.1-3, 15.1-4, 15.2-1, 15.2-4, 15.2-5
Feb 15 Greedy algorithms, continued 15.3, 15.4 15.4-1, 15.4-2, 15-2
Feb 17 Minimum Spanning Trees 20.1, 21 21.1-1, 21.1-6, 21.1-7, 21.2-2, 21.2-4, 21.2-5
Mar 1 MSTs continued: Implementing Kruskal; Prim's algorithm
Mar 3 Implementing Prim, Fractional Knapsack
Mar 6 One-dimensional Dynamic Programming (canoe rental, rod cutting) 14.1 14.1-2, 14.1-3, 14.1-6, 14-4, 14-11
Mar 8 Two-dimensional Dynamic Programming 14.2-14.4 14.2-1, 14.2-3, 14.3-3, 14.3-4, 14-2
Mar 10 Examples of dynamic programming 14.4-1, 14.4-5, 14.9
Mar 13 Dynamic programming, continued
Mar 15 More examples of dynamic programming
Mar 20 All pairs shortest paths, including Floyd-Warshall algorithm 23.1, 23.2 23.1-3, 23.1-7, 23.1-8, 23.2-4, 23.2-5
Mar 24 Single-source shortest paths using Dijkstra's algorithm 22.0, 22.3 22.3-2, 22.3-3, 22.3-5, 22.3-7, 22.3-9
Mar 27 Graph Algorithms 20.1, 20.2 20.1-1 to 20.1-6, 20.1-8, 20.2-2, 20.2-4, 20.2-6, 20.2-7
Mar 29 Graph Algorithm 20.3, 20.4 20.3-1, 20.3-2, 20.3-4, 20.3-7, 20.3-8, 20.3-10, 20.3-11, 20.4-2, 20.4-3, 20.4-5
Mar 31 Strongly connected components 20.5 20.5-1, 20.5-3, 20.5-7
Apr 3 Maximum Flow 24.1, 24.2 24.1-2, 24.1-6, 24.1-7, 24.2-2, 24-1

Course Documents

Updated April 7, 2023