Let S be the set of all strings in 0’s and 1’s, and define a function F : S →Z nonneg as follows: for all strings s in S, F(s) = the number of 1’s in s.
a. What is F(001000)? F(111001)? F(10101)? F(0100)?
b. Is F one-to-one? Prove or give a counterexample.
c. Is F onto? Prove or give a counterexample.
d. Is F a one-to-one correspondence? If so, find F−1 .