Partition: a set of nonempty disjoint subsets which when unioned together is equal to the initial set
\(A = \{1,2,3,4,5\}\)
Some Partitions:
\(A = \{1,2,3,4,5\}\)
Not Partitions:
Powerset \(\mathcal{P}(A)\): a set of all the subsets of \(A\)
\(\mathcal{P}(A) = \{S \vert S \subseteq A\}\)
\(\mathcal{P}(\{1,2\}) = \{\emptyset,\{1\},\{2\},\{1,2\}\}\)
Powerset \(\mathcal{P}(A)\): a set of all the subsets of \(A\)
\(\vert \mathcal{P}(A)\vert = ?\)
Powerset \(\mathcal{P}(A)\): a set of all the subsets of \(A\)
\(\vert \mathcal{P}(A)\vert = 2^{\vert A\vert}\)
\(\mathcal{P}(\emptyset) = ?\)
Powerset \(\mathcal{P}(A)\): a set of all the subsets of \(A\)
\(\vert \mathcal{P}(A)\vert = 2^{\vert A\vert}\)
\(\mathcal{P}(\emptyset) = \{\emptyset\}\)
\(\mathcal{P}(\{\emptyset\}) = ?\)
Powerset \(\mathcal{P}(A)\): a set of all the subsets of \(A\)
\(\vert \mathcal{P}(A)\vert = 2^{\vert A\vert}\)
\(\mathcal{P}(\emptyset) = \{\emptyset\}\)
\(\mathcal{P}(\{\emptyset\}) = \{\emptyset, \{\emptyset\}\}\)
Cartesian Product(\(A,B\)): a set of all ordered pairs between \(A\) and \(B\)
\(A \times B = \{(a,b)\vert a \in A \land b \in B\}\)
\(\{1,2\}\times \{3,4\} = \{(1,3),(1,4),(2,3),(2,4)\}\)
Note: The cartesian plane: \(\mathbb{R} \times \mathbb{R} = \mathbb{R}^2\)
Relation: A relation $R$ from set $A$ to set $B$ is any subset of $A \times B$
Examples:
$A$ is the Domain, $B$ is the co-domain
\(R: \{(x,y)\vert x+y \ge 100\}, \mathbb{R}\times\mathbb{N}\)
Read as: $R$ defined as the $\{(x,y)\vert x+y \ge 100\}$
$\{(100.0,0),(50.1,50),(0.0,200),\dots\}$
Reflexivity
A relation $X \subseteq A \times A$ is reflexive if \[(\forall x \in A)[(x,x) \in X]\]
Examples:
Symmetry
A relation $X \subseteq A \times A$ is symmetric if \[(\forall x,y \in A)[(x,y) \in X \Rightarrow (y,x) \in X]\]
Examples:
Transitivity
A relation $X \subseteq A \times A$ is transitive if \[(\forall x,y,z \in A)[((x,y) \in X \land (y,z) \in X) \Rightarrow (x,z) \in X]\]
Examples:
Function: Something that takes elements of set $X$ and maps them an element of set $Y$
$x \mapsto f(x), x \in X \land f(x) \in Y$
$f: X \mapsto Y$
Arrow Diagrams can be used to visualize
$f:\mathbb{N} \mapsto \mathbb{N}, f(x) = \frac{x}{2}$
$f:\mathbb{N} \mapsto \mathbb{Q}, f(x) = \frac{x}{2}$
$f:\mathbb{N} \mapsto \mathbb{Q}, f(x) = \frac{x}{2}$
$f:\mathbb{R^{>0}} \mapsto \mathbb{R}, f(x) = log(x)$
$f:\mathbb{N} \mapsto \mathbb{Z}, f(x) = 4$
$f:\mathbb{R} \mapsto \mathbb{R}, f(x) = \sqrt{x}$
Surjective
A function $f: X \mapsto Y$ is surjective(or onto) iff \[(\forall y \in Y)(\exists x \in X)[y = f(x)]\]
Examples:
Injective
A function $f: X \mapsto Y$ is injective (or 1-1) iff \[(\forall x_1,x_2 \in X)[(f(x_1) = f(x_2)) \Rightarrow x_1 = x_2]\]
Examples:
Note: $\vert Y\vert$ can be larger than $\vert X\vert$
Bijective
A function $f: X \mapsto Y$ is bijective (or a bijection) iff it is both injective and surjective
Examples: