Truth tables
A truth function is a function whose domain and codomain is a Boolean set, ๐น = {true, false}. True and false are sometimes referred to as truth values.
That is, unary truth functions take a Boolean to a Boolean, ๐น -> ๐น, while polyadic truth functions take an n-tuple of Booleans to a Boolean. In fact, all truth functions always return a single Boolean value.
taking a n-tuple of Booleans (truth values) and returns a single truth value, i.e. a single Boolean value (True or False). All truth function always return a single Boolean.
A unary truth function takes a Boolean (1 var)
Bool -> BoolA binary truth function takes a 2-tuple of Booleans (2 vars)
(Bool, Bool) -> BoolA binary truth function takes a 3-tuple of Booleans (3 vars)
(Bool, Bool, Bool) -> Bool
and so on.
where:
v is number of varibles
c is number of configurations
f is number of truth functions
If we let single letters variables (e.g. p, q, r, s, t, etc.) stand for values of Boolean type (each one is either T or F), we see that
the number of truth functions is related to the number of variables, n, in this way: (2^2)^n, which is 4^n. One Boolean variable ranges over 2 values so there are 2^m possible configurations:
v is num of configurations: c = 2^v
v
c
f
arity
0
2
2
nullary
constants TRUE and FALSE, ฮฑ -> ๐น
1
2
4
unary
p: ๐น -> ๐น
2
4
8
binary
โจp: ๐น, q: ๐นโฉ -> ๐น
3
8
64
ternary
โจp: ๐น, q: ๐น, r: ๐นโฉ -> ๐น
4
16
256
quaternary
โจp: ๐น, q: ๐น, r: ๐น, s: ๐นโฉ -> ๐น
5
25
256
quinary
6
senary
7
septenary
8
octonary
9
novenary
10
denary
11
undenary
12
duodenary
12
tredenary
quaterdenary
An atomic logic variable, e.g. p, can have one of 2 possible values: it can either be true (T, 1) of false (F, 0). A truth function is an n-ary function from n variables to a truth value (T or F).
For any number n, there are 2^2^n possible n-ary truth functions.
One variable
ยฌ โง โจ โ โ โ
p p p ฯฮฑฯ ฯฮฑฯ ฯฮฑฯ p ยฌp pโงp pโจp pโp pโp pโp 1 0 1 1 1 1 1 0 1 0 0 1 1 1
Two variables
โ โ โก โ โ โข
p q
โง
โจ
pโq
qโp
pโ(pโq)
pโ(qโp)
1 1
1
1
1
1
1 1 1
1 1 1
.
1 0
0
1
0
1
1 0 0
1 0 1
.
0 1
0
1
1
0
0 1 1
0 1 0
.
0 0
0
0
1
1
0 1 1
0 1 1
.
---
-
-
---
---
-------
-------
----------------------------------------------
c a 8 e b d
1000 8 1010 a 1100 c 1110 e
Three variables
โโฌโโฌโโฌโโโโ0123456789abcdef โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ nโ4โ3โ 2 โ โโโโผโโผโโโโค xโdโcโa bโFโง โจT โโผโโผโโผโโโโผโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 0โ0โ0โ0 0โ00000000โ11111111 1โ0โ0โ0 1โ00001111โ00001111 2โ0โ0โ1 0โ00110011โ00110011 3โ0โ0โ1 1โ01010101โ01010101 โโค โ โโโโโผโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 4โ0โ1 0 0โ 5โ0โ1 0 1โ 6โ0โ1 1 0โ 7โ0โ1 1 1โ 8โ1โ0 0 0โ โโค โโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 9โ1 0 0 1โ aโ1 0 1 0โ bโ1 0 1 1โ cโ1 1 0 0โ dโ1 1 0 1โ eโ1 1 1 0โ fโ1 1 1 1โ โโดโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Misc ternary formulas
(p -> q -> r) -> (p -> q) -> p -> r
p โ (q --> r) โพ (p โถ q) โ (p โถ r) 0 0 0 1 0 0 1 1 0 1 0 0 1 0 1 1 1 1 0 0 1 0 0 1 0 1 1 0 1 0 1 0 0 1 0 0 1 1 1 1 โก ฯ โก
Last updated