Skip to main content
Stanford
Computer Science
5 credits

Stanford CS 103: Mathematical Foundations of Computing

CS 103 is Stanford's discrete math and theory gateway: proof techniques, set theory, induction, graph basics, then finite automata, regular languages, and the first look at computability and P vs NP. For most students it's the first course where the deliverable is a proof, not a program.

Fennie is independent and not affiliated with Stanford University. This is an unofficial study guide.

What makes it hard

Proof-writing is a different muscle: problem sets are graded on rigor and precision of language, and answers that 'have the right idea' lose most of their points. Induction and the pumping-lemma-style arguments are the classic walls. Students used to verifying their work by running it have no compiler here. The feedback loop is slower and the standards are exact.

What you'll cover

  • Proof techniques and mathematical logic
  • Set theory and functions
  • Induction in all its forms
  • Graphs and relations
  • Finite automata and regular languages
  • Computability and P vs NP

The CS 103 study guide

How to study for Stanford CS 103, step by step.

  1. 1

    Learn the proof formats as formats

    Direct proof, contrapositive, contradiction, induction: each has a shape with required sentences. Internalize the templates first; creativity comes after the scaffolding is automatic.

  2. 2

    Write proofs out fully, every time

    Sketching 'the idea' and moving on is the failure mode. Points live in the precision. Write complete proofs for practice problems and compare them line by line against posted solutions.

  3. 3

    Give induction double reps

    Induction underwrites half the course and most students' first proofs of it are subtly broken. Practice until stating the hypothesis precisely and using it honestly is reflexive.

  4. 4

    Start problem sets early and revisit

    Proofs need incubation. The argument you can't find Tuesday often appears Thursday. A problem set started the night before gets your worst thinking on every problem.

  5. 5

    Translate definitions into your own words

    Automata, regular languages, decidability: exam questions test whether you can wield definitions, not recite them. Restate each one and construct your own examples and non-examples.

Today

Today's CS 103 plan

Preview
65 min

What a Fennie Daily Plan looks like for CS 103. Yours is built from your own syllabus and adapts every day to your deadlines and progress.

0 / 4 done~65m remaining
Keep this plan free

First plan free, no card required. Fennie is independent and unaffiliated with your school.

FAQ

Is CS 103 hard?

It's a genuine gear-shift: the first Stanford CS course graded on proofs, where 'right idea, imprecise writing' loses most of the points. Students who practice writing complete proofs, not just reading them, handle it; everyone else gets recalibrated on problem set one.

Do I need CS 103 before CS 161?

Yes. CS 161 assumes the proof maturity and discrete-math toolkit CS 103 builds. The induction and graph fluency in particular get used constantly in algorithm analysis.

How do I get better at CS 103 proofs?

Volume plus comparison: write complete proofs for practice problems, then diff your writing against solutions line by line to see where rigor leaked. Office hours and the problem-set feedback are the fastest calibration loop. Use both early in the quarter.

More Stanford courses