CS 170 is Berkeley’s introduction to the theory of computer science. In CS 170, we will study the design and analysis of graph algorithms, greedy algorithms, dynamic programming, linear programming, fast matrix multiplication, Fourier transforms, number theory, complexity, and NP-completeness.
The prerequisites for CS 170 are CS 61B and CS70. You will need to be comfortable with mathematical induction, big-O notation, basic data structures, and programming in a standard imperative language (e.g., Java/C/Python). Another “prerequisite” for doing well in the course is mathematical maturity, or the ability to think about and work with proof-based math (which CS70 can help build).
The primary methods for engaging with the course material are through lectures, discussion sections, homework, and the readings. All are important, and exams will test a mix of the material from these sources.
Lecture will be remote for the first two weeks as per campus policy at https://berkeley.zoom.us/j/93812610744?pwd=T3BZLzFuSkZEclhmdmJieHBNbysyQT09. After two weeks, we will decide the format afterwards based on campus policy, to be announced.
There is no discussion in the first week Discussions will be all remote for now due to campus policy. Details for the specific times will be decided and announced on Piazza by Saturday, 1/22. Attendance at discussion sections is not required, although sections cover important material not covered in lecture that will appear on exams. You may attend any discussion section! Outside of your discussion section, you should feel free to attend any of the staff office hours (not just your section TA’s office hours) and ask any of us for help.
The textbook for this course is Algorithms by Dasgupta, Papadimitriou, and Vazirani, also known as DPV. The relevant textbook sections will be linked for each lecture. Additionally, this semester we will be having a set of course notes, which you may read in replacement of the textbook. It is not necessary to read both; reading either of them is sufficient.
TA office hours are a fantastic resource for questions about concepts, course material including homework, and study tips. The instructors’ office hours are best for major concerns or high-level questions about the course material. We prioritize conceptual questions over homework questions in office hours.
Every Tuesday evening, homework is posted on Piazza, and it is due the following Monday by 10:00 PM.
Please see the homework guidelines to see how to answer homework questions and format your homework submissions. You may lose points for not properly following the homework guidelines.
To request an extension on a homework deadline, fill out this form, and we will email you with a decision regarding your request.
There will be one challenging, yet (hopefully) fun programming project, where you can apply the ideas from the course to solve an interesting problem algorithmically. Details on the project will be announced after the second midterm.
Exams will be conducted in person.
We are not planning on offering alternate exams. Exam-specific policy will be released closer to the exam dates.
We will compute grades from a weighted average, as follows:
The class will be curved at the end of the semester. There is no clobbering policy, but we may take into account participation on Piazza, discussion, office hours, HW Party and student performance when considering students on grade borderlines.
Regrading of homeworks or exams will only be undertaken in cases where you believe there has been a genuine error or misunderstanding. Any requests for grade changes or re-grading must be made by the deadline. Submit regrade requests via Gradescope. Before making a request please make sure that you read Regrade Etiquette.
We may offer optional activities that provide a small amount of extra credit, for those eager for a tougher challenge. However, please note that you should do the extra credit problems only if you want an extra challenge. It is likely not the most efficient manner in which to maximize your grade.
The guiding principle for homework collaboration is that your writeup of the solutions should be yours only.
With the exception of solo problems (see Homework Guidelines), you are encouraged to work on homework problems in study groups of up to five people; however, you must always write up the solutions on your own, listing all collaborators at the top. Similarly, you may use books or online resources to help solve homework problems, but you must always credit all such sources in your write-up and you must never copy material verbatim. However, as a general rule of thumb, you should never possess solutions to exact homework questions other than those solutions you have written yourself. We realize that it is sometimes possible to stumble upon solutions on accident. If this happens, please cite the source and write up solutions in your own words.
We believe that most students can distinguish between helping other students and cheating. Explaining the meaning of a question, discussing a way of approaching a solution, or collaboratively exploring how to solve a problem within your group are types of interaction that we strongly encourage. But you should write your homework solution strictly by yourself so that your hands and eyes can help you internalize this material. At no time should you be in possession of another student’s solution. You may discuss approaches but your solution must be written by you and you only. You should explicitly acknowledge everyone whom you have worked with or who has given you any significant ideas about the homework.
Further, it is your responsibility to ensure that your solutions will not be visible to other students. If you use Github or another source control system to store your solutions electronically, you must ensure your account is configured so your solutions are not publicly visible. Many popular version control systems provide free repositories to students; staff members or fellow students can help you obtain one.
As a final note, we’d like to point out that collaboration on homework, while encouraged, can be detrimental to your learning if misused. In particular, avoid collaborations where you do not contribute enough to your own satisfaction. Such a collaboration not only cheats you out of an opportunity to learn through homework, but can also affect your confidence. If you feel that you are not contributing enough to your group, then try to spend time thinking about the problems alone before working with your group. If you end up solving the problem all by yourself that’s great! And if not, you’ll still be prepared to better contribute to your group.
If you’re ever in doubt about what constitutes academic dishonesty, always ask a TA or on Piazza.
Warning: Your attention is drawn to the Department’s Policy on Academic Dishonesty. In particular, you should be aware that copying or sharing solutions, in whole or in part, from other students in the class (or any other source without acknowledgment) constitutes cheating. Any student found to be cheating risks automatically failing the class and being referred to the Office of Student Conduct.
Piazza will be our primary communication method, and all announcements will be posted to Piazza. You are responsible for staying up-to-date with announcements and course updates made on Piazza.
Piazza is also a fantastic resource for course staff to answer your questions. Please read our Piazza Etiquette so we can help you most effectively. We also encourage you to help your fellow students by answering their questions - it is a great learning opportunity for them, and for you!
For logistics and administrative questions, please email cs170@, a private email that is only seen by the head TAs and professors. (add berkeley.edu after the @ symbol) For any questions regarding DSP, please also CC kevinli35@.
The staff is excited to teach for you this semester! If you would like some tips on how to do well in this course, please see our advice page.
Always feel free to contact us via email or visit us during office hours if you feel unsure about your progress in the course, or would just like to reach out. We are here to support you and help you succeed!