I've been given the following two families of hash functions:
H
and
G
Each family has three functions $\{0,1,2,3,4\} \to \{0,1,2\}$ that can be seen in the tables above. For each family I need to decide whether it's universal. I know that a family of hash functions $F$ is called universal if for every $x \neq y$, $\text{Pr}(f(x) = f(y)) \le \frac{1}{m}$ ($f$ is a function in $F$). However, I don't understand how to calculate this probability. Should I calculate it for any one of the functions or for the whole family?