Explain f and g are one to one or onto with justification


Let T be the set of all binary strings. Define the function f: T→T which counts the number of 1s in the input and expresses the result as a binary number. For example, f(1101101)= 101 because the input has five 1s and 101 is the number five in binary. Define the function g: T→T which replaces each 1 in the input with 10 and replaces each 0 with 11. For example, g(101)=101110

a) Compute f(g(g(100))).

b) Determine, with justification, if f and g are one to one and/or onto.

c) Notice that f(g(1))=1 Find another binary string x where f(g(x))=x, or explain why such a string does not exist.

Solution Preview :

Prepared by a verified Expert
Mathematics: Explain f and g are one to one or onto with justification
Reference No:- TGS0688179

Now Priced at $20 (50% Discount)

Recommended (97%)

Rated (4.9/5)