Difference between Boolean formula and Boolean expression

559 Views Asked by At

I have read in a book here something I think is wrong. It says that a boolean function $\phi:B^2\rightarrow B$ defined by a truth table where {0,1} and {0,0} returns {1}, cannot be expressed with a boolean expression of two variables $\phi(x,y)$. I don't know if I´m missunderstanding the notion of expression but It is easy to show that exists a boolean formula (or an expression) that produces this result.

Is not a boolean formula the same as a boolean expression?

2

There are 2 best solutions below

0
On

A boolean formula can be directly transformed into a combinational circuit, however an expression, such as algorithms and Turing Machines, may need a compilation process to represents a boolean formula; and that formula may be different using different compilation processes.

0
On

https://en.wikipedia.org/wiki/Boolean_circuit states:

As a special case, a propositional formula or Boolean expression is a Boolean circuit with a single output node in which every other node has fan-out of 1. Thus, a Boolean circuit can be regarded as a generalization that allows shared subformulas and multiple outputs.

In a boolean formula / boolean circuit, parts can be reused. That can cause an exponential blowup when doing a straightforward conversion from formula to expression.