Learning objectives
By the end of this week you can:
- 1 Explain what makes mathematics discrete and name five discrete objects you already use in code.
- 2 Describe the six modules of the course and how they connect to software.
- 3 Know how a Monday works: lecture first, then an autograded Python lab.
- 4 Have a GitHub account ready for the labs.
★ the wow moment
A computer can only store discrete things.
Your laptop has no real numbers. Every float is one of about 2⁶⁴ bit patterns, every image a finite grid, every program a finite string. Discrete mathematics is not a side topic of computer science: it is the mathematics of everything a computer can actually hold.
Discrete versus continuous
Calculus studies things that change smoothly: position, speed, area under a curve. Discrete mathematics studies objects that are separate and distinct: integers, propositions, sets, relations, graphs, strings, programs. You can count them, list them, and often check every one of them.
| Continuous | Discrete |
|---|---|
| Real numbers, | Integers , rationals , bit strings |
| Limits, derivatives | Sums, recurrences, induction |
| A smooth road | A road network: intersections and streets |
| Measuring | Counting |
Why computer scientists need it
Discrete mathematics gives you three things you will use for the rest of your career:
- A precise language. Specifications, requirements and code reviews fail when statements are vague. Logic makes “always”, “sometimes”, “if” and “only if” exact.
- A way to be certain. Tests show that code works on the inputs you tried. A proof shows it works on all inputs. Much of modern software verification is proof, done by machines.
- Tools for counting and structure. How many passwords? How long will this loop run? Is this network connected? Can these exams be scheduled without clashes?
The semester
We follow six modules over fifteen Mondays. The full plan is on the schedule.
| Module | Weeks | Big question |
|---|---|---|
| Propositional logic | 1–3 | How do we reason with true/false statements? |
| Predicate logic | 4–5 | How do we talk precisely about all and some? |
| Reasoning and proof | 6–8 | How can we be certain? |
| Sets, relations, functions | 9–11 | What are the data types of mathematics? |
| Induction and counting | 12–13 | How do we prove for every and count without listing? |
| Graphs and trees | 14–15 | How do we model connected things? |
How a Monday works
- Part 1, lecture. Definitions, examples, and problems you solve by hand. Paper and pen, please.
- Part 2, lab. You turn the idea into Python. Each lab has a page with numbered steps so you can start on your own, tests that check your work instantly, and an autograder on GitHub. See how labs work.
- Grading. Midterm 40%, final 60%. Inside the final, 15% comes from your personal semester project.
Before week 2: your checklist
- Create a GitHub account at github.com/signup if you do not have one. Use your university email and a username you would be happy to show an employer.
- Open the Lab 1 page once, so you know where the steps are. On Monday you follow them right after the lecture.
Optional but recommended: apply for the free GitHub Student Developer Pack with your university email. From Lab 2 on we use Classroom 50; you will receive an invitation to the course organization by email.
In industry
-
Algorithms and data structures
Arrays, trees, hash tables and graphs are discrete structures; their analysis is counting and induction.
-
Databases
Tables are relations, queries are predicate logic, joins are set operations.
-
Cryptography
Every HTTPS connection relies on number theory and modular arithmetic.
-
Artificial intelligence
Search, planning, knowledge graphs and the verification of AI-written code are logic and graph theory.
Go deeper
- Mathematics for Computer Science (Lehman, Leighton, Meyer) · Chapter 1 is a great first read
- Discrete Mathematics YMT211, previous year's site
Tags:introductiondiscretecourse overviewGitHub