About the question of Truth Table

63 Views Asked by At

In general, the number of truth table rows is $\textbf{2}^\textbf{n},$ where $n$ is the number of variables.

But if a variable appears, for example, $q$ appears twice, is it considered a calculation of one or two variables?

Also, if there are variables $q$ and $~q,$ then is it one or two variables?

Thank you in advance!

2

There are 2 best solutions below

0
On

Repetitions of, say '$q$,' count as the same variable, so it would be considered one variable. The definition is the same as for an equation in algebra, like $x^2+x =0.$ The unknown 'x' counts as just one unknown.

0
On

In general, the number of truth table rows is $\mathbf{2^n},$ where $n$ is the number of variables.

To be clear, $n$ is the count for distinct variables in the expression.

The truth table for $(p\to q)\to((p\to r)\to (q\to r))$ will have $2^3$ rows.