Thursday, November 13, 2008

Boolean functions

Let B={0,1}, then a f:B^k -> B function is called Boolean function, where B^k = BxBx...xB is Cartesian product. The k called the arity of function f, or in other words the number of arguments. It is simple to show that there are 2^(2^k) distinct Boolean functions of arity k. In previous post I mention some functions, so let define them precisely now.
The logical negation function ¬ has arity 1 and truth table is:
p ¬p
0 1
1 0
This function also written as ~ ,NOT and etc...

The logical conjunction ⋀ has arity 2 and truth table is:
p q p⋀q
0 0 0
0 1 0
1 0 0
1 1 1
Also written as &,*,AND and etc..

The logical conjunction ⋁ has arity 2 and truth table is:
p q p⋁q
0 0 0
0 1 1
1 0 1
1 1 1
Also written as +,OR and etc..

The logical implication → has arity 2 and truth table is:
p q p→q
0 0 1
0 1 1
1 0 0
1 1 1

There are 16 distinct Boolean functions of arity 2 and most of them have their own name, but they can be expressed with \neg,⋀,⋁ and →.In general the set of Boolean functions A called functionally complete if every Boolean function can be defined using functions of set A.
The set { \neg,⋀,⋁, →} of connectives is functionally complete, so every Boolean function can be written as a propositional formula. There are also other functionally complete sets, and such that sets which consists only one element. For example Sheffer's function (NAND,\neg(p⋀q)) or NOR (\neg(p⋁q)) are functionally complete. In general case the Post's theorem show which sets can be functionally complete.


No comments: