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 条评论

  • 诗行远方
    诗行远方 游客

    之前学到这里直接放弃,现在还是没懂

    中国湖北
    回复
  • 铁匠杨
    铁匠杨 读者

    这图看得我头大,数学太难了😵

    中国湖南
    回复
  • 孤鸿剑士
    孤鸿剑士 游客

    我曾经在自学集合论时卡在对角线构造上,反复画图才悟到每位数字都要翻转,过程虽绕但真的很有成就感。

    中国上海
    回复
  • 纸间风雅
    纸间风雅 读者

    如果把(0,1)换成[0,1],结论还能成立吗?

    中国广东
    回复
  • 主旋律
    主旋律 游客

    结论记住了,过程放弃了,考试别考太细就行。

    中国广东
    回复
  • 橙花香气
    橙花香气 游客

    函数f的定义怎么保证是单射?求详细解释。

    中国河南
    回复
  • 甜筒小雪人
    甜筒小雪人 游客

    数学课上这段,老师都不敢讲。

    中国浙江
    回复
  • 黑色梦境
    黑色梦境 游客

    有更通俗的解释吗?这种证明太抽象了。

    韩国
    回复
  • 鬼火飘
    鬼火飘 游客

    实数比整数多,那有没有比实数还多的?

    中国吉林
    回复
  • 人群躲避者
    人群躲避者 游客

    纯数学劝退,看不懂直接跳过。

    马来西亚
    回复
  • 翡翠祭司
    翡翠祭司 读者

    图里那个对角线数字改来改去,到底想说明啥?

    中国广东
    回复
  • 星垂野
    星垂野 游客

    以前卡这几天,这次总算抓住要点。

    中国香港
    回复
  • 糯米小团
    糯米小团 读者

    对角线法每次看都懵,脑子转不过弯。

    日本
    回复
  • 尘埃里的诗
    尘埃里的诗 游客

    看完直接想把实数装进口袋,笑。

    中国北京
    回复
  • 清热解毒
    清热解毒 游客

    这图真是脑洞大开,直接惊到我 😂

    日本
    回复
  • 暗影君主
    暗影君主 游客

    以前学这部分卡了好几天,今天重新看才明白,原来是利用无限二进制展开制造新数,真是脑洞大开。

    中国河北
    回复
  • 节度使
    节度使 读者

    我刚刚复习了集合论,发现对角线法的核心是找不到对应的列表。

    美国
    回复
  • 松间鹤
    松间鹤 读者

    对角线证明真是脑洞大

    中国山东
    回复
  • 大喇叭
    大喇叭 读者

    连续统假设这玩意没定论?

    中国浙江
    回复
  • 银月法师
    银月法师 读者

    有理数居然可数…以前完全没想过

    中国山东
    回复
    • 剑气如虹
      剑气如虹 读者

      第一次听说确实挺反直觉

      中国湖南@ 银月法师
      回复
  • 铜望远镜
    铜望远镜 读者

    多重集那个公式看着眼熟,但细节还是蛮绕的。

    美国
    回复
  • Blackout Poet
    Blackout Poet 读者

    原来无限还能比大小,离谱

    中国山东
    回复