Chapter 3 Set Theory
Download
Report
Transcript Chapter 3 Set Theory
Chapter 3
Set Theory
Yen-Liang Chen
Dept of Information Management
National Central University
1
3.1 Sets and subsets
Definitions
– Element and set , Ex 3.1
– Finite set and infinite set, cardinality A ,
Ex 3.2
– CD a subset, CD a proper subset
– C=D, two sets are equal
– Neither order nor repetition is relevant
for a general set
– null set, {},
2
Subset relations
AB
x [xAxB]
B
A
x [xAxB]
x [xAxB]
x [(xA)(xB)]
x [xA(xB)]
x [xAxB]
3
Subset relations
AB
(ABBA)
(AB)(BA)
(A B) (B A)
AB
AB AB
4
Ex 3.5
5
Theorems 3.1. and 3.2
Theorem 3.1
–
–
–
–
If
If
If
If
AB
AB
AB
AB
and
and
and
and
BC,
BC,
BC,
BC,
then
then
then
then
AC,
AC,
AC,
AC,
Theorem 3.2
– A. If A is not empty, then A.
6
Power set
For
any finite set A with A =n, the
total number of subsets of A is 2n.
Definition 3.4. the power set of A,
denoted as (A) is the collection of
all subsets of A.
What is the power set of {1, 2,3 4}?
7
Ex 3.10
Count the number of paths in the xy-plane
from (2,1) to (7,4)
The number of paths sought here equals
the number of subsets A of {1,2,…,8},
where A =3.
8
Ex 3.11
Count the number of compositions of an
integer, say 7
7=1+1+1+1+1+1+1, there are six plus
signs.
– Subset {1,4,6}
(1+1)+1+(1+1)+(1+1)2+1+2+2
– Subset {1,2,5,6}
(1+1+1)+1+(1+1+1)3+1+3
– Subset {3,4,5,6}
1+1+(1+1+1+1+1)1+1+5
Consequently, there are 2m-1 compositions
for the value m.
9
10
An important identity
C(n+1, r)= C(n, r)+C(n, r-1)
Pascal’a triangle in Ex 3.14
11
3.2 Set operations and the laws of
set theory
Definition 3.5.
–
–
–
–
AB={xxA xB}
AB={xxA xB}
AB={xxAB xAB}
Ex 3.15
Definitions 3.6, 3.7, 3.8
– S, T are disjoint, written ST=
– The complement of A, denoted as A
– The relative complement of A in B, denoted BA
12
Ex 3.18
13
Theorem 3.4
The
following statements are
equivalent
– AB
– AB=B
– AB=A
– BA
14
AB AB=B AB=A
B(AB) for any sets
x(AB)
(xA)(xB)
since AB, (xB)
this means (AB)B
we conclude AB=B
AAB for any sets
yA yAB (1)
Since AB=B,
(1)yBy(AB)
This means AAB
we conclude
A=AB
15
AB=A B A AB
16
17
A B A B
18
A(BC)=(AB)(AC)
19
The Duality
Definition
3.9 Let s be a statement dealing
with the equality of two set expressions. The
dual of s, denoted sd, is obtained from s by
replacing (1) each occurrence of and U by U
and , respectively; and (2) each occurrence of
and by and , respectively.
Theorem 3.5. s is a theorem if and only if sd is
also a theorem.
20
Three approaches to proof
The
first approach to prove a theorem is by
element argument.
The second is by Venn diagram, and
the third is by membership table.
21
Venn diagram to show
A B A B
22
Venn diagram to show
( A B) C ( A B) C
23
membership table
24
Membership table for
A(BC)=(AB)(AC)
25
Ex 3.20
26
Ex 3.22
27
4
1
2
3
A={1,2}, B={2,3}, A∆B={1,3}, A´={3,4}, B´={1,4}
A´∆B={2, 4}= B´∆A = (A∆B)´
28
Generalized DeMorgan’s Law
A A
i
i
iI
iI
A
i
iI
A
i
iI
29
3.3. Counting and Venn diagrams
Finite
sets A and B are disjoint if and only if
A B = A + B , Figures 3.9 and 3.10
Ex 3.25, If A and B are finite sets, then AB=
A+ B-AB , Figure 3.11
When U is finite, we have
A B A B U A B U A B A B
30
Ex 3.26
How
many gates have at least one of the
defects D1, D2, D3? How many are perfect?
Figure 3.12 and Figure 3.13. If A, B and C are
finite sets, then ABC= A+ B+C-ABAC-BC + ABC
When U is finite, we have
A B C A B C U A B C
U A B C A B AC B C A B C
31
3.4. A first world on probability
Let be the sample space for an experiment. Each
subset A of , including the empty subset, is called an
event. Each element of determines an outcome. If
=n, then Pr({a})=1/n and Pr(A)= A /n
Ex 3.29, Ex 3.30, Ex 3.31
Definition 3.11. For sets A and B, the Cartesian
product of A and B is denoted by AB and equals {(a,
b)a A , b B}. We call the elements of AB
ordered pairs.
32
Ex 3.33
Suppose
we roll two fair dice.
Consider the following event
– A: rolls a 6
– B: The sum of dice is at least 7
– C: Rolls an even sum
– D: The sum of the dice is 6 or less
What
are P(A), P(B), P(C), P(D),
P(AB), P(CD)?
33
Examples
Ex
3.35. If we toss a fair coin four
times, what is the prob that we get
two heads and two tails?
Ex 3.36. Among the letters
WYSIWYG, what is the prob that the
arrangement has both consecutive
W’s and Y’s? and the prob that the
arrangement starts and ends with W?
34
3.5. The axioms of probability
Ex
3.39. The outcomes of a sample space may
have different likelihoods
A warehouse has 10 motors, three of
which are defective. We select two
motors.
– A: exactly one is defective
– B: at least one motor is defective
– C: both motors are defective
– D: Both motors are in good condition.
35
The axioms of probability
be the sample space for an experiment. If
A and B are any events, then
Let
– Pr(A)0
– Pr()=1
– If A and B are disjoint, Pr(A B )=Pr(A) + Pr(B)
Theorem
3.7.
Pr(A) 1 Pr(A)
36
Ex 3.40
The letters PROBABILITY are arranged in a
random manner. Determine the prob of
the following event: The first and last
letters are different.
– Neither B nor I appears at the start or finish.
(7)(9!/2!2!)(6)
– Only B appears at the start or finish.
(2)(7)(9!/2!)
– One of B is used at the start and I as the other.
(2)(9!)
37
Ex 3.41
The prob that our team can win any
tournament is 0.7. Suppose we need to
play eight tournaments. Consider the
following cases:
– Win all eight games. (0.3)8
– Win exactly five of the eight. C(8, 5)(0.7)5(0.3)3
– Win at least one. 1-(0.3)8
If there are n trials and each trial has probability p of
success and 1-p of failure, the probability that there
are k successes among these n trials is n p (1 p)
k
n k
k
38
Theorem 3.8
Pr(AB)
=Pr(ABc) + Pr(B)
= Pr(A) + Pr(B)- Pr(AB )
Ex 3.42
– What is the prob that the card drawn is
a club and the value is between 3 and 7.
Ex
3.43
39
Theorem 3.9.
Pr(ABC)= Pr(A)+ Pr(B)+Pr(C)-Pr(AB)Pr(AC)-Pr(BC) + Pr(ABC)
40