asked 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.

asked
User Tobias R
by
8.3k 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\}.

answered
User Jaya Mayu
by
8.3k points

No related questions found