210k views
5 votes
Determine whether f is a function from the set of all bit strings to the set of integers if

a.f (s) is the position of a 0 bit in s.

User Tobias R
by
6.0k points

1 Answer

7 votes


f is not a function because for a given string it can return more than one possible value. For example, if
s=010, then
f(s)\in\{1,3\}.

User Jaya Mayu
by
6.0k points