Set
Tuple 元组
Definition: Are finite ordered list of elements
有限且有序的元素列表
Set 集合
Definition: are (unordered) collections of objects called elements or members of the set
Set is unordered and no duplicate.
Set cardinality 基数
Definition: is the number of elements of a set S, denoted |S|
集合中元素的数量,不包括空集。
Relation between two set
A=B:A is equal to B if A and B have the same elements
A和B相等就是A和B有相同的元素
A is disjoint from B if and only if there is no element that is in both A and B.
A与B不相交就是没有元素同时在A和B中
A⊆B: A is a subset of B if and only if every element in A is in B
A 是 B的子集,当且仅当A中所有的元素都在B中
A⊂B: A is a proper subset of B if and only if A is a subset of B but B is not a subset of A.
proper subset :真子集
Unary Set Operations 一元集合操作
Powset() 幂集
Definition: is the set of all subsets of A
Complement 补集
Definition: is the difference between the universal set and A
Universal:全集
Binary set operations 二元集合操作
Union 并集
Definition: include all elements in A or in B or in A and B
intersection 交集
Definition: all elements that are in A and in B
Difference
Definition:all elements that are in A but not
in B
Cartesian product
Definition:AXB is the set whose members are all possible ordered pairs (a, b) where a is a member of A and b is a member of B
有序对