chapter 1
1.1
sets
definition:
a set is a well-definied(it means it is possible to decide if a given object belongs to the collection or not) collection of objects called the elements or the members of the set.
example
the collection of all wooden chairs
importance
set theory is , in a sense, the fundation on which virtually all of mathematics is constructed.
properties
Certainty
Disorder
description
1.list all the element
2.specifying a property that the elements of the set have in common
notation
P(x):denote a sentence or statement P concerning the variable object x.
description way
{x|p(x)}
some sets usually used
- Z+:positive integers.1,2,3….
- N:positive integers or zaro,0,1,2,3…
- Z:integer,……-2,-1,0,1,2,3,4……..
- Q:rational number
R:real number.
∅
equal
- definition:A and B are equal if they have the same elements.
subsets
definition:
if every element of A is also an element of B,that is
whenever
x∈A
,then
x∈B
,we say that
A is a subset of Bor that A is contained in B , and we write
A⊂B
,and if A is not equal to B , then we write
A⫋B
.
description:
venn diagram.
property:
- ∅⊂A ,for every set A .
- A=B ↔ A⊂B,B⊂A
universal set
- we will assume that for each discussion there is a “universal
set” U,containing all the objects for which the discussion
is useful. - any other set mentioned in the discussion will automatcally
be assumed to be a subset of U.
finite and infinite
- if set A has n distinct elements,where n is in N,
- n is called the cardinality. use the denote |A|
- a set that is not finite is called infinite.
powerset
definition:
if A is a set , then the set of all subsets of A is called
the powerset of A .
denotion
P(A)
1.1 pre solution
1 .
true or false
A = {1,2,4,a,b,c}
则
{}∉A
solution:true
15.
let A = {1,2,5,8,11}.
then {3}
∉
A
solution:true
23
loading.. i have to ask it
44
1.2 operation on sets
union
definition
if A and B are sets , we define their union as the set consisting
of all the elements that belong to A or B.
denotion
A ∩ B
intersection
definition
if A and B are sets , we define their intersection as the set consisting
of all elements that belong to both A and B
denotion
A ∪ B
disjoint sets
definition
if A and B are sets , and A n B =
∅
, then we call
that they are disjoint sets.
extension
A1∩A2∩A3....An ,denoted as ⋂k=1nAk
A1∪A2∪A3....An ,denoted as ⋃k=1nAk
complement of B with respect to A
definition
if A and B are two sets , we define the complement of B with respect to A
as the set of all elements that belong to A and B , and we denote it by
A - B
complement
if U is a universal set containing A , then U - A is called
the complement of A
denotion
A¯
symmetric difference
if A and B are sets , we define their symmetric difference as the set
of all elements that belong to A or to B , but not to A and B .
denotion
A ⊕ B
Algebraic properties of set operation
Commutative Properties
1.A
∪
B = B
∪
A
2.A
∩
B = B
∩
B
Associative Properties
- A ∪ ( B ∪ C) = (A ∪ B) ∪ C
- A ∩ ( B ∩ C) = (A ∩ B) ∩ C
Distributive Properties
- A ∩ ( B ∪ c) = (A ∩ B) ∪ (A ∩ C)
- A ∩ ( B ∪ c) = (A ∩ B) ∪ (A ∩ C)
idempotent Properties
- A∪A=A
- A∩A=A
Properties of the complement
- A¯¯=A
- A∪A¯=A
- A∩A¯=∅
- ∅¯=U
- U¯=∅
- A∪B¯¯¯¯¯¯¯¯¯=A¯∩B¯
- A∩B¯¯¯¯¯¯¯¯¯=A¯∪B¯
Properties of a universal set
- A∪A=U
- A∩U=A
Properties of the empty set
- A∪∅=A
- A∩∅=∅
the addition principle
|A∪B|=|A|+|B|−|A∩B|
|A∪B∪C|=|A|+|B|+|C|−|A∩B|−|A∩C|−|B∩C|+|A∩B∩C|
1.3 sequence
sequence
definition
simply a list of objectsarranged in a definite order;
a first element,second element,third element.
Properties
- can be finite, or infinite.
- the element may be different , or some may be repeated.
- it may happen that how a sequence is to continue is not clear.
description method
- recursive: an = an - 1
- explict: an = n * n - 1
strings
definitions
Sequences of letters or other symbols , written without the
commas,are also referred to as strings.
the set corresponding to a sequence
definition:
the set of all distinct elements in the sequence.
array
- the idea of a sequence is important in computer science
where a sequence in sometimes called linear array or list
the distinction between a sequence and an array
- we think of all elements of sequence S as completely
- the point is that array S is consisdered to be a well-definied
object, even if some of the positions have not been assigned values
or if some values are changed during the discussion - the sequence of values of the array.
characteristic functions
definition
simply,think of a function on a set as a rule that assign some values
to each element of the set.if A is a subset of the universal set U
the characteristic function fA is defined for each x
∈
A
1.if x
∈
A ,
fA
= 1
2.if x
∉
A ,
fA
= 0
properties
- fA∩B=fAfB
- fA∪B=fA+fB−fAfB
- fA⊕B=fA+fB−2fAfB
computer representation of sets and subsets
description
to represent a set in a computer , the elements of the set must be
arranged in a sequence , when a universal set U = {
x1,x2..xn
}
and A is a subset,use the characteristic function to translate
the subset into a sequence of 0 and 1 of length n
- example
U = {1,2,3,4,5} subset A = {1,2,3}
then the sequence is 1,1,1,0,0
countable
- a set is called countable of it is the set corresponding
to some sequence .informally ,this means that the set can be arranged
in a list , with the first , second , annd so on , then the set can
therefore be called “counted” - all finite sets sre called countable.
- not all infinite sets are countable, they are called uncountable
- prove [0,1] is not countable
d1=0.a1a2a3...
d2=0.b1a2b3...
d3=0.c1a2c3...
…
then assume an x 0.x1x2...
ifa1==1x1=2elsex1=1
ifb2==1x2=2elsex2=1
ifc3==1x3=2elsex3=1
…
then we know x is not in the list.
strings and regular expressions
definition
given a set A , we can construct the set A* consisting of all
finite sequences of elements of A often , the set A is not a set of
numbers but some set of symbols.in this case , A is called an alphabet,
and the finite sequences in A* are called wordsfrom A. we assume that A* contains
empty sequence or empty string ,containing no symbols, and we denote this string
by
Λ
.
catenation
definition:
if w1 =
s1s2s3...sn
and w_2 =
t1t2t3...tk
are elements
of A* for some set A , we define the catenation of
w1
and
w2
as the sequence
s1s2...snt1t2..tk
denotion
w1⋅w2
propertie
- w⋅Λ=w
- Λ⋅w=w
A regular expression over A(正则表达式)
definition
a string constructed from the elements of A and the symbols(,),
⋁
*,
Λ
,according to the following definition.
RE1. the symbol
Λ
is a regular expression
RE2. if x
∈
A , the symbol x is a regular expression
RE3. if
α
and
β
are regular expressios , then
αβ
is regular
RE4. if
α
and
β
are regular expressios , then
α ⋁β
is regular.
Re5. if
α
is a regular expression , then the expression (
α
) * is regular
- RE1 and RE2 provides initial regular expressions , the other part of the definition
are used repetitively to define successively large sets of regular expressions those already
defined , thus the definition is recursively.
- associated with each regular expression over A , there is a corresponding subset of A*
,such sets are called regular subsets of A * or just regular sets if no reference to A is needed.
1. the expression
Λ
corresponding to the set {
Λ
}, where
Λ
is the empty string in
A∗
.
2. if x
∈
A , then the regular expression x corresponding to set {x}
3. if
α
and
β
are regular expressions corresponding to the subset M and N
of
A∗
then
αβ
corresponding to the M
⋅
N = {s
⋅
t|s
∈
M and t
∈
N}, thus M
⋅
N is the set of all catenations
of strings in M with string in N.
4. if
α
and
β
are regular expressions corresponding to the subset M and N , then
α⋁β
corresponding to
M∪N
5. if regular expression
α
corresponding to the subset M of
A∗
, then
(α)∗
corresponding to the set
M∗