UW-Madison CS 240: Introduction to Discrete Mathematics
CS 240 (officially COMP SCI 240) is UW-Madison's discrete math course for the CS major: logic, proofs, induction, sets, functions, counting, recurrences, and graphs. It's the mathematical foundation that CS 577 and the theory electives build on.
Fennie is independent and not affiliated with University of Wisconsin-Madison. This is an unofficial study guide.
What makes it hard
Proof-writing is the wall: most students arrive never having constructed a mathematical argument, and induction, the technique the course leans on hardest, feels circular until the mental model clicks. Exams present unfamiliar claims to prove, so the homework-memorization strategy that works in computational courses fails completely here.
What you'll cover
- • Propositional and predicate logic
- • Proof techniques
- • Mathematical induction
- • Sets, functions, and relations
- • Counting and combinatorics
- • Recurrences and graphs
The CS 240 study guide
How to study for UW-Madison CS 240, step by step.
- 1
Produce proofs from a blank page, always
Reading proofs builds recognition; exams demand production. After studying any example, close the notes and reconstruct the full argument. The production gap is where CS 240 grades are decided.
- 2
Drill the logic foundation until it's automatic
Quantifiers, implications, negations: every proof in the course is built from these. Practice translating English claims to formal statements and negating them until it costs no thought.
- 3
Give induction more reps than feels reasonable
It's the course's central technique and the one CS 577 assumes most heavily. Practice across integers, sums, and recursive structures until the base-case-and-step template feels mechanical.
- 4
Seek unfamiliar claims to prove weekly
Exam problems are claims you haven't seen. Pull unassigned textbook problems and practice deciding the technique (direct, contradiction, induction) as its own skill before writing anything.
Today
Today's CS 240 plan
What a Fennie Daily Plan looks like for CS 240. Yours is built from your own syllabus and adapts every day to your deadlines and progress.
First plan free, no card required. Fennie is independent and unaffiliated with your school.
FAQ
Is CS 240 at UW-Madison hard?
It's a different hard than the programming sequence: no coding, all mathematical argument. Students meeting proofs for the first time (most of the room) find the middle of the course rough until induction clicks. Weekly production practice is what gets people through.
How do I get better at proofs in CS 240?
Reconstruct every studied proof from a blank page, drill logic notation until automatic, and practice on claims you haven't seen. The skill is production, not recognition; rereading solutions trains the wrong thing.
Why does CS 240 matter for the CS major?
CS 577 (Algorithms) is built directly on its induction, counting, and graph material, and theory electives assume proof fluency. Students who scrape through 240 consistently report paying for it in 577.
More UW-Madison courses
CS 200: Programming I
CS 200 (officially COMP SCI 200) is UW-Madison's first programming course, taught in Java. It covers variables, control flow, methods, arrays, and an introduction to objects, serving intended CS majors, data science students, and a large population just adding programming skills. It assumes no prior experience.
CS 300: Programming II
CS 300 (officially COMP SCI 300) is UW-Madison's object-oriented programming course in Java, covering classes, inheritance, interfaces, exceptions, recursion, and intro data structures like array lists and linked lists. It's one of the largest courses on campus, since it gates the CS major and serves data science, engineering, and statistics students besides.
CS 400: Programming III
CS 400 (officially COMP SCI 400) completes UW-Madison's programming sequence: data structures and their implementations (balanced search trees, hash tables, graphs) plus software development practices like version control, testing, and team projects, all in Java.
CS 252: Introduction to Computer Engineering
CS 252 (cross-listed COMP SCI/E C E 252) introduces how computers work from the bottom up: transistors and gates, combinational and sequential logic, basic computer organization, and machine and assembly programming on the LC-3. It's the first systems course in the CS and computer engineering tracks.