跳转至

Basic Structures

Basic Structures

2.1 Sets

  • elements or members : aAa ∈ A or aAa ∉ A
  • describe a set : use roster method or set builder notation
  • equal if and only if have the same elements
  • subject : ABA ⊆ B or ABA ⊈ B
  • superset : BAB ⊇ A
  • proper subset : ABA ⊂ B

  • If there are exactly nn distinct elements in SS where nn is a nonnegative integer, we say that SS is a finite set and that nn is the cardinality of SS. The cardinality of SS is denoted by S|S|

  • A set is said to be infinite if it is not finite
  • The power set of SS is the set of all subsets of the set SS, which is denoted by P(S)P(S)

  • ordered n-tuple : (a1,a2,,an)(a_1, a_2, … , a_n)

  • ordered pairs : (a1,a2)(a_1, a_2)
  • Cartesian product : A1×A2××An={(a1,a2,,an)aiAi  for  i=1,2,,n}A1 × A2 × ⋯ × An = \{(a_1, a_2, … , a_n) ∣ a_i ∈ A_i \; for \; i = 1, 2, … , n\}
  • A subset RR of the Cartesian product A×BA × B is called a relation from the set AA to the set BB

  • xS(P(x))∀x ∈ S(P(x)) is shorthand for x(xSP(x))∀x(x ∈ S → P(x))

  • xS(P(x))∃x ∈ S(P(x)) is shorthand for x(xSP(x))∃x(x ∈ S ∧ P(x))
  • We define the truth set of PP to be the set of elements xx in DD for which P(x)P(x) is true, which is denoted by {xDP(x)}\{x ∈ D ∣ P(x)\}


2.2 Set Operations

  • union : ABA ∪ B
  • intersection : ABA ∩ B
    • Two sets are called disjoint if their intersection is the empty set
  • difference of A and B or complement of B with respect to A : ABA − B
  • complement : Aˉ\bar{A}
Identity Name
AU=AA ∩ U = A
A=AA ∪∅= A
Identity laws
AU=UA ∪ U = U
A=A ∩∅=∅
Domination laws
AA=AA ∪ A = A
AA=AA ∩ A = A
Idempotent laws
(Aˉ)=A\overline{(\bar A)} = A Complementation law
AB=BAA ∪ B = B ∪ A
AB=BAA ∩ B = B ∩ A
Commutative laws
A(BC)=(AB)CA ∪ (B ∪ C) = (A ∪ B) ∪ C
A(BC)=(AB)CA ∩ (B ∩ C) = (A ∩ B) ∩ C
Associative laws
A(BC)=(AB)(AC)A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C)
A(BC)=(AB)(AC)A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)
Distributive laws
(AB)=AˉBˉ\overline{(A ∩ B)} = \bar A ∪ \bar B
(AB)=AˉBˉ\overline{(A ∪ B)} = \bar A ∩ \bar B
De Morgan's laws
A(AB)=AA ∪ (A ∩ B) = A
A(AB)=AA ∩ (A ∪ B) = A
Absorption laws
AAˉ=UA ∪ \bar A = U
AAˉ=A ∩ \bar A = ∅
Complement laws
  • A multiset (short for multiple-membership set) {m1a1,m2a2,,mrar}\{m_1 ⋅ a_1, m_2 ⋅ a_2, … , m_r ⋅ a_r\} is an unordered collection of elements where an element can occur as a member more than once. The numbers mi,i=1,2,,rm_i , i = 1, 2, … , r, are called the multiplicities of the elements ai,i=1,2,,ra_i , i = 1, 2, … , r
  • In the union of the multisets P and Q, the multiplicity is the maximum
  • In the intersection of the multisets P and Q, the multiplicity is the minimum
  • In the difference of P and Q, the multiplicity is the difference of P less Q unless this difference is negative
  • In the sum of P and Q, the multiplicity is the sum of multiplicities in P and Q


