Discrete math, taught interactively

Discretica

Interactive discrete math for CS students: topics, proof trainer, practice, and browser-native tools.

7topics
534problems
54formulas
60proof tasks
0 learned0 saved0 practice attempts0% accuracy0 proof checks

Calculators

Discrete math tools

All calculations run in the browser with validated inputs and shareable route URLs.

Logic

Truth table builder

Use variables like p, q, r with !, &&, ||, ->, <->, xor, parentheses.

pqresult
FFT
FTT
TFT
TTT

Sets

Set operations

A = {1, 2, 3, 5}
B = {2, 4, 5, 8}
A union B = {1, 2, 3, 5, 4, 8}
A intersection B = {2, 5}
A - B = {1, 3}
B - A = {4, 8}
Symmetric difference = {1, 3, 4, 8}

Number theory

GCD / LCM

numbers: 84, 126, 210
gcd: 42
lcm: 1260

Representation

Base converter

255 base 10 = 255 base 10
255 base 10 = FF base 16

Counting

Combinatorics

n! = 3628800
P(n,r) = n! / (n-r)! = 720
C(n,r) = n! / (r!(n-r)!) = 120

Modular arithmetic

Modulo calculator

(17 ^ 5) mod 7 = 5

Source tools

7 mobile tool definitions

Truth Table BuilderGenerate truth tables for any logical proposition
Set OperationsPerform set operations with visual Venn diagrams
Combinatorics CalculatorCalculate permutations, combinations, and more
Modular ArithmeticPerform modular arithmetic operations step by step
Base ConverterConvert numbers between binary, octal, decimal, and hex
GCD & LCM CalculatorFind GCD and LCM using the Euclidean algorithm
Proof TrainerPractice building proofs step by step

Formula references

Quick lookup

De Morgan's Law (AND)¬(p ∧ q) ≡ ¬p ∨ ¬q
De Morgan's Law (OR)¬(p ∨ q) ≡ ¬p ∧ ¬q
Conditional Equivalencep → q ≡ ¬p ∨ q
Contrapositivep → q ≡ ¬q → ¬p
Biconditional Expansionp ↔ q ≡ (p → q) ∧ (q → p)
Distributive Law (AND over OR)p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r)
Distributive Law (OR over AND)p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r)
Absorption Law (1)p ∨ (p ∧ q) ≡ p
Direct Proof StructureAssume P. Derive Q. Therefore P → Q.
Proof by ContrapositiveProve ¬Q → ¬P instead of P → Q