Algorithms in the Real World (Spring 2022)

Welcome to CS 137! We’re super excited to have you here this term!



Wellness and Inclusion

It is very important to us that you succeed in CS 137. We provide many extra resources to help you. Adam and the TAs hold many office hours, and we have a message board called Ed Discussion.

It is also very important to us that you maintain your mental wellness throughout the course. A few points are not worth losing sleep over. Everyone on the course staff is available to chat, and you can always attend office hours for a non-academic conversation if necessary. You can also visit the counseling center if you find you need help beyond the course staff. If you have a temporary health condition or permanent disability (either mental health or physical health related), you should contact accessibility services if you have not already. Additionally, if there is something we can do to make your experience better, please let us know.

Diversity, inclusion, and belonging are all core values of this course. All participants in this course must be treated with respect by other members of the community in accordance with the honor code. If you feel unwelcome or unsafe in any way, no matter how minor, we encourage you to talk to Adam or one of the Deans. We view these sorts of honor code violations as completely unacceptable, and we take them very seriously.

Course Staff


Book an appointment!
Annenberg 115
(626) 395-1765

Teaching Assistants

Ilana Hejna
Varyn Woo
any pronouns


The following is a list of handouts that you might find helpful throughout the course. We’ve categorized them by when they are useful.

Syllabus – an overview of the course and administrative information

Collaboration Policy – the course collaboration policy

Sprint Registration Form – a form to register your group for each sprint

Starting a Project – a description of how to fork the starter code to begin a project sprint

Turning in a Project – a description of how to tag a commit to turn in your weekly sprint

Rust Resources – our recommended resources for learning & using Rust


The following is a list of mini-projects that you can complete during a sprint.


Getting Started

Specification Starter Code

Helpful Readings

Git Internals Book Chapter – a description of how git works from the people who wrote git


Getting Started

Specification Starter Code

Helpful Readings

Discussion of Precedence in CFGs – a nice description of how to do precedence in CFGs

Blog Post about grep – a nice blog post that describes much of what you will implement

SSH Key Generation

Getting Started

Specification Starter Code

Helpful Readings

Big Integers – an introduction to the algorithms used on multi-precision integers

Algorithms – a description of the relevant algorithms for semi-numerical arithmetic

RSA Key Generation – a description of the RSA key format that is generated by key generation utilities


Getting Started

Specification Starter Code

Helpful Readings

Prefix-Free Codes – an introduction to lossless compression

Huffman Codes – an introduction to huffman codes

More Huffman & LZ77 – more huffman codes, run-length encoding, and lz77

RFC – the official RFC (specification) for the zip format


How to Write a Design Document – the format and description of how we expect you to propose an extension