2.3 Functions

  • A function ff from AA to BB is an assignment of exactly one element of BB to each element of AA.
  • We write f(a)=bf(a) = b if bb is the unique element of BB assigned by the function ff to the element aa of AA, and we say that bb is the image of aa and aa is a preimage of bb. The range, or image of ff, is the set of all images of elements of AA
  • If ff is a function from AA to BB, we write f:ABf : A → B and we say that AA is the domain of ff and BB is the codomain of ff.
  • Let f1f_1 and f2f_2 be functions from AA to RR. Then f1+f2f_1 + f_2 and f1f2f_1 f_2 are also functions from AA to RR defined for all xAx ∈ A by
    • (f1+f2)(x)=f1(x)+f2(x)(f_1 + f_2)(x) = f_1(x) + f_2(x)
    • (f1f2)(x)=f1(x)f2(x)(f_1f_2)(x) = f_1(x)f_2(x)
  • The image of SS : f(S)={tsS(t=f(s))}f(S) = \{t ∣ ∃s∈S (t = f(s))\} or {f(s)sS}\{f(s) ∣ s ∈ S\}

  • A function ff is said to be one-to-one, or an injection, if and only if f(a)=f(b)f(a) = f(b) implies that a=ba = b for all aa and bb in the domain of ff. A function is said to be injective if it is one-to-one

  • A function f from A to B is called onto, or a surjection, if and only if for every element bBb ∈ B there is an element aAa ∈ A with f(a)=bf(a) = b. A function is called surjective if it is onto
  • The function f is a one-to-one correspondence, or a bijection, if it is both one-to-one and onto. We also say that such a function is bijective

  • The inverse function of ff is denoted by f1f^{−1}

  • Let gg be a function from the set AA to the set BB and let ff be a function from the set BB to the set CC, then the composition of the functions ff and gg is denoted by fgf \circ g
  • The value of the floor function at xx is denoted by x⌊x⌋
  • The value of the ceiling function at xx is denoted by x⌈x⌉
  • A partial function ff from AA to BB is an assignment to each element aa in a subject of AA, called the domain of definition of ff , of a unique element bb in BB. We say that ff is undefined for elements in AA that are not in the domain of definition of ff. When the domain of definition of ff equals AA, we say that ff is a total function


2.5 Cardinality of Sets

  • The sets AA and BB have the same cardinality if and only if there is a one-to-one correspondence from AA to BB, and this is denoted by A=B|A| = |B|
  • If there is a one-to-one function from AA to BB, we write AB|A| ≤ |B|
  • A set that is either finite or has the same cardinality as the set of positive integers is called countable, and we denote the cardinality of this set by 0ℵ_0. We write S=0|S| = ℵ_0 and say that SS has cardinality "aleph null"

  • If AA and BB are countable sets, then ABA ∪ B is also countable

  • Schröder-Bernstein theorem : If AA and BB are sets with AB|A| ≤ |B| and BA|B| ≤ |A|, then A=B|A| = |B|. In other words, if there are one-to-one functions ff from AA to BB and gg from BB to AA, then there is a one-to-one correspondence between AA and BB


2.6 Matrices

Zero-One Matrices - Let A=[aij]A = [a_{ij}] and B=[bij]B = [b_{ij}] be m×nm × n zero–one matrices, then: - The join of AA and BB is the zero–one matrix with (i,j)(i, j)th entry aijbija_{ij} ∨ b_{ij}. The join of AA and BB is denoted by ABA ∨ B. - The meet of AA and BB is the zero–one matrix with (i,j)(i, j)th entry aijbija_{ij} ∧ b_{ij}. The meet of AA and BB is denoted by ABA ∧ B. - Let A=[aij]A = [a_{ij}] be an m×km × k zero–one matrix and B=[bij]B = [b_{ij}] be a k×nk × n zero–one matrix. Then the Boolean product of AA and BB, denoted by ABA \odot B, is the m×nm × n matrix with (i,j)(i, j)th entry cijcij where cij=(ai1b1j)(ai2b2j)(aikbkj) c_{ij} = (a_{i1} ∧ b_{1j}) ∨ (a_{i2} ∧ b_{2j}) ∨ ⋯ ∨ (a_{ik} ∧ b_{kj}) - The rrth Boolean power of AA is the Boolean product of rr factors of AA. The rrth Boolean product of AA is denoted by A[r]A^{[r]}. - We also define A[0]A^{[0]} to be InI_n.