In my course on probabilistic graphical models, my professor made a claim which I find a little sus. In discussing the equivalence between Markov Random Fields and Factor Graphs, the following example was given:

An MRF over 3 variables was drawn as a triangle graph (3-cycle). This admits density function like $\psi(x, y, z)$. Naturally, an equivalent factor graph can be drawn by having only one factor connected to all three variables, $p(x,y,z) \propto f(x, y, z)$. However the example where a factor graph with three factors, one along each edge, was also considered, which admits a density like $p(x,y,z) \propto f_1(x,y) \cdot f_2(y,z) \cdot f_3(x,z)$.

The question was posed that all three graphical models are equivalent for the appropriate choice of factors. Formally, the claim is as follows:

For any nonnegative function $f(x,y,z)$, there exists nonnegative functions $u, v, w$ such that $f(x,y,z)=u(x,y)\cdot v(y,z)\cdot w(x,z)$. We can assume that $x,y,z \in \{0,1\}$.

My guess at a counterexample would be a function along the lines of $f(x,y,z) = xy + yz + xz$, but I'm stuck at finding a way to *prove* that this cannot be written as a product of pairwise factors.

Intuitively, for a binary alphabet, $f(x,y,z)$ can be encoded using 8 values, where each of $u,v,w$ need 4 values, leaving 8 degrees of freedom versus 12. But this intuition seems weak to me.