# Let $X=\{1,2,3\}$, $Y=\{1,2,3,4\}$, and $Z=\{1,2\}$

Let $X=\{1,2,3\}$, $Y=\{1,2,3,4\}$, and $Z=\{1,2\}$

(a) Define a function $g:X\rightarrow Z$ that is onto but not one-one

(b) Define a function $h: Y\rightarrow Y$ that is neither one-to-one nor onto

for (a) suppose we define $g(1)=1,g(2)=2,g(3)=2$ Is right ?

for (b) $h(1)=h(2)=h(3)=h(4)=1$ Is right ?

• Yes! It's correct. – André Porto Nov 9 '16 at 4:41
• @vidyarthi...g is not one one – user293581 Nov 9 '16 at 4:43
• @rajendra yes, i mistook onto for one-one. You are right. – vidyarthi Nov 9 '16 at 4:45