• Tidak ada hasil yang ditemukan

Set and basic set operations

N/A
N/A
Protected

Academic year: 2024

Membagikan "Set and basic set operations"

Copied!
10
0
0

Teks penuh

(1)

Set and basic set operations

Set

Asetis a collection of elements. LetX be a set. Ifx is an element inX thenx∈X, otherwisex∈/X. A set with no element is called anempty setand denoted by∅.

A⊆B (Ais asubsetofB): All elements ofAare member ofB. Note that∅ ⊆Afor any setA.

A⊂B (Aisstrict subsetofB): A⊆B and there is at least onex such thatx∈B butx∈/A.

A=B (AisequaltoB): IfA⊆BandB⊆AthenA=B. That is, all elements inA andB are the same.

Ac (ComplementofA): Suppose all sets under consideration are subset of a fixed set U(which can be context specific). Ac={x∈U|x∈/A}.

Basic set operations

UnionofAandB:A∪B={x|x∈Aorx∈B} IntersectionofAandB:A∩B={x|x∈Aandx∈B}.

Aset minusB:A−B={x|x∈Aandx∈/B}.

Useful results

1. Distributive laws: (i)A∩(B∪C) = (A∩B)∪(A∩C), (ii) A∪(B∩C) = (A∪B)∩(A∪C)

2. De Morgan’s laws: (i) (A∪B)c=Ac∩Bc, (ii) (A∩B)c=Ac∪Bc

(2)

Set and basic set operations

Proof of Distributive law(1-i)

We want to showA∩(B∪C) = (A∩B)∪(A∩C). We prove this by showing A∩(B∪C)⊆(A∩B)∪(A∩C) and (A∩B)∪(A∩C)⊆A∩(B∪C).

First, lets show thatLHS⊆RHS. Take anyx∈A∩(B∪C). This meansx∈Aand x∈B∪C. Moreoverx∈B∪C means either (i)x∈B, or (ii)x∈C.

If (i) is the case, thenx∈Bandx∈Atogether means thatx∈A∩B. Hence x∈(A∩B)∪(A∩C) because (A∩B)∪(A∩C) is a superset of (A∪B).

On the other hand, if (ii) is the case, thenx∈Candx∈Ameans thatx∈A∩C.

Hence, once again,x∈(A∩B)∪(A∩C) because (A∩B)∪(A∩C) is a superset of (A∩C).

Thus no matter which of case (i) or (ii) is true, we getx∈(A∩B)∪(A∩C). Since we started from an arbitrary memberxofA∩(B∪C), we can claim that each member ofA∩(B∪C) is also member of (A∩B)∪(A∩C). Hence

A∩(B∪C)⊆(A∩B)∪(A∩C).

Next, lets show thatRHS⊆LHS. Take anyy∈(A∩B)∪(A∩C). This means either, (i)y∈(A∩B) or (ii)y∈(A∩C). We shall show that in both casey∈A∩(B∪C).

If (i) is true theny∈(A∩B). It meansy∈Aandy∈B. Buty∈B makes y∈B∪C, becauseB∪C is a superset ofB. Thus we have,y∈Aandy∈B∪C, together which meansy∈A∩(B∪C).

We can follow the same steps for case (ii). Herey∈(A∩C), meansy∈Aand y∈C. Buty∈C makesy∈B∪C, becauseB∪Cis a superset ofC. Once again y∈Aandy∈B∪Ctogether meansy∈A∩(B∪C).

Irrespective of case (i) or (ii), we obtain thaty is a member ofA∩(B∪C). Thus (A∩B)∪(A∩C)⊆A∩(B∪C).

(3)

Logic

Proposition

Apropositionis a statement which is either true or false. LetPbe a proposition. It can have two ‘truth values’: True, False.

∼PisnegationofP.∼Pis a statement that is ‘opposite’ toP. ∼Ptakes truth value True whenPis False and∼Ptakes truth value False whenP is True.

For any 2 propositionsPandQ, there are 4 possible assignments of truth values.

(1)Pis True andQ is True (2)Pis True andQ is False.

(3)Pis False andQis True (4)Pis False andQis False.

We can combine 2 propositions.

(P &Q) is a new proposition. This combined proposition means bothP andQ. It is true in case 1 and false in cases 2, 3 and 4.

(P orQ) is another proposition. This combined proposition means eitherP orQ or both. So it is true in cases 1, 2, 3 and false in case of 4.

Proposition with quantifiers

