--- title: 離散 part5 ------ title: 離散 part5 --- {%hackmd @NTNUCSIE112/DM_card %} # Set and functions Ch.2 Basic Structure: Sets, Functions, Sequences, Sums, and Matrices Reading assigned: 2.1, 2.2.1-2.2.3, 2.3.1-2.3.3, 2.5 ## Cardinality (size) of a set (集合的元素個數) The number of elements in a set S is called the size/cardinality of S, denoted by |S|. - e.g. S = {1, 2, 3, 4} --> |S| = 4. Q: What is the cardinality of ? (Ans. ?) Q: What is the cardinality of ? ? ? (Ans. ?) Cantor (186x -- double check --) - Consider and . -- , --> |N| < |Z|? Q: why |N| = |Z|? ## Function A founction: $f: S\to T$ is a "specific" mapping between element of $S$ and $T$ is such a way that "every element of $S$" corresponds to "an" element of $T$. e.g. ![](https://i.imgur.com/JVx6wTl.png) ![](https://i.imgur.com/e9nRMPS.png) ## Set ### Definition (Countable set). A set S is countable if S is finite or |S|=|N|.(If S is infinite, we say that S contains countably infinite elements) ### Theorem Any subset of a countable set is countable > 舉出所有有理數 <!-- 以下為課本(原文)章節 reading assignment 的 --> ## 2.1 Set ### 2.1.1 Introduction ### 2.1.2 Venn Diagrams ### 2.1.3 Subsets ### 2.1.4 The Size of a Set ### 2.1.5 Power Sets ### 2.1.6 Cartesian Products ### 2.1.7 Using Set Notation with Quantifiers ### 2.1.8 Truth Sets and Quantifiers ## 2.2 ### 2.2.1 ### 2.2.2 ### 2.2.3 ## 2.3 ### 2.3.1 ### 2.2.2 ### 2.3.3 ## 2.5 ### 2.5.1 ### 2.5.2 Countable Set #### Hilbert's Grand Hotel [TED - youtube](https://www.youtube.com/watch?v=Uj3_KqkI9Zo) The Grand Hotel has infinite number of rooms. The rooms are numbered from 1, 2, 3, ..., and each room is occupied by a guest. -- A new guest arrives. Q: Can you accommodate the new guest at the Grand Hotel? ### 2.5.3