Note 0
Review of Sets and Mathematical Notation
Set(集合)
A set s a well defined collection of objects. These objects are called elements or members of the set
Two sets A and B are said to be equal, written as A = B, if they have the same elements.
Cardinality
Size of a set is called cardinality. It is possible for the cardinality of a set to be 0. This set is called the empty set.
Subsets and Proper Subsets
If every element of a set A is also in set B, then we say that A is a subset of B, written A
⊆
\subseteq
⊆ B
A proper subset is a set A that is strictly contained in B, written as A
⊂
\subset
⊂ B, meaning that A excludes at least one element of B
以下是一些markdown语法
符号 | 代码 |
---|---|
∈ \in ∈ | \in |
∋ \ni ∋ | \ni |
∉ \notin ∈/ | \notin |
⊂ \subset ⊂ | \subset |
⊃ \supset ⊃ | \supset |
⊆ \subseteq ⊆ | \subseteq |
⊇ \supseteq ⊇ | \supseteq |
⊊ \subsetneq ⊊ | \subsetneq |
⊋ \supsetneq ⊋ | \supsetneq |
⊄ \not\subset ⊂ | \not\subset |
⊅ \not\supset ⊃ | \not\sepset |
Intersections and Unions
The intersection of a set A with a set B, written as A∩B, is a set containing all elements which are in both A and B. Two sets are said to be disjoint if A∩B = /0. The union of a set A with a set B, written as A∪B, is a set of all elements which are in either A or B or both.
# python中intersection()和union()函数可以求集合的交集与并集
m = "abcde"
n = "def"
m = set(m)
n = set(n)
u = m.intersection(n)
print(u)
# de
v = m.union(n)
print(v)
# abcdef
Complements
If A and B are two sets, then the relative complement of A in B, written as B − A or B\A, is the set of elements in B, but not in A: B
A \A = 0
A \0 = A
0 \A = 0
Significant Sets
- N \mathbb{N} N 自然数
- Z \mathbb{Z} Z 整数
- Q \mathbb{Q} Q 实数
- R \mathbb{R} R 有理数
- C \mathbb{C} C 复数
$\mathbb{i}$ i=N,Z,Q,R,C
Cartesian product (笛卡尔乘积)
A × B, is the set of all pairs whose first component is an element of A and whose second component is an element of B. In set notation, A × B = {(a,b) | a ∈ A,b ∈ B}.
Mathematical notation
Sums and Products
∑
\sum
∑ : \sum
p =
∑
n
=
1
N
a
n
\sum_{n=1}^Na_n
∑n=1Nan : p = \sum_{n=1}^Na_n
∏
\prod
∏ : \prod
∏
i
=
1
n
\prod_{i=1}^{n}
∏i=1n : \prod_{i=1}^{n}
这一章note都是一些前置的基础概念,主要来复习一下markdown语法(随机看到一段python的用法顺带记录一下)
2023-08-11 11:46