Combinatorics formula: Order important, repetition not allowed
nPr = (n!)/((n-r)!)
Combinatorics formula: Order not important, repetition not allowed
nCr = (n!)/(r!(n-r)!)
Combinatorics formula: Order important, repetition allowed
n^r
Combinatorics formula: Order not important, repetition allowed
(n-1+r)C(r) = ((n-1+r)!)/(r!(n-1)!)
Sets: Inclusion/exclusion rule for two sets
|A ∪ B| = |A| + |B| - |A ∩ B|
Sets: Inclusion/exclusion rule for three sets
|A ∪ B ∪ C| = |A| + |B| + |C| − |A ∩ B| − |B ∩ C| − |A ∩ C| + |A ∩ B ∩ C|
In the function f: A -> B, where f(x) = ..., set B is the _______
Co-domain
Is this a valid function?
No, as f(x) should be uniquely defined for every x∈A
Is this a valid function
Yes. There is no need for all of the elements in B to be in the range, and functions can be many-to-one (though not one-to-many)
Notation for functions
f: A -> B, where f(x)=...
The domain of (f o g)(x) or f(g(x)) is the same as the domain of ______
g
What composite function is shown here?
(g o f)(x) or g(f(x))
Consider a function (f o g)(x) or f(g(x)). True or false: the co-domain of g must be equal to the domain of f for this to be a properly defined composite function
True
The composite function (f o g)(x) or f(g(x)) can also be written as:
A -> C
Functions: True or false: the range of a function is a subset of or equal to its co-domain
True
Formal definition of the range of a function f: A -> B
{f(x) ∈ B: x∈A}
Injective function definition
Maximally one arrow arrives at each element in B
Injective function formal definition
(∀x,y ∈ A)(x≠y -> f(x)≠f(y))
Surjective function definition
Range is equal to the co-domain, at every element of B at least one arrow arrives
Surjective function formal definition
(∀y ∈ B)(∃x ∈ A)(f(x) = y)
Functions: bijection definition
A function that is injective and surjective. Exactly one arrow arrives at every element in B; A and B must have the same number of elements
Is ℤ -> ℤ, where f(x) = 3x-4 surjective?
No, as there exist elements, like 0 and 1, that are not reached
For the inverse of a function f(x) to be a function, f(x) must be _______
Bijective, so that f'(x) is uniquely defined for all x ∈ B and exactly one arrow comes out of each element in B
Induction works as proof for statements of the form ____________
(∀n >= N, n ∈ ℤ) P(n)
Two steps for proof by induction
Base case, Induction step (∀m>=1: P(m) -> P (m+1))
True or false: sets can have duplicate elements
False
True or false: sets are not ordered ({1, 2, 3, 4} = {4, 3, 2, 1})
True
Sets: define cardinality
The number of elements in a finite set. Cardinality of A: |A|
Symbol for empty set
∅
What elements does this set contain? {x ∈ ℤ: 1 <= x <= 4}
{1, 2, 3, 4}
Sets: True or false: (A = {1, 2, 3}); ∅ ∈ A
False, as ∅ is a set and not an element.
Is a subset of or equal to symbol
⊆
True or false: (A = {1, 2, 3}); 1 ⊆ A
False, as the curly brackets are missing, making 1 an element and not a subset; {1}⊆A, 1⊄A, 1∈A
Sets notation: True or false: A' = Aᶜ
True
Sets: De Morgan Laws
(A∪B)' = A' ∩ B' ; (A∩B)' = A' ∪ B'
Power set of A (ℙ(A)), A = {1, 2, 3}
{∅, {1}, {1, 2}, {1, 2, 3}, {2}, {2, 3}, {3}, {1, 3}} (Set of all subsets of A)
Is this a valid function?
Yes
A x B (product set), A = {1, 2, 3}, B = {red, blue}
{(1, red), (1, blue), (2, red), (2, blue), (3, red), (3, blue)}
Is (red, 1) ∈ A x B? A = {1, 2, 3}, B = {red, blue}
No, (1, red) is
Is set A x B x C equal to set A x (B x C)?
No
A partition of set A is a ___________
set of non-empty subsets of A (not necessarily all)
Can the partitions in a set overlap?
No
Contrapositive of p->q
¬q->¬p
Relation definition
It describes the relationship between different elements of a given set A
Notation for a relation
xRy if...; (x,y∈A)
Formal definition for a relation
On a set A, a subset of the product set A x A
Reflexive relation definition
Every element is related to itself
Formal definition for a reflexive relation
∀x∈A: xRx
Symmetric relation definition
On a set A, every relation arrow goes in two directions
Formal definition for a symmetric relation
∀a,b∈A: aRb -> bRa
Transitive relation definition
On a set A, if a is related to b and b is related to c, then a must be related to c
Formal definition for a transitive relation
∀a,b,c∈A: (aRb ∧ bRc) -> aRc
True or false: The empty set is transitive and reflexive
False. It is transitive and symmetric
Is this relation transitive? Symmetric? Reflexive?
Transitive only
Equivalence relation definition
A relation that is transitive, symmetric and reflexive
Is the following relation transitive? Symmetric? Reflexive?; A = {1, 2, 3}, xRy if x<y
Transitive only
Is this relation transitive? Symmetric? Reflexive?
Transitive, symmetric and reflexive (equivalence relation)
Equivalence class definition
A partition of a set where everything is related to each other
Is the following statement true for an empty box? All balls in the box are red
Yes
True or false: anti-symmetry is the negation of symmetry
False
Anti-symmetrical relation definition
An arrow between different elements can only go in one direction
Formal definition for an anti-symmetrical relation
∀x,y∈A: (xRy ∧ yRx) -> x=y
True or false: A relation can be both symmetric and anti-symmetric
True. For example:
Proof by contradiction: steps
Assume p is false, then show how this can't be, making p true
Sets: what does A\B represent
The set of elements in A but not in B