Why are these the four 1-ary boolean function

367 Views Asked by At

So I know that a Boolean function takes inputs and outputs either True or False.

For a 1-ary Boolean function, I am under the impression this means it can take True , or False

and so we could have

TT FF TF FT

as four functions. But how does this correspond to what my teacher says are the four, being True, False, Identity , and negation?

For 2-ary,

Would it be

TT-TF TT-TT TT-FT TT-FF TF-TF TF-FT TF-FF.. etc , etc?

I am just a bit confused on what are Boolean functions and what the arity really means.

1

There are 1 best solutions below

1
On BEST ANSWER

If $f(T)=T$ and $f(F)=T$ then $f(x)=T$ (the constant function "true").

If $f(T)=T$ and $f(F)=F$ then $f(x)=x$ (the identity function).

If $f(T)=F$ and $f(F)=T$ then $f(x)=\text{NOT } x$ (negation).

If $f(T)=F$ and $f(F)=F$ then $f(x)=F$ (the constant function "false").

That's all; there are no other possibilities for $f(T)=\text{__ }$ and $f(F)=\text{__ }$ if the blanks have to be filled with truth values $T$ or $F.$

A Boolean function is a function whose inputs and outputs are truth values. The "arity" of a function is the number of arguments it takes: $f(x)$ is $1$-ary (aka unary or singulary) $f(x,y)$ is $2$-ary (aka binary), $f(x,y,z)$ is $3$-ary (aka ternary), etc.

To get a binary Boolean function, you fill in each of the blanks in $$f(T,T)=\text{__ },f(T,F)=\text{__ },f(F,T)=\text{__ },f(F,F)=\text{__ }$$ with $T$ or $F$; there are $2^4=16$ ways to fill in the blanks, so there are $16$ binary Boolean functions. In other words, the truth table for a Boolean function of two variables has $4$ rows, so there are $2^4=16$ possibilities for the output column.