From b1cb20b7f77940a29e28c95b41e47fe37114d719 Mon Sep 17 00:00:00 2001 From: eggy Date: Fri, 17 Feb 2023 11:21:40 -0500 Subject: [PATCH] ece108: start relations --- docs/1b/ece108.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/docs/1b/ece108.md b/docs/1b/ece108.md index 40ea36d..47c33be 100644 --- a/docs/1b/ece108.md +++ b/docs/1b/ece108.md @@ -622,4 +622,53 @@ A set is **finite** if it is empty or it is mappable to a subset of the natural $$\exists n\in\mathbb N,\exists f\text{ is bijective}, f:S\to \mathbb N_n,|s|=n$$ +### Uncountable sets +The cardinality of countable sets is relative to the cardinality of the set of **natural numbers**. + +$$|\mathbb N|=\aleph_0$$ + +By Contor's theorem, the powerset of the natural numbers must have a larger cardinality than the set of natural numbers. + +$$|X|=\aleph_0\implies|\mathcal P(X)|=2^{\aleph_0}>\aleph_0$$ + +The following can be taken for granted: + +- $|\mathbb R|>|\mathbb N|$ +- $|\mathcal P(\mathbb N)|>|\mathbb N|$ +- $|\mathcal P(\mathbb N)|=|\mathbb R|$ + +## Relations + +A **binary relation** $R$ from sets $A$ to $B$ must be a subset of the two. A relation from $A$ to $A$ can be written as $R\subseteq A^2$. + +$$R\subseteq A\times B$$. + +!!! example + - $\forall x,y\in A,B,x|a\in A\}$$ + +The **universal relation** relates each element in the first set to every element to the second set. + +$$U=A^2$$ + +The **restriction** of relation $R$ to set $B$ limits a previous relation on a superset $A$ such that $B\subseteq A$. + +$$R\big|_B=R\cap B^2$$ + +Graphs are often used to represent relations. A node from $4\to3$ can be represented as $\left<3,4\right>$, much like an adjacency list.