1. \(5^4 + 5^4 - 5^3\) functions.

  2. \(4\cdot 5^4 + 5 \cdot 4 \cdot 5^3 - 4 \cdot 4 \cdot 5^3\) functions.

  3. \(5! - \left[ 4! + 4! - 3! \right]\) functions. Note we use factorials instead of powers because we are looking for injective functions.

  4. Note that being surjective here is the same as being injective, so we can start with all \(5!\) injective functions and subtract those which have one or more “fixed point”. We get \(5! - \left[{5 \choose 1}4! - {5 \choose 2}3! + {5 \choose 3}2! - {5 \choose 4}1! + {5 \choose 5} 0!\right]\) functions.