Determine whether f is a function from the set of all bit strings to the set of integers ifa) f(S) is the position of a 0 bit in S.________________b) f(S) is the number of I bits in S.________________c) f(S) is the smallest integer i such that the ith bit of, S is 1 and f (s) = 0 when S is the empty string, the string with no bits.

Problem 3E

Determine whether f is a function from the set of all bit strings to the set of integers if

a) is the position of a 0 bit in S.

b) is the number of 1 bit in S.

c) is the smallest integer i such that the ith bit of, S is 1 and when S is the empty string, the string with no bits.

Step by step solution

Step 1 of 3

Part a) is the position of a 0 bit in S.

The function can exist if there is a 0 bit in S and it does not exist if there are no 0 bits, it is also possible that more than one 0 bits are in S therefore can have more than one value.

Since, the function definition that it must be unique is not adhered.

Hence, it is not a function.