Discrete Mathematics exercises with solutions

45 practice problems from the 15 lessons of the Discrete Mathematics course, in lesson order and from easy to hard inside each lesson. Open a problem, write your code and press Submit: the tests run in your browser and nothing is sent to a server.

15 easy problems 15 medium problems 15 hard problems

Propositions and truth tables

3 problems · Read the lesson

Logical equivalence

3 problems · Read the lesson

Predicates and quantifiers

3 problems · Read the lesson

Proofs and counterexamples

3 problems · Read the lesson

Mathematical induction

3 problems · Read the lesson

Sets

3 problems · Read the lesson

Functions

3 problems · Read the lesson

Relations

3 problems · Read the lesson

Counting: permutations and combinations

3 problems · Read the lesson

The pigeonhole principle and inclusion-exclusion

3 problems · Read the lesson

Recurrence relations

3 problems · Read the lesson

Divisibility, primes and the gcd

3 problems · Read the lesson

Modular arithmetic and RSA

3 problems · Read the lesson

Graphs

3 problems · Read the lesson

Searching a graph: BFS and DFS

3 problems · Read the lesson