Discrete-math 6

1

(n1,m1),(n2,m2)N×N(n1,m1)R(n2,m2)n1n2m1m2

1a

Prove: R is an ordering relationProof:Let (n,m)N×Nn=nm=nnnmm(n,m)R(n,m)R is reflexiveLet (n1,m1)R(n2,m2),(n2,m2)R(n1,m1){n1n2m1m2n2n1m2m1n1=n2m1=m2(n1,m1)=(n2,m2)R is anti-symmetricLet (n1,m1)R(n2,m2),(n2,m2)R(n3,m3){n1n2n3m1m2m3n1n3m1m3(n1,m1)R(n3,m3)R is transitiveR is an ordering relation

1b

Prove or disprove: (N×N,R) is a total order (R is linear)Disproof:Let x=(1,3)N×NLet y=(5,2)N×N3>2xy5>1yx(n1,m1),(n2,m2):¬[(n1,m1)R(n2,m2)(n2,m2)R(n1,m1)](N×N,R) is not a total order

1c

B={(1,n)|nN}Find inf(B) and sup(B)Solution:Let (x,y)N×NbB:(x,y)RbnN:x1ynx1y1LB={(x,y)N×N|x1y1}max(LB)=(1,1)inf(B)=(1,1)bB:bR(x,y)nN:1xny1xsup(N)FalseUB=sup(B)

1d

B={(n,1)|nN}Find inf(B) and sup(B)Solution:Let (x,y)N×NbB:(x,y)R(n,1)nN:xny1x1y1LB={(x,y)N×N|x1y1}max(LB)=(1,1)inf(B)=(1,1)bB:bR(x,y)nN:nx1ysup(N)False1yUB=sup(B)

2

Let (A,) be a poset,|A|2(a1,b1)R(a2,b2)a1a2b1b2Prove: R is a non-linear relation on A×AProof:Let a1a2,a1a2b2b1,b1b2(a1,b1)(a2,b2)(a2,b2)(a1,b1)(a1,b1),(a2,b2)A×A:¬[(a1,b1)R(a2,b2)(a2,b2)R(a1,b1)]R is a non-linear relation

3

Let (A,),(B,) be posets,A,BLexicographic order L on A×B:(a1,b1)L(a2,b2)(a1<a2(a1=a2b1b2))

3a

Find posets (A,),(B,) such that L is non-linearSolution:(A,)=({2,3},)(B,)=({5,7},)23(2357)F(2,5)(3,7)32(3275)F(3,7)(2,5)L is non-linear

3b

Prove: L is linear, are linearProof:Let a1,a2A,b1,b2B(a1,b1),(a2,b2)A×BLet , be linear{a1a2a2a1b1b2b2b1{[a1<a2a2<a1a1=a2b1b2b2b1{[(a1,b1)L(a2,b2)(a2,b2)L(a1,b1)a1=a2b1b2b2b1[(a1,b1)L(a2,b2)(a2,b2)L(a1,b1)a1=a2(b1b2b2b1)[(a1,b1)L(a2,b2)(a2,b2)L(a1,b1)a1=a2b1b2a1=a2b2b1[(a1,b1)L(a2,b2)(a2,b2)L(a1,b1)(a1,b1)L(a2,b2)(a2,b2)L(a1,b1)L is linear(1)Let L be linear[(a1,b1)L(a2,b1)(a2,b1)L(a1,b1)[a1<a2(a1=a2b1b1)a2<a1(a2=a1b1b1)a1a2a2a1 is linear(2)[(a1,b1)L(a1,b2)(a1,b2)L(a1,b1)[a1<a1(a1=a1b1b2)a1<a1(a1=a1b2b1)b1b2b2b1 is linear(3)(1)(2)(3)L is linear, are linear

4

Let (A,) be a poset, assume min(A)=a, let BA

4a

Prove or disprove: aBinf(B)=aProof:BAbB:bAbB:abaBa=min(B)min(B)inf(B)=min(B)inf(B)=a

4b

Prove or disprove: inf(B)=aaBDisproof:Let A={xR|x0}Let a1a2a1a2min(A)=0Let B={1n|nN}inf(B)=00BDisproved

5a

Find a function f:NN that is injective but not surjectiveSolution:f(n)=n+1n1,n2N:f(n1)=f(n2)n1+1=n2+1n1=n2f is injectivenN:f(n)1f is not surjective

5b

Find a function f:NN that is surjective but not injectiveSolution:f(n)={nn=1n1otherwisef(1)=f(2)f is not injectivenN:n+1N:f(n+1)=n+11=nf is surjective

5c

Let f:RR,f(x)=mx+bFor which values of m,bR, function f is bijective?Solution:m,b,x1,x2R:f(x1)=f(x2)mx1+b=mx2+b[m=0x1=x2m0f is injectiveLet yRy=mx+bx=ybmybmRm0[yRxR:f(x)=y]m0f is bijectivem0

6

Define and prove whether the functions are injective, surjective or bijective

6a

f:ZZ,f(n)=|n|Also find Im(f)Solution:f(1)=f(1)=1f is not injectivenZ:f(n)1f is not surjectiveIm(f)={zZ|z0}

6b

f:R{0,1},f(x)={1xQ0xQSolution:f(1)=f(2)=1f is not injectivef(1)=1,f(2)=0Im(f)={0,1}f is surjective

6c

f:P(A)P(A),f(B)=ABSolution:If there are no two different elements in P(A), then f is obviously injectiveLet B1,B2A,B1B2b can be in B1 or in B2bB1:bB2bB1bAbAB2bB1bAB1AB1AB2[B1B2f(B1)f(B2)]A:f is injectiveLet CABA:B=ACf(B)=A(AC)=CA:f is surjective

6d

A,BAf:P(A)P(B),f(C)=CBSolution:AB=B=BBf(A)=f(B)=Bf is not injectiveLet B1BB1BAB1P(A)f(B1)=B1B=B1f is surjective

6e

A,BAf:P(B)P(A),f(C)=C(AB)Solution:Let C1,C2B,C1C2c can be in C1 or in C2cC1:cC2cC1cBcABcC2cC2(AB)cC1cC1(AB)C1(AB)C2(AB)[C1C2f(C1)f(C2)]f is injectiveBAABX:X(AB)ACB:f(C)f is not surjective

7

Let A be a setLet f:ANLet R be a relation on AaRbf(a)f(b)Prove: R is an order relation f is injectiveProof:Let a,b,cAR is reflexive:aRaf(a)f(a)TR is transitive:aRbbRcf(a)f(b)f(c)f(a)f(c)aRcLet ab,f(a)=f(b)f(a)=f(b)abf(a)f(b)f(b)f(a)abaRbbRaabR is not an order relation[f is not injectionR is not an order relation]R is an order relationf is injective(1)Let ab,aRb,bRaaRbbRaabf(a)f(b)f(b)f(a)abf(a)=f(b)abf is not injective[R is not an order relationf is not injective]f is injectiveR is an order relation(2)(1)(2)R is an order relationf is injective

8

Let A,B be finite sets

8a

Let f:ABProve: |A|=|B|[f is injective f is surjective]Proof:Let |A|=|B|=nLet f be injectivea1,a2A:a1a2f(a1)f(a2)There are n unique sources in A there are n unique images in B|Im(f)|=|A|=nIm(f)B|Im(f)|=nIm(f)=Bf is surjective(1)Let f be surjectivebB:aA:f(a)=bLet a1,a2A:a1a2f(a1)=f(a2)Let bB:b=f(a1)=f(a2)|A{a1,a2}|=n2|B{b}|=n1b1B{b}:b1bf(a1)b1f(a2)There are n1 distinct images that have at least one source each,however there are only n2 distinct sourcesaA,b1,b2B:f(a)=b1=b2f is not to one Contradiction![a1,a2A:a1a2f(a1)f(a2)]f is injective(2)(1)(2)f is injectivef is surjective

8b

Let f:ABProve: [f:f is injectivef is surjective]|A|=|B|Proof:As proved in 8a, f:|A|=|B|[f is injectivef is surjective]|A|=|B|[f:f is injectivef is surjective](1)Let f:f is injectivef is surjectiveLet |A|>|B|=nA={a1,a2,,an,an+1,},B={b1,b2,,bn}Let i[1,n]:f(ai)=bif is surjectiveBy our assumption, f is also injective, but there is no bn+1i[1,n]:f(an+1)=bii[1,n]:aian+1f(ai)=f(an+1)f is not injectiveContradiction!|A||B|Let n=|A|<|B|A={a1,a2,,an},B={b1,b2,,bn,bn+1,}Let i[1,n]:f(ai)=bif is injectiveBy our assumption, f is also surjective, but there is no an+1i[1,n]:f(ai)=bn+1f is not surjectiveContradiction!|A||B||A||B||A||B||A|=|B|[f:f is injectivef is surjective]|A|=|B|(2)(1)(2)[f:f is injectivef is surjective]|A|=|B|

9

Let X=P(N×N)S on X is defined as following:R1SR2R1R2 is an equivalence relation

9a

Is S an equivalence relation on X?Solution:Let R1XR1SR1R1R1 is an equivalence relationR1R1=R1[S is reflexiveR1 is an equivalence relation]X is a set of all relations on NLet R={(n,m)N×N|n<m}RN×NRP(N×N)R is not reflexiveR is not an equivalence relationS is not reflexiveS is not an equivalence relation

9b

Prove: (SS) is an equivalence relationProof:Let us define (SS)R1(SS)R2R3:R1SR3R3SR2R3:R1R3 is an equivalence relationR3R2 is an equivalence relationR1,R2P(N×N):R1N×N=R2N×N=N×N an equivalence relationR1,R2P(N×N):R1(SS)R2S is full(SS) is an equivalence relation