1. Prove that if f is a one-way function, then the function g defined by
is also a one-way function. Observe that g reveals half of its input, but is nevertheless one-way.
2. Prove that if there exists a one-way function, then there exists a lengthpreserving one-way function.
3. Let (Gen, H) be a collision-resistant hash function, where H maps strings of length 2n to strings of length n. Prove that the function family (Gen, Samp, H) is one-way (cf. Definition 7.3), where Samp is the trivial algorithm that samples a uniform string of length 2n.