CSCI140 PO-01 Algorithms
Fall 2021
Monday and Wednesday
1:20 PM to 3:35 PM Pacific Time
EDMS Room 114 (Edmunds)
Instructors
Professor Anthony Clark
Research Website
Philosophy
I’d like to give a few brief thoughts on my philosophy and the common traits I’ve seen in successful students.
Philosophy
- I above all aim to be thoughtful.
- I’ve built this class knowing that failure is an important step in learning.
- I want you to realize that you belong here.
- I want to teach you about best learning practices.
- I want you all to work together and get comfortable with your peers.
- I want to acknowledge that diversity, equity, and inclusion are important.
- I love students attending office hours (most faculty do). I teach because I like talking about this stuff–plus it helps me fix my course when you tell me what you don’t understand.
Traits of Success
- Getting started early.
- Sticking to a schedule.
- Self-reflecting on your learning habits.
- Asking questions (even if you think it is simple or dumb).
- Working well with peers.
See my advising page for additional information on CS and being a student at Pomona College.
Teaching Assistants
TAs have the following duties:
- Holding mentoring/help sessions. Similar to office hours, you will have a regular set of times in which you can meet with TAs in-person or over Zoom Slack (depending on your and the TAs preference).
- Grading assignments and providing feedback.
- Creating questions for assignments and checkpoints.
Office and Mentor Hours
Zoom links are pinned in the course Slack Channel.
- Sunday
- Eric Zhu from 3:00 to 4:00 PM PT in TBD
- Monday
- Prof. Clark from 9:00 to 10:15 AM PT in Edmunds 127
- Tuesday
- Prof. Clark from 9:00 to 10:15 AM PT in Edmunds 127
- Meghna Lohia from 6:00 to 8:00 PM PT at the tables outside Edmunds 127
- Wednesday
- Prof. Clark from 9:00 to 10:15 AM PT in Edmunds 127
- Jett Bronstein from 10:00 to 11:00 AM PT at the tables outside Edmunds 127
- Alan Zhou from 6:00 to 8:00 PM PT in Edmunds 227 (CS Lounge)
- Eric Zhu from 8:00 to 9:00 PM PT in at the tables outside Edmunds 127
- Thursday
- Prof. Clark from 9:00 to 10:15 AM PT in Edmunds 127
- Jett Bronstein from 10:00 to 11:00 AM PT at the tables outside Edmunds 127
- Friday
- None
- Saturday
- None
You can also contact me on Slack to setup additional office hours.
I highly recommend showing up to mentor sessions with the intent that you’ll work on your homework and then ask the occasional question as it pops up.
Objectives
Catalog Description: Algorithm design, computer implementation and analysis of efficiency. Discrete structures, sorting and searching, parsing, pattern matching and data management. Reducibility and theoretical limitations.
Course Learning Objectives: Upon completion of this course, students will be able to:
-
Recognize the “language of algorithms” including how to specify an algorithm and compare amongst algorithms and data structures.
-
Formulate proofs of correctness and analyze running time characteristics.
-
Contrast different algorithm paradigms and choose a suitable paradigm given a new problem.
-
Recognize and select solutions to common graph theory problems.
-
Implement and compare different algorithms and data structures based on profiling data.
-
Classify the complexity of problems and their solutions.
Resources
We will not have a book for this class. But our course structure if fairly close to that of the Algorithms Illuminated book series.
This document from fall 2020 is a nice starting point for help. It includes resources for:
- Academics help (writing, quantitative skills, etc.)
- Mental health help
- Technology help (request a laptop, microphone, and/or pre-paid WiFi hotspot) (do you experience slow Internet speeds?)
- Financial help
- Advice from peers (Sage Fellows)
Please let me know if you have any other concerns.
Some helpful links to algorithms tutorials, lessons, and visualizations:
- Algorithms
- Data Structure Visualizations
- Algorithm Visualizations
- Dictionary of Algorithms and Data Structures
- Annotated Algorithms in Python (free book)
- Learn Python the Right way (free book)
Finally, I’d like to recommend listening to the Happiness Lab.
Logistics
These plans are subject to change based on our experiences and your feedback.
For the most part, we will plan on meeting in person, but I have included plans for remote and asynchronous courses below since it may very well come up.
Meeting Periods
Class periods will be used to discuss lecture materials and complete checkpoints. You can find more information about lecture topics and materials in the course schedule and more information about checkpoints below. We will optionally have some asynchronous days throughout the semester. Whenever everyone is feeling the need for a break from routine (I will regularly poll the class).
Zoom Etiquette
You are not expected to have your video on, but it would be nice to turn it on during group discussions in breakout rooms. Also, please set your display name to your preferred name (and include your pronouns if you’d like; for example, “Prof. Clark he/him/his).
During Zoom lectures, I will provide a link to a google sheet that we can use for anonymous discussions.
After lectures, I’d like to leave the zoom room open for an additional 15 minutes for all of you. So, I’ll likely choose willing people to make the host once I leave.
Communication with Slack
Please use Slack (not email) for all communication. If you email me questions, I will likely ask you to make a comment on Slack. This has several benefits:
- You are more likely to get a quick response from me, your fellow students, or your TAs.
- We can easily keep track of our discussion for everyone to see.
- I do not have to repeat answers.
- I can endorse student answers, which is helpful to both the asker and the answerer.
Slack has text, video, and audio options that the TAs and I will use (along with Zoom) to hold office hours and mentoring sessions. I will also use Slack to solicit anonymous feedback on how the course is going. You can create group messages that include you, other classmates, the TAs, and me if you want to discuss a question asynchronously.
Useful Slack commands:
/giphy [search term]
- example:
/giphy computers
- example:
/poll <question> <options...> [anonymous] [limit 1]
- example:
/poll "How are you?" "Good" "OK" "Bad" anonymous
- example:
/dm @user <msg>
- example:
/dm @pomcol What up
- example:
/remind [@someone | #channel] [what] [when]
- example:
/remind #cs140fa21 Checkpoint1 "Sep 9"
- example:
/shrug <msg>
- example:
/shrug No idea...
- example:
/anon #channel <msg>
- example:
/anon #cs140fa21 AHHHHHH...
- example:
/box
/collapse
/expand
Working Together
I recommend using Slack (text, audio, or video) for communication, and using the Visual Studio Code Live Share Extension for pair programming. We will spend some time in class getting this setup, but these instructions will also be of use.
Feedback
If you have any question for me, I would love for you to ask them on Slack. I will enable a bot that will allow you to make comments anonymously. The CS department also has an anonymous feedback form if you would like to provide feedback outside of class channels.
Grading
Throughout this semester, I will ask you to complete seven assignments and seven checkpoints. Assignments include written and programming parts (14 parts total) and checkpoints include individual and group parts (14 parts total).
We are using specifications grading for this course. Here are highlights of the grading policy:
-
You’ll receive an “F” if you
- don’t meet the requirements for a “D”.
-
You’ll receive a “D” if you
- pass all but five assignment parts
- pass all but five checkpoint parts
-
You’ll receive a “C” if you
- pass all but four assignment parts
- pass all but four checkpoint parts
-
You’ll receive a “B” if you
- pass all but three assignment parts
- pass all but three checkpoint parts
-
You’ll receive an “A” if you
- pass all but two assignment parts
- pass both parts of the first six checkpoints and attempt both parts of the seventh
To pass an individual checkpoint part you must pass or correct all questions on the checkpoint. If you have a question marked as “No-pass,” then you may correct it by:
- Explaining why your answer was marked “No-pass” and how it should be corrected.
- Creating and then solving similar problem (not all questions will have this requirement–check your feedback on gradescope).
- Walking me through your problem and its solution.
You do not have any limit to the number of corrections you can make during the semester or on a single checkpoint.
Group checkpoints follow the same procedure except that your entire group will be involved in the correction process.
Specifications grading:
- gives you a chance to receive feedback and adjust your expectations without affecting your final grade (it gives you space to learn);
- should eliminate any compulsion to violate the department’s Academic Honesty Policy; and
- will make it easier to provide critical feedback without worrying about your grade (particularly for TAs that might be your acquaintances).
Think of it as having assignments as your practice (e.g., shooting the basketball by yourself in the gym or practicing your lines in front of a mirror) and having checkpoints serve as the performance (e.g., your basketball game or live performance). These ideas, in part, come from Grading for Equity (a nice summary here).
Assignments
You will submit assignments to gradescope. You may work on assignments individually or with a partner of your choice. If you’d like to be assigned a partner, please send me a message on Slack and I will randomly assign partners when I have a pool of students.
Assignments will not be graded per se; instead, you will meet with a TA and walk them through your answers and code. They will then mark your assignment as “passed” or not. You should not meet with a TA until you have completed your assignment. Of course, you can still visit them during mentor sessions to ask for help.
If you do not pass an assignment on the first meeting, then you will need to work on your answers, resubmit, and then schedule a new time to meet with a TA. As a rule-of-thumb, you can think of a “pass” as at least a 90% on the assignment.
I will provide deadlines for meeting with TAs.
Checkpoints
We will have checkpoints during Wednesday class periods. If you foresee a problem with this, please let me know as soon as you can. All checkpoints are on the course schedule and will comprise two-stages:
- You will take the quiz individually.
- You will retake the quiz in groups.
During the group part, students receive immediate, targeted feedback on their solutions from their fellow students and see alternative approaches to the problems. This makes the exam itself a valuable learning experience. — Gilley and Clarkston
I will grade checkpoints as pass or no-pass using a similar scale to the assignments (90% for a pass).
General Sequence of Assignments and Checkpoints
Policies
Accommodations
If you have a disability (for example, mental health, learning, chronic health, physical, hearing, vision, neurological, etc.) and expect barriers related to this course, it is important to request accommodations and establish a plan. I am happy to help you work through the process, and I encourage you to contact the Student Disability Resource Center (SDRC) as soon as possible.
I also encourage you to reach out to the SDRC if you are at all interested in having a conversation. (Upwards of 20% of students have reported a disability.)
Academic Honesty and Collaboration
I encourage you to study and work on assignments with your peers (unless otherwise specified). If you are ever unsure about what constitutes acceptable collaboration, please ask!
For more information, see the Computer Science Department and the Pomona College policies.
I take violations of academic honesty seriously. I believe it is important to report all instances, as any leniency can reinforce (and even teach) the wrong mindset (“I can get away with cheating at least once in each class.”).
Academic Advisory Notice
I will do my best to update you if I think you are not performing at your best or if you are not on pace to pass the class. I will first reach out to you and then use the system built-in to my.pomona.edu that will notify your advisor so you are encouraged to work with a mentor or advisor on a plan.
Attendance
I expect you to attend every class, but I will not penalize you for missing class. Know that there is a strong correlation between attendance and grades, and you will almost certainly be indirectly penalized.
You are responsible for any discussions, announcements, or handouts that you miss, so please reach out to me. If you need to leave class early for any reason, please let me know before class begins so that I am not concerned when you leave.
Late Submissions
Late assignments will not be accepted. However, if you plan ahead you can ask for an extension prior to the assignment deadline (at least four days).
Unless requested ahead of time, some assessments (e.g., exams) cannot be completed after the class period in which they are scheduled.
Covid Safety Awareness
During the past academic year, we built community remotely, and this year we will build on the pedagogical improvements we acquired last year. For example, we might meet on zoom from time to time, or hold discussions online.
Our health, both mental and physical, is paramount. We must consider the health of others inside and outside the classroom. All Claremont Colleges students have signed agreements regulating on-campus behavior during the pandemic; in the classroom, we will uphold these agreements. We need to take care of each other for this course to be successful. I ask you therefore to adhere to the following principles:
- there is a mask mandate for all indoor spaces on campus. You must wear a mask for the entire class; eating and drinking are not permitted. Your mask must cover your mouth and nose. The college has zero-tolerance for violations of this policy, and our shared commitment to the health and safety of our community members means if you come to class unmasked you will have to leave class for the day.
- Class attendance is required, but if you need to miss class for health reasons, concerning symptoms, suspected Covid exposure, unexpected dependent care, technology issues, or other emergency reasons I will work with you. Let me underscore this: please make your decisions always based on health, safety, and wellness—yours and others—and I will work with you at the other end. Take any potential symptoms seriously; we’re counting on each other.
- When not in class, avoid closed public spaces, and if you can’t avoid them: wear your mask properly, wash your hands, and maintain social distance.
- If you, or a family member, are experiencing hardship because of the pandemic, talk to me or to someone in the Dean of Students office. You are not alone during this time.
The pandemic is fast-moving, and we might have to adjust these principles as the semester evolves. I am always happy to receive your feedback to make this course work.
Let’s care for each other, show empathy, and be supportive. While there will likely be some community transmission and breakthrough infections, together, we can minimize their effect on our community and on your learning.
Calendar
Schedule
If the schedule below doesn’t look up-to-date, you might need to reload the page while overriding cache.
Here are all resources from the previous time this course was taught
The check-boxes are for your own use so that you can easily come back to this page and see where you left off (I can’t see what you do on this page). I’m using localstorage to get this working, so no guarantees it will work on your device.
Date | Pre-Class | In-Class | Assignment |
---|---|---|---|
Mon Aug 30 |
| ||
Wed Sep 01 |
|
| |
Mon Sep 06 | Labor Day -- No class | ||
Wed Sep 08 |
| ||
Thu Sep 09 |
| ||
Mon Sep 13 |
| ||
Wed Sep 15 | Checkpoint 1: Running Time and Invariants
| ||
Mon Sep 20 |
|
| |
Wed Sep 22 |
| ||
Thu Sep 23 |
| ||
Mon Sep 27 |
|
| |
Wed Sep 29 | Checkpoint 2: Recursion and Probability
| ||
Mon Oct 04 |
| ||
Wed Oct 06 |
|
| |
Thu Oct 07 |
| ||
Mon Oct 11 |
|
| |
Wed Oct 13 | Checkpoint 3: Graph Theory
| ||
Fri Oct 15 | Family Weekend | ||
Mon Oct 18 | Fall break -- No Class | ||
Wed Oct 20 |
|
| |
Thu Oct 21 | Last day to drop | ||
Mon Oct 25 |
| ||
Wed Oct 27 |
| ||
Thu Oct 28 |
| ||
Mon Nov 01 |
| ||
Wed Nov 03 | Checkpoint 4: Data Structures and Memory
| ||
Mon Nov 08 |
|
| |
Wed Nov 10 |
| ||
Thu Nov 11 |
| ||
Mon Nov 15 |
| ||
Wed Nov 17 | Checkpoint 5: Greedy Algorithms
| ||
Mon Nov 22 |
| ||
Tue Nov 23 |
| ||
Wed Nov 24 | Thanksgiving recess -- No Class | ||
Mon Nov 29 | |||
Wed Dec 01 | Checkpoint 6: Dynamic Programming
| ||
Mon Dec 06 | |||
Wed Dec 08 |
| ||
Thu Dec 09 |
| ||
Wed Dec 15 | Checkpoint 7: Complexity and Reductions 2:00 - 5:00 p.m.
|
Modules
Module 1: Introduction
In this first module we will focus on the language of algorithms and how we will conduct proofs and time complexity analysis.
- Administrivia
- Terminology
- Insertion Sort
- Loop Invariant Proofs
- Asymptotic Notation
Module 2: Divide-and-Conquer Algorithms
Next we will discuss algorithms that work by repeatedly “simplifying” the problem and combining solutions to simplified problems.
- Recurrences
- Merge Sort
- The Closest Pair Problem
- The Master Method
Module 3: Randomized Algorithms
We will transition from divide-and-conquer algorithms into algorithms that leverage randomness to have provably “good” average performance.
- Probability Review
- QuickSort
- Order Statistics
- Sorting Lower Bound
Module 4: Graph Theory
Our next module will cover graph theory. These algorithms and data structures have a surprisingly large number of practical applications.
- Graph Connectivity
- Breadth-First Search
- Depth-First Search
- Topological Sort
- Graph Representations
- Kosaraju’s Algorithm
- Dijkstra’s Algorithm
Module 5: Advanced Data Structures
Related to graphs, we will next discuss binary trees, which are typically an ordered data structure. After BSTs we will discuss one of the most widely used data structures: hash tables. When in doubt, use an array or a hash table.
- Heaps and Fibonacci Heap Data Structure
- Amortized Analysis
- Binary Search Trees
- Red-Black Trees
- Hash Tables
- Universal Hashing
- Memory and Locality
Module 6: Greedy Algorithms
We’ll wrap up the course discussing two types of algorithm design paradigms. First, we’ll discuss greedy algorithms, which focus on repeatedly making simple decisions and never going back to look for better results.
- Greedy Scheduling
- Minimum Spanning Trees
- Huffman Codes
- Clustering
Module 7: Dynamic Programming
Contrasted to greedy algorithms, dynamic programming algorithms (effectively) look at many possible solutions by leveraging overlapping subproblems and optimal substructure.
- The Knapsack Problem
- Sequence Alignment
- The Bellman-Ford Algorithm
- All-Pairs Shortest Paths
Module 8: Complexity
Finally, we’ll look at some of our known algorithms and classify them in terms of space and time complexity.
- Complexity Classes, P, and NP
- The Traveling Salesperson Problem
- Reductions
- Approximation Algorithms