• No results found

sets.pptx

N/A
N/A
Protected

Academic year: 2020

Share "sets.pptx"

Copied!
27
0
0

Loading.... (view fulltext now)

Full text

(1)

1

Language of Sets

(2)

Language of Sets

A set is a structure, representing an unordered collection (group, plurality) of zero or more

distinct (different) objects called elements. Set theory deals with operations between,

(3)

3

Basic notations for sets

 For sets, we’ll use variables S, T, U, …

 We can denote a set S in writing by listing all of its elements in curly braces:

{a, b, c} is the set of whatever 3 objects are denoted by a, b, c.

{1,2,3,4} is the set with integers from 1 to 4.

 This is possible when the set contains finite number of elements.

(4)

Basic notations for sets

 If a set is a large finite set or an infinite set, we use a descriptive notation by listing a property

necessary for membership.

Set builder notation:

B={x| x is a positive, even integer } defines set

(5)

5

Basic sets of numbers

Symbol Set Example of members

Z Integers -3, 0, 2, 145 Q Rational numbers -5/6, 0, 1, 23/4 R Real numbers

(6)

Basic properties of sets

Sets are inherently unordered:

No matter what objects a, b, and c denote,

{a, b, c} = {a, c, b} = {b, a, c} = {b, c, a} = {c, a, b} = {c, b, a}.

All elements are distinct (unequal); multiple listings make no difference!

{a, b, c} = {a, a, b, a, b, c, c, c, c}.

(7)

7

Membership

The basic relationship between set and

element is the inclusion membership. We write xS when element x is in set S and

xS otherwise. For instance

3{x| x is a positive, odd integer}

(8)

Definition of Set Equality

 Two sets are declared to be equal if and only if

they contain exactly the same elements.

 In particular, it does not matter how the set is defined or denoted.

 For example: The set {1, 2, 3, 4} =

{x | x is an integer where x>0 and x<5 } = {x | x is a positive integer whose square is >0 and <25}

(9)

9

The Empty Set

 (“null”, “the empty set”) is the unique set that contains no elements whatsoever.

The proposition

x  is false for any element x.

x  is true for any element x.

We should distinguish between sets and

{}. the first is the empty set, and the second is the set with exactly one element equal to empty set. So proposition {} is true.

(10)

Subset and Superset Relations

ST (“S is a subset of T”) means that every element of S is also an element of T.

Examples:

{2,4,6}{x| x is positive, even integer}

S the empty set is subset of any set.

SS each set is subset of itself.

ST (“S is a superset of T”) means TS.

(11)

11

Venn diagrams for sets

ST (“S is a proper subset of T”) means that

ST but . Similar for ST.

S

T

Venn Diagram equivalent of ST

Example: {1,2}  {1,2,3}

S T/

(12)

The

Power Set

Operation

The power set P(S) of a set S is the set of all subsets of S. P(S) = {x | xS}.

E.g. P({a,b}) = {, {a}, {b}, {a,b}}.Sometimes P(S) is written 2S.

Note that for finite S, |P(S)| = 2|S|.

It turns out that |P(N)| > |N|.

Note: the above inequality is true also for infinite sets. There are different sizes of

(13)

13

Ordered

n

-tuples

For nN, an ordered n-tuple or a sequence

of length n is written (a1, a2, …, an). The

first element is a1, etc.

These are like sets, except that duplicates matter, and the order makes a difference. Note (1, 2) (2, 1) (2, 1, 1).

(14)

The Union Operator

For sets A, B, their union AB is the set

containing all elements that are either in A, or

in B (or, of course, in both).

Note that AB contains all the elements of A and it contains all the elements of B: so it is true (AB A) and (AB B).

(15)

15

The Union Operator

It is possible to represent inclusions (AB

A) and (AB B) using logical rules:

