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 -> Bool
A binary truth function takes a 2-tuple of Booleans (2 vars)
(Bool, Bool) -> Bool
A 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
Was this helpful?