Most of the time we would deal with Proposition given an underlying ‘state’. LetAbe the set of all relevant states. Instead of checking justP, we shall checkP(x) that is validity ofPatx.

For all: Suppose a propositionP is true at all statesx∈A. Our new proposition with quantifier is,P(x) is True∀x.

There exists: If there is at least onex∈Asuch thatP is True at statex. Our new proposition with quantifier is,∃xsuch thatP(x) is True (there exists).

(4)

Logic

Negation of proposition with quantifiers

Negation of [P(x) is True∀x]: ∃xsuch thatP(x) is False Negation of [∃xsuch thatP(x) is True]:P(x) is False∀x Logical implication

PimpliesQ (denoted byP⇒Q) : This itself is a Proposition. We check validity of propositionsP(x) andQ(x) for allx∈A. The PropositionP⇒Qis True if for all x∈Aeither of the following three hold:

(1)P(x) is True andQ(x) is True, (2)P(x) is False andQ(x) is True (4)P(x) is False andQ(x) is False.

The PropositionP⇒Q is False if there exists at least onex∈Asuch thatP(x) is True andQ(x) is False.

Note that the set{x|P(x) is True}is a subset of{x|Q(x) is True}. We also say thatQis necessary forP. OrP is sufficient forQ.

Q⇒Pis called the converse of the statementP⇒Q. There is no logical connection between these two statements. However if both are True, then we denote that by P⇔Q.

Useful observation

[P⇒Q] and [∼Q⇒∼P] are the same statement Reading: SB, Appendix A1

(5)

Function, Inverse function and Composition of function

Definitions of function and related concepts

Take two setsAandB. Afunctionf is a rule that maps each element ofAto exactly one element inB.

That isf(a)∈B∀a∈A. We denote this byf :A−→B. Ais called thedomainoff.

Note 1: More than one elements ofAcan be mapped to the same element inB. Note 2: Some members ofB may not be reached byf.

Take anyA0⊆A. IfA0is the restricted domain, thenimage/RangeA0underf is the setf(A0) ={b∈B|f(a) =b,a∈A0}.

Example: Indifference curve Definitions of inverse of a function

Take a functionf :A−→B. Inverse off, denoted byf−1, is the route back fromB toA.

For eachb∈f(A),f−1(b) ={a∈A|f(a) =b}.

Note thatf−1is not necessarily a function. (QN: Why?)

Take anyB0⊆B.PreimageofB0underf isf−1(B0) ={a∈A|f(a) =b,b∈B0}.

Composition of functions

We cancomposetwo functions to get a new function in the following manner.

Supposef :A−→Bandg:B−→C. Theng◦f is the composite function which maps each element ofAto exactly one element inC, through a temporary stop atB.

g◦f(a) =g(f(a)) ∀a∈A.

(6)

Set operations on image and preimage

Results: Set operations on preimage 1.B1⊆B2⊆B=⇒f−1(B1)⊆f−1(B2) 2.B1,B2⊆B=⇒

(i)f−1(B1)∪f−1(B2) =f−1(B1∪B2) (ii)f−1(B1)∩f−1(B2) =f−1(B1∩B2) (iii)f−1(B1)−f−1(B2) =f−1(B1−B2) Are these results the same for image?

3.A1⊆A2⊆A=⇒f(A1)⊆f(A2) 4.A1,A2⊆A=⇒

(i)f(A1)∪f(A2) =f(A1∪A2) (ii)f(A1)∩f(A2)⊇f(A1∩A2) (iii)f(A1)−f(A2)⊆f(A1−A2)

(7)

Type of function

Definitions: Types of function

f :A−→Bisinjective (one-to-one)iff(a) =f(a0) =⇒a=a0.

f :A−→Bissurjective (onto)if for everyb∈B there existsa∈As.t. b=f(a).

A function that is both one-to-one and onto is calledbijective.

Useful results 5.Iff is bijective then

(i)f−1is a function fromBtoA (ii)f−1is bijective.

(iii)f−1(f(a)) =a∀a∈Aandf(f−1(b)) =b∀b∈B.

6.Iff is one-to-one then 4−(ii) and 4−(iii) hold with equality.

7.Iff is one-to-one thenf is a bijective function fromAtof(A).

Definition: Cardinality of set

Cardinality is total number of elements in a set. Two setsAandB have the same cardinality, denoted by|A|=|B|, if there exists a bijective function fromAtoB.

Reading: SB 13.5

(8)

Vector

Definitions of Cartesian product

