Which of the following best states the condition for a relation from a non-empty set A to a non-empty set B to be a function?
a) Every element of B is associated with exactly one element of A.
b) Every element of A is associated with exactly one element of B.
c) Every element of A is associated with at least one element of B.
d) Every element of A is associated with at most one element of B.