Consider all functions $f : \{-1, 0, 1\}^3 \to \{-1, 1\}$. How many of these functions exist and how many can be realized by a perceptron.
What are the conditions that one has to check?
N.B. A perceptron is a function $f_{w,b} : {\bf R}^n \to {\bf R}$ such that $f_{w,b}(x) = {\rm sgn}(w\cdot x - b)$