Basics Flashcards
Set
A collection of distinct objects. Example: {1, 2, 3}
Union (∪)
Combines all elements from two sets. Example: {1, 2} ∪ {2, 3} = {1, 2, 3}
Intersection (∩)
Elements common to two sets. Example: {1, 2} ∩ {2, 3} = {2}
Cartesian Product (×)
Set of all ordered pairs from two sets. Example: {a, b} × {1, 2} = {(a, 1), (a, 2), (b, 1), (b, 2)}
Relation
A subset of a Cartesian product. Example: R = {(1, 2), (2, 3)} on {1, 2} × {2, 3}
Function
relation where each input has exactly one output. Example: f(x) = x²
Pigeonhole Principle
If n items are put into m containers, and n > m, at least one container has more than one item.
Permutation
Ordered arrangement. Formula: P(n, r) = n! / (n - r)!. Example: P(3, 2) = 6
Combination
Unordered selection. Formula: C(n, r) = n! / (r!(n - r)!). Example: C(3, 2) = 3
Graph
A set of vertices connected by edges. Example: V = {A, B}, E = {(A, B)}