For the function below which maps fourbit binary numbers to

For the function below, which maps four-bit binary numbers to three-bit binary numbers, indicate whether the function is onto, one-to-one, or both. If it is not onto, specify its range by listing the elements using set notation. If the function is not one-to-one, give an example showing why.

f:{0,1}4{0,1}3 where the output of f is obtained by taking the input string and dropping the first bit. For example, f(1011)=011.

Solution

f:{0,1}4{0,1}3 is no doubt an onto function since element in {01}3 can be mapped from {01}4 since the function only removes the 1st bit from the 4-bit binary number. Or if we consider a 3-bit binary number X3X2X1 (where X1 is the LSB and X3 is the MSB and Xn {0,1}) can be mapped from both 1X3X2X1 or 0X3X2X1. We know that both 1X3X2X1 and 0X3X2X1 are elements of {01}4 So we can easily prove that f:{0,1}4{0,1}3 is no doubt an onto function.

But f:{0,1}4{0,1}3 is not one-to-one function which we shall prove by contradictory example:
we know from the statement that

f(1011) --> 011 and also f(0011) --> 011
so two distinct elements of {01}4 maps so a particular element in {01}3, and hence it is not one-to-one function

For the function below, which maps four-bit binary numbers to three-bit binary numbers, indicate whether the function is onto, one-to-one, or both. If it is not

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site