Paragraph

How many functions \(f: \{1,2,3,4,5\} \to \{a,b,c,d,e\}\) are there satisfying:

  1. \(f(1) = a\) or \(f(2) = b\) (or both)?

  2. \(f(1) \ne a\) or \(f(2) \ne b\) (or both)?

  3. \(f(1) \ne a\) and \(f(2) \ne b\text{,}\) and \(f\) is injective?

  4. \(f\) is surjective, but \(f(1) \ne a\text{,}\) \(f(2) \ne b\text{,}\) \(f(3) \ne c\text{,}\) \(f(4) \ne d\) and \(f(5) \ne e\text{?}\)

in-context