25
Set Theory Chapter 3

1 Set Theory Chapter 3. 2 Chapter 3 Set Theory 3.1 Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is

Embed Size (px)

Citation preview

Page 1: 1 Set Theory Chapter 3. 2 Chapter 3 Set Theory 3.1 Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is

1

Set Theory

Chapter 3

Page 2: 1 Set Theory Chapter 3. 2 Chapter 3 Set Theory 3.1 Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is

2

Chapter 3 Set Theory

3.1 Sets and Subsets

A well-defined collection of objects

(the set of outstanding people, outstanding is very subjective)

finite sets, infinite sets, cardinality of a set, subset

A={1,3,5,7,9}B={x|x is odd}C={1,3,5,7,9,...}cardinality of A=5 (|A|=5)A is a proper subset of B.C is a subset of B.

1 1 1 A B C, ,

A B

C B

Page 3: 1 Set Theory Chapter 3. 2 Chapter 3 Set Theory 3.1 Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is

3

Chapter 3 Set Theory

3.1 Sets and Subsets

set equality C D C D D C ( ) ( )

subsets A B x x A x B [ ]

A B x x A x B

x x A x B

x x A x B

[ ]

[ ( ) )]

[ ]

C D C D D C

C D D C

( )

Page 4: 1 Set Theory Chapter 3. 2 Chapter 3 Set Theory 3.1 Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is

4

Chapter 3 Set Theory

3.1 Sets and Subsets

null set or empty set : {},

universal set, universe: U

power set of A: the set of all subsets of A

A={1,2}, P(A)={, {1}, {2}, {1,2}}

If |A|=n, then |P(A)|=2n.

Page 5: 1 Set Theory Chapter 3. 2 Chapter 3 Set Theory 3.1 Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is

5

If |A|=n, then |P(A)|=2n.

Chapter 3 Set Theory

3.1 Sets and Subsets

For any finite set A with |A|=n0, there are C(n,k) subsets of size k.

Counting the subsets of A according to the number, k, of elements in a subset, we have the combinatorial identity

0for ,2210

n

n

nnnn n

Page 6: 1 Set Theory Chapter 3. 2 Chapter 3 Set Theory 3.1 Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is

6

Chapter 3 Set Theory

3.1 Sets and Subsets

Ex. 3.10 Number of nonreturn-Manhattan paths betweentwo points with integer coordinated

From (2,1) to (7,4): 3 Ups, 5 Rights

8!/(5!3!)=56R,U,R,R,U,R,R,Upermutation

8 steps, select 3 steps to be Up

{1,2,3,4,5,6,7,8}, a 3 element subset represents a way,for example, {1,3,7} means steps 1, 3, and 7 are up.the number of 3 element subsets=C(8,3)=8!/(5!3!)=56

Page 7: 1 Set Theory Chapter 3. 2 Chapter 3 Set Theory 3.1 Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is

7

Chapter 3 Set Theory

3.1 Sets and Subsets

Ex. 3.11 The number of compositions of an positive integer

4=3+1=1+3=2+2=2+1+1=1+2+1=1+1+2=1+1+1+1

4 has 8 compositions. (4 has 5 partitions.)

Now, we use the idea of subset to solve this problem.Consider 4=1+1+1+1

1st plus sign

2nd plus sign

3rd plus sign

The uses or not-uses ofthese signs determinecompositions.

compositions=The number of subsets of {1,2,3}=8

Page 8: 1 Set Theory Chapter 3. 2 Chapter 3 Set Theory 3.1 Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is

8

Chapter 3 Set Theory

3.1 Sets and Subsets

Ex. 3.12 For integer n, r with n r 1

prove n

r

n

r

n

r

1

1combinatorially.

Let A x a a an{ , , , , }1 2

Consider all subsets of A that contain r elements.n

r

n

r

n

r

1

1

those exclude r

those include rall possibilities

