How do you count the number of literals in a boolean function?

188 Views Asked by At

Let $f(X,Y,Z) = XYZ + XY'Z' + X'YZ'$ and $g(X,Y,Z) = XY + X'Y'Z'$

What is the number of literals in each of these expressions?

I think there are 9 literals in $f(X,Y,Z)$ and 5 literals in $g(X,Y,Z)$. But am I counting them correctly?

If not, do you not count the same variable twice within the same expression? In that case it would be 6 literals in $f(X,Y,Z)$. And 5 literals in $g(X,Y,Z)$.

Thanks.