Take two setsAandB. The Cartesian product ofAandB is, A×B={(x,y)|x∈A,y∈B}.

A typical element ofA×Bis an ordered pair (x,y) wherexis fromAandy fromB.

Similarly we can define Cartesian product ofnsets,A1×A2×. . .×An. A special case:A1=A2. . .=An, is often denoted byAn.

We shall focus onRn, whereRis the set of all real numbers.

A vector inRn:x= (x1,x2, . . . ,xn) wherexk∈ R ∀n.

Some special vectors:0= (0, . . . ,0),ej= (0,0, . . . , 1

|{z}

j th position

, . . . ,0)

Basic operations on vector

Sum:x+y= (x1,x2, . . . ,xn) + (y1,y2, . . . ,yn) = (x1+y1,x2+y2, . . . ,xn+yn)

−x= (−x1,−x2, . . . ,−xn). Hence,

Difference:x−y= (x1,x2, . . . ,xn)−(y1,y2, . . . ,yn) = (x1−y1,x2−y2, . . . ,xn−yn) Scalar multiplication: Letα∈ R,αx= (αx1, αx2, . . . , αxn)

Useful observations α, α1, α2∈ Randx,y∈ Rn 1.x+y=y+x

2. (α12)x=α1x+α2x 3.α(x+y) =αx+αy

(9)

Inner product and Norm

Definitions of Inner product of two vectors

This operation assigns a number to each pair of vectors. This is also connected to angle between two vectors (we will skip this geometric interpretation for now).

x·y=x1y1+x2y2. . .xnyn=Pn i=1xiyi

Useful observations:α∈ Randx,y,z∈ Rn 1.x·y=y·x

2.x·(y+z) =x·y+x·z 3.x·(αy) =α(x·y) Definitions of Norm

Norm is the length of a vector. It is the distance between0andx.

||x||=p (x·x) =

q Pn

i=1xi2

Useful observations:α∈ Randx∈ Rn 1.||x|| ≥0 and||x||= 0⇔x= 0 2.||αx||=|α| ||x||

Two important inequalities:x,y∈ Rn

1. Cauchy-Scwarz inequality: (i)|x·y| ≤ ||x|| ||y||, (ii) equality hold iffx=αy for someα∈ R

2. Triangle inequality: (i)||x+y|| ≤ ||x||+||y||, (ii) equality hold iffx=αy for someα >0

(10)

Proof of Cauchy-Scwarz and Triangle inequalities

Proof of Cauchy-Scwarz:

(i) Definez=x+ty. We know thatz·z≥0 and equality hold ifz= 0

z·z= (x+ty)·(x+ty) =x·x+t2(y·y) + 2t(x·y) =||x||2+t2||y||2+ 2t(x·y)≥0 Chooset=− x·y

||y||2 and rearrange the above inequality to obtain Cauchy-Scwarz inequality.

Qn: Why do use this particulart?

(ii) Equality holds⇒x+ty= 0,⇒x=−ty.

Ifx=αy, check that Cauchy-Scwarz holds with equality.

Proof of Triangle inequality:

(i)||x+y||2= (x+y)·(x+y) =||x||2+||y||2+ 2(x·y)≤ ||x||2+||y||2+ 2(||x|| ||y||) The last inequality follows from Cauchy-Scwarz

Taking square-root, we obtain Triangle inequality.

(ii) Equality holds⇒Cauchy-Scwarz hold with equality⇒x=αy. Ifx=αy, check that Triangle inequality holds with equality.

Reading: SB, Chapter 10

Referensi

Dokumen terkait

produce a truth value 'false'.. If both switch A and switch B are switched on, then the lamp is on. If switch A is switched off and switch B is switched on, then the lamp is still

State whether the following statements are true or false by ticking the appropriate box.. Betacyanin is soluble in organic

Indicate whether the following statements are true or false by placing a tick in the appropriate box in the answer sheetB. True

 If only time data that differs from the work schedule is recorded for an employee, this is negative time management.  False 

True A or false B – click on the correct answer: trends following the implementation of provider-initiated HiV testing are likely to be associated with improved treatment outcomes..

Read the passage again and write True or False beside the following statements.. Give answers for the false

We ask whether any contradiction would follow if the given conclusion is accepted as true or rejected as false.. If we find any contradiction by accepting the conclusion as true, then

, xn] where R is a commutative ring is fixed under all the automorphisms ofS induced by even permutations inSn if and only iff =g+δh whereg and h are symmetric polynomials andδ =Q