retagged by
1,135 views
0 votes
0 votes
Determine whether f is a function from the set of all bit strings to the set of integers if 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.
retagged by

1 Answer

Best answer
2 votes
2 votes
The necessary criteria which must be satisfied by every function is that it must be defined for every element in the domain and it must map one element from domain to only one element in range (A unique mapping).

In this case the domain is the set of all bit strings and range is the set of Nonnegative Integers.

The said function is not defined for every bit string which contains only 0's.

So we conclude it is not a function.
selected by

Related questions

0 votes
0 votes
0 answers
1
0 votes
0 votes
0 answers
2
saumya mishra asked May 2, 2018
566 views
What is the domain of the function log(log(sinx))?
1 votes
1 votes
3 answers
3
rahul sharma 5 asked Jul 27, 2017
782 views
Following is the way of checking the one to one functionorCan i use bi implication in between these?If not,then why?
1 votes
1 votes
1 answer
4
saurabh rai asked Dec 1, 2016
508 views
Which of the following statement/s representing One-to-One Function.S1; ∀a∀b(f (a) = f (b) → a = b)S2: ∀a∀b( a ≠ b→f (a) ≠ f (b) )S3: ∀a∀b(a = b →...