Discrete math calculators
Calculators for counting, sets, relations, logic and graphs, the topics of a first discrete mathematics or computer science course. They show the working, from the terms of an inclusion–exclusion sum to each step of Dijkstra’s algorithm.
Which calculator do I need?
| You have or want | Use |
|---|---|
| How many ways to choose or arrange r items from n | Permutation and combination calculator |
| A closed form for a recurrence, or a count by inclusion–exclusion | Discrete math calculator |
| The union, intersection or complement of sets, with a Venn diagram | Set calculator |
| Whether a relation is reflexive, symmetric or transitive | Relation calculator |
| A truth table or the simplest form of a logic expression | Boolean algebra calculator |
| The shortest path or minimum spanning tree of a network | Graph theory calculator |
| A plot of y = f(x), with zeros and intersections | Graphing calculator |
Counting
Count arrangements and selections, and solve the recurrences that counting problems lead to.
-
Permutation and combination calculator
nPr, nCr, with-repetition counts, letter arrangements and circular permutations, exactly.
-
Combination calculator
nCr with or without repetition, and a list of every combination for small sets.
-
Permutation calculator
nPr, nʳ with repetition, and the distinct arrangements of the letters in a word.
-
Discrete math calculator
Solve linear recurrences, count with inclusion–exclusion and apply the pigeonhole principle.
Sets, relations and logic
The language of discrete math: collections, the links between their members, and true-or-false statements.
-
Set calculator
Union, intersection, differences and complements of up to three sets, with a Venn diagram.
-
Relation calculator
Test a relation for the four properties and build its reflexive, symmetric and transitive closures.
-
Boolean algebra calculator
Truth tables, canonical SOP and POS, and Quine–McCluskey minimisation of a Boolean expression.
Graphs and plots
Networks of vertices and edges, and plots of functions on axes.
-
Graph theory calculator
Degrees, BFS and DFS, Dijkstra, Kruskal’s MST, Euler paths and a bipartite check for any edge list.
-
Graphing calculator
Plot up to four functions of x and find their zeros and intersections.
What the calculators cover
Counting is the largest topic. The permutation and combination calculator handles the standard cases in one place: with and without repetition, letter arrangements and circular seating. The discrete math calculator handles what those formulas cannot: recurrences, inclusion–exclusion and the pigeonhole principle. Sets, relations and Boolean logic come next. The graph theory calculator works on networks of vertices and edges.
“Graph” means two different things in mathematics. In graph theory it is a network. On the graphing calculator it is a plot of a function. Both are listed here because the words overlap, but they answer very different questions.
Worked comparison: four ways to pick 3 from 5
| Order matters? | Repeats allowed? | Formula | Count |
|---|---|---|---|
| Yes | No | 5P3 = 5!/2! | 60 |
| No | No | 5C3 = 5!/(3! 2!) | 10 |
| Yes | Yes | 5³ | 125 |
| No | Yes | C(5 + 3 − 1, 3) | 35 |
Decide on the two questions in the first two columns before choosing a formula. Most counting mistakes come from answering one of them wrongly. A 3-digit PIN from 5 digits is ordered with repeats (125). A 3-person committee from 5 people is unordered without repeats (10).
Inclusion–exclusion in one line
How many of the numbers 1 to 100 are divisible by 2 or 3? There are 50 multiples of 2 and 33 multiples of 3. The 16 multiples of 6 were counted twice, so the answer is 50 + 33 − 16 = 67. With three conditions you add back the triple overlap, and the discrete math calculator lays out every term.
Guides to read alongside
-
Standard deviation of a random variable
Counting outcomes of dice and other discrete distributions to find their mean and spread.
-
Statistics formulas
Reference formulas, including those for the binomial and other counting-based distributions.