Following our regular procedure to solve this type of exercise, we start with the definitions.
Definition: “A function f is said to be one-to-one, or an injunction, if and only if f (a) = f (b) implies that a = b for all a and b in the domain of f. A function is said to be injective if it is one-to-one.” Discrete mathematics and its applications By Rosen.
Remark: “We can express that f is one-to-one using quantifiers as ∀a∀b(f (a) = f (b) → a = b) or equivalently ∀a∀b(a≠b → f (a) ≠f (b)), where the universe of discourse is the domain of the function.” Discrete mathematics and its applications By Rosen.
a) f(a)=b,f(b)=a,f(c)=c,f(d)=d
This function is one-to-one because the definition holds.
“… if and only if f (a) = f (b) implies that a = b for all a and b in the domain of f …”
b) f(a)=b,f(b)=b,f(c)=d,f(d)=c
f(a)=f(b), but a≠b.
Therefore, this function is not one-to-one.
c) f(a)=d,f(b)=b,f(c)=c,f(d)=d
f(a)=f(d), but a≠d.
Therefore, this function is not one-to-one.
Related exercises: