L10 – Cardinality, Countability, Schröder–Bernstein, and Counting Rules for Sets and Multisets

Discrete Mathematics2026年4月5日发布 芮和
39.2K 810
8,561字
36–54 分钟

Cantor’s Diagonal Argument

1890/91, Cantor (1845-1918)

THEOREM: |(0,1)||+||(0,1)| \neq |\mathbb{Z}^+|

  • Suppose that |(0,1)|=|+||(0,1)| = |\mathbb{Z}^+|. Then there is a bijection f:+(0,1)f: \mathbb{Z}^+ \to (0,1)
  • Let bi={4,bii45,bii=4b_i = \begin{cases} 4, & b_{ii} \neq 4 \\ 5, & b_{ii} = 4 \end{cases} for i=1,2,3,i = 1,2,3,\dots
  • b=0.b1b2b3b4b5b6b7b8b9b = 0.b_1b_2b_3b_4b_5b_6b_7b_8b_9\cdots is in (0,1)(0,1)
  • b=0.b1b2b3b4b5b6b7b8b9b = 0.b_1b_2b_3b_4b_5b_6b_7b_8b_9 must have a preimage
    • however, bf(i)b \neq f(i) for every i=1,2,i = 1,2,\dots
  • ff cannot be a bijection

Cantor’s Theorem

THEOREM (Cantor) Let AA be any set. Then |A|<|𝒫(A)||A| < |\mathcal{P}(A)|.

  • 𝒫(A)\mathcal{P}(A): the power set of a set AA, i.e., the set of all subsets of AA
    • For example: 𝒫({1,2})={,{1},{2},{1,2}}\mathcal{P}(\{1,2\}) = \{\emptyset, \{1\}, \{2\}, \{1,2\}\}
  • |A||𝒫(A)||A| \leq |\mathcal{P}(A)|
    • The function f:A𝒫(A)f: A \to \mathcal{P}(A) defined by f(a)={a}f(a) = \{a\} is injective.
  • |A||𝒫(A)||A| \neq |\mathcal{P}(A)|
    • Assume that there is a bijection g:A𝒫(A)g: A \to \mathcal{P}(A)
    • Define two lists L={a}aAL = \{a\}_{a\in A}(=A= A) and R={g(a)}aAR = \{g(a)\}_{a\in A}(=𝒫(A)= \mathcal{P}(A))
    • Define X={a:aA and ag(a)}X = \{a: a \in A \text{ and } a \notin g(a)\}
    • We must have that XRX \in R.
      • X=g(x)X = g(x) for some xAx \in A
        • If xXx \in X, then xg(x)=Xx \notin g(x) = X
        • If xXx \notin X, then xg(x)=Xx \in g(x) = X

The Halting Problem

FunctionHALT(P,I)={“halts”if P(I) halts;“loops forever”if P(I) loops forever.\text{HALT}(P, I) =\begin{cases}\text{“halts”} & \text{if } P(I) \text{ halts}; \\\text{“loops forever”} & \text{if } P(I) \text{ loops forever}.\end{cases}

  • PP: a program; II: an input to the program PP.

QUESTION: Is there a Turing machine computing HALT\text{HALT}?

  • Turing machine: can be represented as an element of {0,1}\{0,1\}^*
  • {0,1}=n0{0,1}n\{0,1\}^* = \cup_{n\geq 0}\{0,1\}^n: the set of all finite bit strings

THEOREM: There is no Turing machine computing HALT\text{HALT}.

  • Assume there is a Turing machine 𝐇𝐀𝐋𝐓\textbf{HALT} computing HALT\text{HALT}
  • Define a new Turing machine 𝐓𝐮𝐫𝐢𝐧𝐠(P)\textbf{Turing}(P) that runs on any Turing machine PP
    • If 𝐇𝐀𝐋𝐓(P,P)=\textbf{HALT}(P, P) = “halts”, loops forever
    • If 𝐇𝐀𝐋𝐓(P,P)=\textbf{HALT}(P, P) = “loops forever”, halts
  • 𝐓𝐮𝐫𝐢𝐧𝐠(𝐓𝐮𝐫𝐢𝐧𝐠)\textbf{Turing}(\textbf{Turing}) loops forever 𝐇𝐀𝐋𝐓(𝐓𝐮𝐫𝐢𝐧𝐠,𝐓𝐮𝐫𝐢𝐧𝐠)=\implies \textbf{HALT}(\textbf{Turing}, \textbf{Turing}) = “halts” 𝐓𝐮𝐫𝐢𝐧𝐠(𝐓𝐮𝐫𝐢𝐧𝐠)\implies \textbf{Turing}(\textbf{Turing}) halts
  • 𝐓𝐮𝐫𝐢𝐧𝐠(𝐓𝐮𝐫𝐢𝐧𝐠)\textbf{Turing}(\textbf{Turing}) halts 𝐇𝐀𝐋𝐓(𝐓𝐮𝐫𝐢𝐧𝐠,𝐓𝐮𝐫𝐢𝐧𝐠)=\implies \textbf{HALT}(\textbf{Turing}, \textbf{Turing}) = “loops forever” 𝐓𝐮𝐫𝐢𝐧𝐠(𝐓𝐮𝐫𝐢𝐧𝐠)\implies \textbf{Turing}(\textbf{Turing}) loops forever

Countable and Uncountable

DEFINITION: A set AA is countable if |A|<|A| < \infty or |A|=|+||A| = |\mathbb{Z}^+|; otherwise, it is said to be uncountable.

  • countably infinite: |A|=|+||A| = |\mathbb{Z}^+|

EXAMPLE: ,+,,,,+,\mathbb{Z}^-, \mathbb{Z}^+, \mathbb{Z}, \mathbb{N}, \mathbb{Q}^-, \mathbb{Q}^+, \mathbb{Q} are countable; ,+,,(0,1),[0,1],(0,1],[0,1)\mathbb{R}^-, \mathbb{R}^+, \mathbb{R}, (0,1), [0,1], (0,1], [0,1) are uncountable.

THEOREM: A set AA is countably infinite if and only if its elements can be arranged as a sequence a1,a2,a_1, a_2, \dots

  • If AA is countably infinite, then there is a bijection f:+Af: \mathbb{Z}^+ \to A
    • ai=f(i)a_i = f(i) for every i=1,2,3i = 1,2,3 \dots
  • If A={a1,a2,}A = \{a_1, a_2, \dots\}, then the f:+Af: \mathbb{Z}^+ \to A defined by f(i)=aif(i) = a_i is a bijection

THEOREM: Let AA be countably infinite, then any infinite subset XAX \subseteq A is countable.

  • Let A={a1,a2,}A = \{a_1, a_2, \dots\}. Then X={ai1,ai2,}X = \{a_{i_1}, a_{i_2}, \dots\}

THEOREM: Let AA be uncountable, then any set XAX \supseteq A is uncountable.

  • If XX is countable, then AA is finite or countably infinite

THEOREM: If A,BA, B are countably infinite, then so is ABA \cup B

  • A={a1,a2,a3,},B={b1,b2,b3,}A = \{a_1, a_2, a_3, \dots\}, B = \{b_1, b_2, b_3, \dots\}
  • AB={a1,b1,a2,b2,a3,b3,}A \cup B = \{a_1, b_1, a_2, b_2, a_3, b_3, \dots\} // no elements will be included twice
    • Application: the set of irrational numbers is uncountable

THEOREM: If A,BA, B are countably infinite, then so is A×BA \times B

  • A={a1,a2,a3,},B={b1,b2,b3,}A = \{a_1, a_2, a_3, \dots\}, B = \{b_1, b_2, b_3, \dots\}
  • A×B={(a1,b1),(a1,b2),(a2,b1),(a1,b3),(a2,b2),(a3,b1),(a1,b4),}A \times B = \{(a_1, b_1), (a_1, b_2), (a_2, b_1), (a_1, b_3), (a_2, b_2), (a_3, b_1), (a_1, b_4), \dots\}

Schröder-Bernstein Theorem

QUESTION: How to compare the cardinality of sets in general?

  • ||=|+|=||=||=||=|+|=||=|×||\mathbb{Z}^-| = |\mathbb{Z}^+| = |\mathbb{Z}| = |\mathbb{N}| = |\mathbb{Q}^-| = |\mathbb{Q}^+| = |\mathbb{Q}| = |\mathbb{N} \times \mathbb{N}|
  • ||=|+|=||=|(0,1)|=|[0,1]|=|(0,1]|=|[0,1)||\mathbb{R}^-| = |\mathbb{R}^+| = |\mathbb{R}| = |(0,1)| = |[0,1]| = |(0,1]| = |[0,1)|
  • |+|<|[0,1)||\mathbb{Z}^+| < |[0,1)|
  • |+|<|𝒫(+)||\mathbb{Z}^+| < |\mathcal{P}(\mathbb{Z}^+)|
  • |𝒫(+)|?|[0,1)||\mathcal{P}(\mathbb{Z}^+)|\,?\,|[0,1)|

THEOREM: If |A||B||A| \leq |B| and |B||A||B| \leq |A|, then |A|=|B||A| = |B|.

EXAMPLE: Show that |(0,1)|=|[0,1)||(0,1)| = |[0,1)|

  • |(0,1)||[0,1)||(0,1)| \leq |[0,1)|
    • f:(0,1)[0,1), xx2f: (0,1) \to [0,1),\ x \mapsto \frac{x}{2} is injective
  • |[0,1)||(0,1)||[0,1)| \leq |(0,1)|
    • g:[0,1)(0,1), xx4+12g: [0,1) \to (0,1),\ x \mapsto \frac{x}{4} + \frac{1}{2} is injective

EXAMPLE: |𝒫(+)|=|[0,1)||\mathcal{P}(\mathbb{Z}^+)| = |[0,1)|

  • |𝒫(+)||[0,1)||\mathcal{P}(\mathbb{Z}^+)| \leq |[0,1)|
    • f:𝒫(+)[0,1), {a1,a2,}0.1a11a2f: \mathcal{P}(\mathbb{Z}^+) \to [0,1),\ \{a_1, a_2, \dots\} \mapsto 0.\dots 1_{a_1} \dots 1_{a_2} \dots is an injection.
  • |[0,1)||𝒫(+)||[0,1)| \leq |\mathcal{P}(\mathbb{Z}^+)|
    • x[0,1),x=0.r1r2\forall x \in [0,1), x = 0.r_1r_2\dots (r1,r2,{0,,9}r_1, r_2, \dots \in \{0, \dots, 9\}, no 9˙\dot{9})
      • 00000,10001,,910010 \leftrightarrow 0000, 1 \leftrightarrow 0001, \dots, 9 \leftrightarrow 1001
      • xx has a binary representation x=0.b1b2x = 0.b_1b_2\dots
        • f:[0,1)𝒫(+), x{i:i+,bi=1}f: [0,1) \to \mathcal{P}(\mathbb{Z}^+),\ x \mapsto \{i: i \in \mathbb{Z}^+, b_i = 1\} is an injection

THEOREM: |+|0<|𝒫(+)|20=|[0,1)|=|(0,1)|=||c\underset{\aleph_0}{{|\mathbb{Z}^+|}} < \underset{2^{\aleph_0}}{{|\mathcal{P}(\mathbb{Z}^+)|}} = |[0,1)| = |(0,1)| = \underset{c}{{|\mathbb{R}|}}

The Continuum Hypothesis: There is no cardinal number between 0\aleph_0 and cc, i.e., there is no set AA such that 0<|A|<c\aleph_0 < |A| < c.


Basic Rules of Counting

DEFINITION: Let AA be a finite set. A partition of set AA is a family {A1,A2,,Ak}\{A_1, A_2, \dots, A_k\} of nonempty subsets of AA such that

  • i=1kAi=A\bigcup_{i=1}^k A_i = A
  • AiAj=A_i \cap A_j = \emptyset for all i,j[k]i,j \in [k] with iji \neq j.

The Sum Rule: Let AA be a finite set. Let {A1,A2,,Ak}\{A_1, A_2, …, A_k\} be a partition of AA. Then |A|=|A1|+|A2|++|Ak||A| = |A_1| + |A_2| + \dots + |A_k|.

The Product Rule: Let A1,A2,,AkA_1, A_2, …, A_k be finite sets. Then |A1×A2××Ak|=|A1|×|A2|××|Ak||A_1 \times A_2 \times \dots \times A_k| = |A_1| \times |A_2| \times \dots \times |A_k|.

The Bijection Rule: Let AA and BB be two finite sets. If there is a bijection f:ABf: A \to B, then |A|=|B||A| = |B|.


Permutations of Set

DEFINITION: Let A={a1,,an}A = \{a_1, …, a_n\} and r[n]r \in [n]. An rr-permutation of AA is a sequence of rrdistinct elements of A.

  • An nn-permutation of AA is simply called a permutation of AA.
    • The 2-permutations of A={1,2,3}A = \{1,2,3\} are 1,21,2; 1,31,3; 2,12,1; 2,32,3; 3,13,1; 3,23,2

THEOREM: An nn-element set has P(n,r)=n!(nr)!P(n,r) = \frac{n!}{(n-r)!} different rr-permutations.

DEFINITION: Let A={a1,,an}A = \{a_1, …, a_n\} and r1r \geq 1. An rr-permutation of AA with repetition is a sequence of rr elements of AA.

  • The 2-permutations of A={1,2,3}A = \{1,2,3\} with repetition are:
    • 1,11,1; 1,21,2; 1,31,3; 2,12,1; 2,22,2; 2,32,3; 3,13,1; 3,23,2; 3,33,3

THEOREM: An nn-element set has nrn^r different rr-permutations with repetition.


Multiset

DEFINITION: A multiset is a collection of elements which are not necessarily different from each other.

  • An element xAx \in A has multiplicitymm if it appears mm times in AA.
  • A multiset AA is called an nn-multiset if it has nn elements.
  • A={n1a1,n2a2,,nkak}A = \{n_1 \cdot a_1, n_2 \cdot a_2, …, n_k \cdot a_k\}: an (n1+n2++nk)(n_1 + n_2 + \dots + n_k)-multiset
    • aia_i has multiplicity nin_i for all i[n]i \in [n].
  • T={t1a1,t2a2,,tkak}T = \{t_1 \cdot a_1, t_2 \cdot a_2, …, t_k \cdot a_k\} is called an rr-subset of AA if:
    • 0tini0 \leq t_i \leq n_i for every i[k]i \in [k], and
    • t1+t2++tk=rt_1 + t_2 + \dots + t_k = r

EXAMPLE: A={1a,2b,3c,100z}A = \{1 \cdot a, 2 \cdot b, 3 \cdot c, 100 \cdot z\}, T={1b,98z}T = \{1 \cdot b, 98 \cdot z\}

  • AA is a 106-multiset; the multiplicities of a,b,c,za,b,c,z are 1,2,3,1001,2,3,100, respectively.
  • TT is a 99-subset of AA

Permutations of Multiset

DEFINITION: Let A={n1a1,,nkak}A = \{n_1 \cdot a_1, …, n_k \cdot a_k\} be an nn-multiset. A permutation of AA is a sequence x1,x2,,xnx_1, x_2, \dots, x_n of nn elements, where aia_i appears exactly nin_i times for every i[k]i \in [k].

  • rr-permutation of AA: a permutation of some rr-subset of AA
    • Example: A={1a,2b,3c}A = \{1 \cdot a, 2 \cdot b, 3 \cdot c\}
    • a,b,c,b,c,ca,b,c,b,c,c is a permutation of AA; b,c,bb,c,b is a 3-permutation of AA;

THEOREM: Let A={n1a1,n2a2,,nkak}A = \{n_1 \cdot a_1, n_2 \cdot a_2, …, n_k \cdot a_k\} be a multiset. Then AA has exactly (n1+n2++nk)!n1!n2!nk!\frac{(n_1+n_2+\dots+n_k)!}{n_1!n_2!\dots n_k!} permutations.

REMARK: Let A={a1,a2,,an}A = \{a_1, a_2, …, a_n\} be a set of nn elements.

  • rr-permutation of AA w/o repetition: rr-permutation of {1a1,,1an}\{1 \cdot a_1, …, 1 \cdot a_n\}.
  • rr-permutation of AA with repetition: rr-permutation of {a1,,an}\{\infty \cdot a_1, …, \infty \cdot a_n\}.
© 版权声明

相关文章

81 条评论

  • 韵染山河
    韵染山河 读者

    停机问题那个反证法逻辑太秀了,看完起鸡皮疙瘩。

    丹麦
    回复
  • 京剧情深
    京剧情深 读者

    对角线法那块绕得我脑壳疼

    中国
    回复
  • 天穹星
    天穹星 游客

    所以无穷大真的能分等级?有点颠覆认知。

    中国湖北
    回复
  • 流浪星尘
    流浪星尘 读者

    连续统假设居然还没被证明或否定,有点意外

    荷兰
    回复
  • 松鼠饼干
    松鼠饼干 读者

    这证明看得我云里雾里

    美国
    回复
    • 回忆栈
      回忆栈 读者

      同感,数学证明好绕

      中国广东@ 松鼠饼干
      回复
  • 木叶风
    木叶风 游客

    能不能把构造b的步骤图示一下,我总是弄错哪一步,求大神指点。

    中国浙江
    回复
  • 跳跃音符
    跳跃音符 读者

    这个b的构造方法确实精妙,但理解起来费劲。

    中国山东
    回复
  • NervousNebula
    NervousNebula 读者

    康托尔对角线证明还挺巧妙

    法国
    回复
  • 吴十
    吴十 游客

    以前学到这里就卡住,现在再看还是头疼。

    日本
    回复
  • 赤焰狂想
    赤焰狂想 读者

    这证明真的好抽象。

    中国北京
    回复
    • 嗒嗒钟
      嗒嗒钟 游客

      抽象是必然,我自己也常被绕晕。

      中国内蒙古@ 赤焰狂想
      回复
  • 舞动节拍
    舞动节拍 读者

    好像跟数数能力有关?

    中国河北
    回复
  • 孤灯独影
    孤灯独影 游客

    感觉这证明过程绕来绕去的,直接记结论算了。

    中国黑龙江
    回复
  • 长安旅人
    长安旅人 读者

    是不是学了这个就能理解无穷大也有大小了?

    中国湖南
    回复
  • 虚无漫游者
    虚无漫游者 读者

    哎,数学又坑我。

    中国香港
    回复
  • SpecterSnarl
    SpecterSnarl 游客

    这课讲得这么硬核,听得进去的都是大神吧。

    中国北京
    回复
    • 混沌学者
      混沌学者 游客

      大神的世界,我等凡人看看就好。

      日本@ SpecterSnarl
      回复
  • 暮光骑士
    暮光骑士 游客

    所以(0,1)里的数就是数不完呗?

    韩国
    回复
  • 囚牛听雨
    囚牛听雨 游客

    证明过程看晕了,结论我信了就行。

    中国北京
    回复
  • 蹦蹦跳跳
    蹦蹦跳跳 游客

    纯路人,这图里画的是啥?有人科普下不?

    中国浙江
    回复
  • 茶香满巷
    茶香满巷 游客

    看不懂,直接划掉。

    中国台湾
    回复
  • 角落艺术家
    角落艺术家 读者

    这个构造b的方法挺巧妙的,就是步骤太绕了。

    菲律宾
    回复
  • 血月独行
    血月独行 读者

    对角线法太巧了。

    中国上海
    回复
  • 金石
    金石 游客

    实数比整数多?这数学世界真够魔幻的。

    中国山东
    回复
  • Serene_静谧
    Serene_静谧 游客

    实数比整数多,太惊讶了。

    澳大利亚
    回复
  • 泡泡鱼
    泡泡鱼 游客

    这图真是绕晕脑袋。

    中国广东
    回复
  • 节拍大师
    节拍大师 读者

    证明过程是有点绕,但结论记住了就行。

    中国西藏
    回复
  • 冷面小狐狸
    冷面小狐狸 游客

    之前学集合论卡在这好几天,现在也没完全搞懂😭

    中国辽宁
    回复
  • 荒野之眼
    荒野之眼 游客

    对角线法每次看都懵,有人能简单说说吗?

    中国广东
    回复
  • 独坐夜窗
    独坐夜窗 读者

    康托尔定理证明过程挺绕的

    中国重庆
    回复
  • 企鹅酷
    企鹅酷 读者

    对角线证明太巧妙了

    中国河南
    回复
  • 思维云饲养员
    思维云饲养员 读者

    多重集排列公式记不住啊

    中国浙江
    回复
  • 红豆冰沙
    红豆冰沙 读者

    多重集计数公式还挺实用的

    中国河北
    回复
  • 布丁云
    布丁云 读者

    幂集那部分概念挺难懂的

    中国山东
    回复
    • 极客
      极客 读者

      同感,这部分我也卡了很久

      荷兰@ 布丁云
      回复
  • 孤影刀狂
    孤影刀狂 读者

    停机问题这部分有点烧脑

    中国浙江
    回复
    • 绘画艺术家
      绘画艺术家 读者

      同感,这部分确实绕

      美国@ 孤影刀狂
      回复
  • 豹子快
    豹子快 读者

    这证明思路有点绕

    中国宁夏
    回复
  • 屑
    读者

    康托尔对角线法挺有意思的

    中国江苏
    回复
  • 梦回鲸歌
    梦回鲸歌 读者

    这证明过程绕得我有点晕

    中国
    回复
    • Dewdrop Lotus
      Dewdrop Lotus 读者

      同感,绕来绕去的

      中国山东@ 梦回鲸歌
      回复
  • 鼓手严
    鼓手严 读者

    数学证明总让人头大

    中国河南
    回复
  • 社交恐惧者
    社交恐惧者 游客

    看了好几遍,感觉这个证明过程的核心思想抓住了。

    中国陕西
    回复
  • 荔枝气泡饮
    荔枝气泡饮 游客

    看不懂,但图挺好看的。

    中国江苏
    回复
  • 脸滚键盘打字员
    脸滚键盘打字员 读者

    所以无穷大确实有不同的大小等级,对吧?

    中国北京
    回复
  • 芙蓉女儿
    芙蓉女儿 游客

    有没有更直观的例子来解释这个对角线法啊?

    中国广东
    回复
  • 流星过客
    流星过客 游客

    之前学集合论就卡在这,现在还是有点懵。

    日本
    回复
  • 虚境漫游
    虚境漫游 游客

    (0,1)区间居然比整数多?这数学逻辑简直在挑战常识啊

    中国陕西
    回复
  • ShadowDrift
    ShadowDrift 游客

    实数居然比整数多,数学果然反直觉。

    中国内蒙古
    回复
  • 尘埃哨兵
    尘埃哨兵 读者

    基数不等这个结论太反直觉了,明明感觉都能数得清。

    中国北京
    回复
  • 自闭但友善
    自闭但友善 游客

    图里那个b的构造我好像有点懂了,但又没完全懂。

    日本
    回复
  • 火羽
    火羽 游客

    这个证明当初学的时候卡了好久,现在再看还是觉得精妙。

    中国广东
    回复
  • 荒野之狼
    荒野之狼 读者

    所以康托尔用这个方法证明了实数比整数多?

    中国福建
    回复
  • 鬼刹
    鬼刹 游客

    对角线法就是构造一个不在列表里的实数,挺巧妙的。

    中国天津
    回复
  • 霞光射手
    霞光射手 游客

    对角线法这图看着真绕,脑子有点转不过弯来🤔

    中国浙江
    回复