Page 9: 1 Set Theory Chapter 3. 2 Chapter 3 Set Theory 3.1 Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is

9

Chapter 3 Set Theory

3.1 Sets and Subsets

Ex. 3.14 The Pascal's Triangle

0

01

0

1

1

2

1

2

2

2

0

3

2

3

1

3

3

3

0

4

1

4

2

4

3

4

4

4

0

binomialcoefficients

Page 10: 1 Set Theory Chapter 3. 2 Chapter 3 Set Theory 3.1 Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is

10

Chapter 3 Set Theory

3.1 Sets and Subsets

common notations

(a) Z=the set of integers={0,1,-1,2,-1,3,-3,...}(b) N=the set of nonnegative integers or natural numbers(c) Z+=the set of positive integers(d) Q=the set of rational numbers={a/b| a,b is integer, b not zero}(e) Q+=the set of positive rational numbers(f) Q*=the set of nonzero rational numbers(g) R=the set of real numbers(h) R+=the set of positive real numbers(i) R*=the set of nonzero real numbers(j) C=the set of complex numbers

Page 11: 1 Set Theory Chapter 3. 2 Chapter 3 Set Theory 3.1 Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is

11

Chapter 3 Set Theory

3.1 Sets and Subsets

common notations

(k) C*=the set of nonzero complex numbers(l) For any n in Z+, Zn={0,1,2,3,...,n-1}(m) For real numbers a,b with a<b,

[ , ] { | }a b x R a x b ( , ) { | }a b x R a x b

[ , ) { | }a b x R a x b

( , ] { | }a b x R a x b

closed interval

open interval

half-open interval

Page 12: 1 Set Theory Chapter 3. 2 Chapter 3 Set Theory 3.1 Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is

12

習題P134 Exercises3.1

8,12,14,20

Chapter 3 Set Theory

Page 13: 1 Set Theory Chapter 3. 2 Chapter 3 Set Theory 3.1 Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is

13

Chapter 3 Set Theory

3.2 Set Operations and the Laws of Set Theory

Def. 3.5 For A,BU

a) A B x x A x B

A B x x A x B

A B x x A B x A B

{ | }

{ | }

{ | }b)c)

union

intersection

symmetric difference

Def.3.6 mutually disjoint A B

Def 3.7 complement A U A x x U x A { | }

Def 3.8 relative complement of A in BB A x x B x A { | }

Page 14: 1 Set Theory Chapter 3. 2 Chapter 3 Set Theory 3.1 Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is

14

Chapter 3 Set Theory

3.2 Set Operations and the Laws of Set Theory

Theorem 3.4 For any universe U and any set A,B in U, thefollowing statements are equivalent:

A B

A B B

A B A

B A

a)

b)c)

d)

reasoning process

(a) (b), (b) (c),

(c) (d), and (d) (a)

Page 15: 1 Set Theory Chapter 3. 2 Chapter 3 Set Theory 3.1 Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is

15

Chapter 3 Set Theory

3.2 Set Operations and the Laws of Set Theory