(xA (xA xB ) (xB (xA xB )

Both are special cases of tautology

(16)

{a,b,c}{2,3} = {a,b,c,2,3}

{2,3,5}{3,5,7} = {2,3,5,3,5,7} ={2,3,5,7} Venn diagram of the union of sets.

Union Examples

2

(17)

17

The Intersection Operator

For sets A, B, their intersection AB is the set containing all elements that are simultaneously in A and in B.

xAB  (xA xB ) AB A

AB B

based on tautology P QP

(18)

{-2,-3}{2,3} = , Sets are disjoint{2,4,6}{3,4,5} ={4}

Intersection Examples

2

3

5

6

4

(19)

19

The Difference Operator

For sets A, B, their difference A-B is the set containing all elements that are in A and are not in B.

Formally, A,B: A-B{x | xA xB}.

Note that A-B is a subset of A and it is not a subset of B: (A-B A) and (A-B B)

(20)

{2,3}-{2,3,4,5} =

{2,4,6}-{3,4,5} ={2,6} Venn diagram:

Difference Examples

3

5

4

(21)

21

The Complement Operator

Sometimes we are dealing with sets that are all subsets of a set U. This set is called a

universal set or universe.

For sets {1,2,3} {-1,0,4} {x| x is positive

integer} a universal set can be chosen as

Z={x| x is integer}.

Given a universal set U, the set U-X is called the complement of X and written X.

(22)

Set Identities - 1

Identity: A=A AU=ADomination: AU=U A= Idempotent: AA = A = AADouble complement:

Commutative: AB=BA AB=BAAssociative: A(BC)=(AB)C

A(BC)=(AB)C

A

A

)

(23)

23

Set Identities - 2

Distributive: A(BC)=(AB)(AC)

A(BC)=(AB) (AC) Absorption: A(AB)=A

A(AB)=A

Complement: AA =U

A A =

De Morgan’s: (AB)= AB

(24)

Generalized Union

Binary union operator: ABn-ary union:

AA2…An : ((…((A1A2) …) An) (grouping & order is irrelevant)

“Big U” notation:

Or for infinite sets of sets:

in Ai

1 

X A

A

(25)

25

Generalized Intersection

Binary intersection operator: ABn-ary intersection:

AA2…An((…((A1A2)…)An) (grouping & order is irrelevant)

“Big Arch” notation:

Or for infinite sets of sets:

in Ai

1 

X A

A

(26)

Cartesian Products of Sets

For sets A, B, their Cartesian product

AB : {(a, b) | aA and bB }, it means set of all 2-tuples or ordered pairs.

E.g. {a,b}{1,2} = {(a,1),(a,2),(b,1),(b,2)}Note that for finite A, B, |AB|=|A||B|.

Note that the Cartesian product is not

commutative, in general AB BA. But

(27)

27

Cartesian Products of Sets

The Cartesian product of sets X1,X2, …Xn

is the set of all n-tuples (a1,a2, …an) where

a1X1,a2X2, …anXn.

Example X={1,2}, Y={a,b}, Z={1,2},

XYZ={(1,a,1), (1,a,2), (1,b,1), (1,b,2),

(2,a,1), (2,a,2), (2,b,1), (2,b,2)}. |XYZ|= =| X||Y||Z|= 8

The Cartesian product is not associative (XY)Z X(YZ) XYZ

References

Related documents

Abstract Prokaryotic transcriptional networks possess a large number of regulatory modules that formally implement many of the logic gates that are typical of digital,

MCS units engage in a range of security practices, which include watching for ‘nuisance’ conduct (e.g., littering, alcohol consumption, and panhandling) on and in relation to

The growth characters, yield attributes, soil and plant quality were significantly influenced with different nutrient management practices... Increase in plant height with

The pooled value showed that about 48.00 percent respondents had high level of care of new born piglets followed by 36.00 percent with medium level and rest 16.00 percent

Although amateur content forms the majority of what is on the service, it is barely watched by contrast with the vastly more popular texts of the

Previously, the peak has been separated into two components, and the correspond- ing activation energies for electron emission determined by fitting the DLTS spectra calculated using

North Carolina Agricultural  and Technical State  University  School of Agriculture and 

Medicare 7 Private Health Insurance 7 Emergencies 7 Medical Assistance 8 Dental Services 8 Gyms 8 Accommodation Renting Property 9 Furniture 9 Household Utilities 9 Getting