A $\text{3-ary}$ boolean function is a function that takes three boolean arguments and produces a boolean output. Let $f$ and $g$ be $\text{3-ary}$ boolean functions. We say that $f$ and $g$ are neighbours if $f$ and $g$ agree on at least one input and disagree on at least one input: that is, there exist $x,\: y,\: z$ such that $f(x, y, z) = g(x, y, z)$ and $x',y',z'$ such that $f(x',y',z') \neq g(x',y',z')$.
Suppose we fix a $\text{3-ary}$ boolean function $h$. How many neighbours does $h$ have?
- $128$
- $132$
- $254$
- $256$