COS 216: Algorithms

Spring 2024

[ Current Week | Syllabus | LaTeX resources ]

Basic Information

Calendar

Schedule to be updated throughout the term; topics and exam dates are tentative and subject to change.

Before class, please read the textbook section(s) to be covered. After class, start doing the homework assigned that day as soon as possible. Unless otherwise stated, homework number X is due at the beginning of day X.

WeekMondayWednesdayFriday
11. 02/02 F

1. introduction

1.1 stable matching

- NRMP

hw02: Getting started

hw03: textbook exercises 1.1, 1.2

hw05: 1.5 indifference

22. 02/05 M

2. fundamentals

2.{1,2} algorithmic analysis

hw04: 2.1, 2.2 algorithmic growth

(hw05: 1.5 indifference)

hw06: 2.3 big Oh

As always, show work to justify your answers.

3. 02/07 W

2.4 sorting review

(no new homework assigned)

4. 02/09 F

2.3 data structures review

hw07: 2.6 partial sums

35. 02/12 M

2.5 priority queues review

- heap visualization

hw08: kattis

6. 02/14 W

3. graphs

3.1 graphs review

(no new homework assigned)

7. 02/16 F

3.{2,3} graph traversal

hw09: 3.10 count shortest paths

48. 02/19 M

3.4 bipartite graphs

hw10: 3.2 cycle detection

hw13: reachableroads

9. 02/21 W

3.5 directed graphs

hw11: 3.11 contact tracing

hw12: none, study for exam

10. 02/23 F

4. greedy algorithms

4.1 greedy stays ahead

(hw13: reachableroads)

hw14: 4.3 truck packing

511. 02/26 M

4.2 greedy: exchange argument

hw15: 4.6 triathlon

12. 02/28 W

exam1 (topics and logistics)

13. 03/01 F

4.4 shortest paths: algorithm

hw16: 4.18 Canada trip

hw17: airconditioned

614. 03/04 M

4.4 shortest paths: implementation

(no new homework assigned)

15. 03/06 W

4.5 minimum spanning trees

hw18: 4.10 update MST

You may assume all edge weights are distinct.

16. 03/08 F

4.6 union-find

- CLRS 19.3–4

hw21: bigtruck

7(Spring break)(Spring break)(Spring break)
817. 03/18 M

5. divide and conquer

5.1 merge sort

- visualization

hw19: 5.1 median

18. 03/20 W

5.2 master theorem

- CLRS 4.5

hw20: on pop quiz

(hw21: bigtruck)

hw22: none, study for exam

19. 03/22 F

5.3 counting inversions

hw23: 5.2 significant inversion

hw24: 5.3 bank cards

hw25: virtualfriends

920. 03/25 M

5.5 integer multiplication

(no new homework assigned)

21. 03/27 W

quicksort

- CLRS 7

- visualization

(no new homework assigned)

(Good Friday)
10(Easter Monday)22. 04/03 W

exam2 (topics)

23. 04/05 F

dynamic sets

- CLRS dynamic sets basics

hash tables: separate chaining

- CLRS 11.1–2 hashing basics

(no new homework assigned)

1124. 04/08 M

hash tables: open addressing

- CLRS 11.4

hw26: hashing practice

(advising day)25. 04/12 F

2-3 trees: add

- notes

- visualization

hw27: 2-3 tree practice

hw29: nicknames

1226. 04/15 M

2-3 trees: delete

hw28: 2-3 tree delete practice

(hw29: nicknames)

hw30: none, study for exam

27. 04/17 W

(catch-up)

28. 04/19 F

6. dynamic programming

6.1 weighted interval scheduling

hw31: 6.1 independent set

1329. 04/22 M

6.2 memoization vs. iteration

hw32: 6.3 ordered graph

hw33: buttonbashing

30. 04/24 W

exam3 (topics)

31. 04/26 F

6.4 subset sum

hw34: 6.20 average grade

1432. 04/29 M

6.6 sequence alignment

hw35: 6.4 consulting

33. 05/01 W

6.8 shortest paths

hw36: 8.22 black box

hw37: narrowartgallery

34. 05/03 F

(catch-up)

1535. 05/06 M

8. complexity theory

8.1 polynomial-time reductions

36. 05/08 W

8.2 boolean satisfiability

37. 05/10 F

8.3 NP via verifiers

1638. 05/13 M

8.4 NP-completeness

39. 05/15 W

8.7 partitioning problems

40. 05/17 F

8.8 numerical problems

Final Exam: 05/21 Tuesday 11:30–13:30

Course Information

Course Overview

Algorithms is about solving problems. It is a continuation of what you learned in Data Structures and Discrete Mathematics. There are three major themes:

Topics

We will follow the textbook closely, tentatively covering Chapters 1–8, though omitting several sections. Supplementary topics will be covered as time permits.

Objectives

By the time you've completed the course, you will be able to:

Grading

Your grade will be determined by a weighted arithmetic mean of various components with weights listed in the table on the right.
componentweight
Participation±3%
Homework and projects31%
Exams and quizzes66%
The total score will be converted to a letter grade whose lower bounds are: 93% A, 90% A-, 87% B+, 83% B, 80% B-, 77% C+, 72% C, 69% C-, 66% D+, 60% D, 0% F.

Note that there is no preset curve of how many of each letter grade will be given. If you all do A-level work, you will each get an A. As such, you are encouraged to help each other in the pursuit of perfection.

In many courses I intentionally make one exam harder than others, which gives me information (in a mathematical sense) in separating an A performance from an A- performance. Typically, I will let you know and adjust that exam's scores upward. What this means is that you should NOT care about how hard an exam is. If you do A-level work, you will get an A, regardless of the raw numerical score prior to adjustment.

