Solution (source code)

= Solution

Take the <relational schema> and <functional dependency>
$$
\boxed{R(b,a),\qquad F=\{b\to a\}.}
$$
The <attribute closure> of $\{b\}$ is $\{b,a\}$, so $\{b\}$ is a <candidate key>. The <attribute closure> of $\{a\}$ is just $\{a\}$, so it is not a <superkey>. The set $\{a,b\}$ is a <superkey> but is not a <candidate key>, because removing $a$ leaves the <superkey> $\{b\}$. Thus the only <candidate key> is $\{b\}$, and $a$ occurs in none.

For example, records $(b,a)=(1,7),(2,7)$ illustrate that the same $a$ value may occur at different $b$ values. The conclusion about <candidate keys> follows from the declared <functional dependencies>, rather than from accidental uniqueness in any one sample.