Week 5 additional tutorial problem

Let A and B be non-empty subsets of (Do not assume the sets are finite.)

a) Suppose we have a function f:A→B which is onto. Explain how to use f to construct a function g:B→A which is one-to-one.

b) Suppose we have a function f:A→B which is one-to-one. Explain how to use f to construct a function g:B→A which is onto.