Define the following functions f g and h f 0 130 13 The outp
Define the following functions f, g, and h:
f: {0, 1}3{0, 1}3. The output of f is obtained by taking the input string and replacing the first bit by 1, regardless of whether the first bit is a 0 or 1. For example, f(001) = 101 and f(110) = 110.
g: {0, 1}3{0, 1}3. The output of g is obtained by taking the input string and reversing the bits. For example, g(011) = 110.
h: {0, 1}3{0, 1}3. The output of h is obtained by taking the input string x, and replacing the last bit with a copy of the first bit. For example, h(011) = 010.
A. What is g f(010)?
B. What is g h(010)?
C. What is the range of h f?
D. What is the range of g f?
Solution
a)
gof(010)=g(f(010)
=g(110)
=011
b)
goh(010)=g(h(010)
=g(010)
=010
c) range of hof is(0,1)3
d) range of gof is (0,1)3