The Laws of Set Theory

)()()(

Laws )()()( (5)

)()(

Laws )()( (4)

Laws (3)

Laws ' (2)

of Law )1(

CABACBA

veDistributiCABACBA

CBACBA

eAssociativCBACBA

ABBA

eCommutativABBA

BABA

sDemorganBABA

ComplementDoubleAA

Page 16: 1 Set Theory Chapter 3. 2 Chapter 3 Set Theory 3.1 Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is

16

Chapter 3 Set Theory

3.2 Set Operations and the Laws of Set Theory

The Laws of Set Theory

A)BA(A

Laws Absorption A)BA(A (10)

Laws Domination =A ,UUA (9)

Laws Inverse AA ,UAA (8)

Laws Identity AUA ,AA (7)

Laws Idempotent AAA ,AAA (6)

Page 17: 1 Set Theory Chapter 3. 2 Chapter 3 Set Theory 3.1 Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is

17

Chapter 3 Set Theory

3.2 Set Operations and the Laws of Set Theory

s dual of s (sd)

U

U

Theorem 3.5 (The Principle of Duality) Let s denote a theoremdealing with the equality of two set expressions. Then sd is alsoa theorem.

Page 18: 1 Set Theory Chapter 3. 2 Chapter 3 Set Theory 3.1 Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is

18

Chapter 3 Set Theory

3.2 Set Operations and the Laws of Set Theory

Ex. 3.17 What is the dual of A B ?

Since A B A B B A B

A B B A B B B A

.

.

The dual of is the dual of

, which is That is, .

Venn diagram

U

AA A B

A B

Page 19: 1 Set Theory Chapter 3. 2 Chapter 3 Set Theory 3.1 Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is

19

Chapter 3 Set Theory

3.2 Set Operations and the Laws of Set TheoryEx. 3.19. Negate

B

A B

A B x x A x B A

A B A B A B

.

{ | }

Ex. 3.20 Negate A B

A B x x A B x A B

A B A B A B A B

A B A B A B A B A B

A B A B A B A A B B

B A A B A B A B

A B A B

.

{ | }

( ) ( ) ( ) ( )

( ) ( ) ( )

( ) ( ) [( ) ] [( ) ]

( ) ( ) ( ) ( )

Page 20: 1 Set Theory Chapter 3. 2 Chapter 3 Set Theory 3.1 Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is

20

Chapter 3 Set Theory

3.2 Set Operations and the Laws of Set Theory

Def 3.10.

i I

i i

i Ii i

A x x A i I

A x x A i I

{ | }

{ | }

for at least one , and

for every

I: index set

Theorem 3.6 Generalized DeMorgan's Laws

i Ii

i Ii

i Ii

i Ii

A A

A A

Page 21: 1 Set Theory Chapter 3. 2 Chapter 3 Set Theory 3.1 Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is

21

習題P146 Exercises3.2

4,8, 9,10,

Chapter 3 Set Theory

Page 22: 1 Set Theory Chapter 3. 2 Chapter 3 Set Theory 3.1 Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is

22

Chapter 3 Set Theory

3.3 Counting and Venn Diagrams

Ex. 3.25. In a class of 50 college freshmen, 30 are studyingBASIC, 25 studying PASCAL, and 10 are studying both. Howmany freshmen are studying either computer language?

U A B

10 1520

5| | | | | | | |A B A B A B

Page 23: 1 Set Theory Chapter 3. 2 Chapter 3 Set Theory 3.1 Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is

23

Chapter 3 Set Theory

3.3 Counting and Venn Diagrams

Given 100 samplesset A: with D1

set B: with D2

set C: with D3

Ex 3.26. Defect types of an AND gate:D1: first input stuck at 0D2: second input stuck at 0D3: output stuck at 1

with |A|=23, |B|=26, |C|=30,| | , | | , | | ,| |A B A C B CA B C

7 8 103 , how many samples have defects?

A

B

C

11 43

57

12

15

43

Ans:57

| | | | | | | | | || | | | | |A B C A B C A B

A C B C A B C

Page 24: 1 Set Theory Chapter 3. 2 Chapter 3 Set Theory 3.1 Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is

24

Chapter 3 Set Theory

3.3 Counting and Venn Diagrams

Ex 3.27 There are 3 games. In how many ways can one playone game each day so that one can play each of the three at least once during 5 days?

set A: without playing game 1set B: without playing game 2set C: without playing game 3

| | | | | |

| | | | | || |

| |

A B C

A B B C C AA B C

A B C

Ans

2

10

3 2 3 1 0 93

3 93 150

5

5

5 5

5

balls containers12345

g1g2g3

Page 25: 1 Set Theory Chapter 3. 2 Chapter 3 Set Theory 3.1 Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is

25

習題P150 Exercises3.3

4,6,10

Chapter 3 Set Theory