Besides possibly adjusting scores upward for difficult exams, I also reserve the right to lower the grade cutoffs. Both of these help you. I will not hurt you by adjusting your exam scores downward or increasing the grade cutoffs.

Requirements

Whatever you do, work at it with all your heart, as working for the Lord, not for human masters, since you know that you will receive an inheritance from the Lord as a reward. It is the Lord Christ you are serving.
- Colossians 3:23–24 NIV
I will be trying to make these verses true for me as I work with you throughout this course, and I hope that you will, too.

Attendance and participation. I expect you to attend class. You may not notice me taking attendance during class meetings, but I will notice if you are not in class. Occasional absences will not impact your grade because what I look for is not mere attendance, but engagement and participation.

Indeed, coming to class is not just about showing up; it is also about being fully engaged in the learning experience. If you have a question, others in the class may also be wondering the same thing. So, please speak up and ask questions anytime you need to. Not only will you be helping yourself, but also you will be helping your peers. Attending office hours is another great opportunity to ask questions.

Be mindful of others. Refrain from using mobile phones or laptops for activities unrelated to the learning process. If you prefer to use laptops to take notes, please kindly sit in the back, as the screen may distract others. There is research that suggests taking notes by hand is better for long-term retention (P. A. Mueller and D. M. Oppenheimer, The pen is mightier than the keyboard, Psychological Science 25 (2014), 1159–1168).

Silence and put away mobile phones and do not use laptops for anything other than class-related activities.

It is my sincere hope that every one of you get all the points for attendance and participation.

Reading. Read the book! You should prepare for class by looking over the sections we will cover. Your aim is not to understand every detail, but to get a sense of where we are headed. Even a few minutes of pre-reading can help with class time. We will not have time to cover every single detail in class. As such, after class, read the sections carefully again to fill in the gaps. Keep up with the reading: reading large sections right before an exam is less effective.

Homework. Homework will be assigned most days. The goal of the homework is to give you an opportunity to continuously engage directly with the material. Some of the homework questions are meant to be challenging and to stretch you; simply put, I believe that the homework is where you will do the vast majority of your learning in this class. Grapple with the questions; talk to classmates about solution strategies if you are feeling stuck; do the homework.

Programming projects. There will be some (small) programming projects. Typically you are free to write your solutions in a (common) programming language of your choice. Details on how to submit projects will be included when they are assigned.

Exams. There are several in-class midterm exams (see calendar for a tentative schedule). Subsequent exams will mainly focus on the material covered since the previous exam, but can include previous material too. There will be a final exam during the official final exam period covering the entire course.

There are no make-up exams except in circumstances recognized by the instructor as beyond the control of the student. To receive this consideration, the instructor must be notified of the problem before the exam unless this is impossible, in which case as soon as possible.

Time outside of class. I expect a typical student to spend about two to three hours outside of class for each hour in class. Some students need to spend a bit more than that (which is okay). If you are spending more than 10 hours per week on this course outside of class time, please come talk to me so we can find ways to help you learn the material without spending so much time.

Illness. You should make every effort to attend class when you are healthy. If you become ill, for your well-being and the well-being of the rest of the class, you should not come to class. (Nor should you show up to my office with your germs!) Yes, this sounds like common sense, but it is tempting to try and power through as normal so as not to fall behind. If you become ill, or know that you will need to miss class for some reason, please contact me as soon as you are able, and we will work together to plan how you will keep up and/or make up any missed work.

Learning integrity.

Search me, O God, and know my heart;
Try me, and know my anxieties;
And see if there is any wicked way in me,
And lead me in the way everlasting.
- Psalm 139:23–24 NKJV
Collaborative work is an integral part of many successful ventures. As such, I expect that you should collaborate with your classmates a lot during your time in this course. However, it is important to understand that there is a big difference between thinking about and solving a problem as part of a group (which is good, both educationally and morally) and copying an answer or letting someone else copy your answer (which is bad, educationally and morally, and has punitive consequences).

In short, I trust you to maintain the utmost level of academic integrity in this course. Please do not break this trust; if you do, there will be repercussions. The formal policy below lays this out explicitly, and supplements Bethel's academic honesty policy.

Collaboration policy.

Getting Help

If you need help there are multitude of resources you can use:

Bethel Policies

The following are policies that apply to every course at Bethel.

Academic honesty policy. Violation of honesty standards can result in denial of credit (U or F) in a course, as well as dismissal from the university. Penalties are given at the discretion of the faculty member, and offenders will be referred to the associate provost of the College of Arts & Sciences.

Accommodation policy. Bethel University is committed to accessibility for students with disabilities and the Office of Accessibility Resources and Services (OARS) is a resource to ensure students experience access. The instructor will provide accommodations after the student initiates the process.

OARS recommends the student and faculty discuss how accommodations may apply in the specific course. Accommodations cannot modify essential requirements or fundamentally alter the nature of the course. Consultation with OARS may be necessary to clarify reasonable accommodations based on the course. If there are any questions or concerns, connect with OARS at accessibility-services@bethel.edu or 651.638.6833.

Multilingual student support. If you are a multilingual student and believe you would benefit from support for this course, please see your instructor. Possible supports include access to lecture notes, additional time for completing assignments and/or tests, vocabulary lists, use of translation dictionaries, additional time for writing assignments.

Concerns and appeals. If you have any concerns regarding the course, your grades, or the instructor, see the instructor first. If needed, see Bethel's academic appeals policy.