Linear Boolean
Linear Boolean
SERGIU RUDEANU
Abstract. In [1], [2] it was proved that a function f : {0, 1}n −→ {0, 1} is positive
if and only if it is increasing, it is linear if and only if it satisfies
(*) f (X) ∨ f (Y ) = f (XY ) ∨ f (X ∨ Y )
and it is quadratic if and only if it satisfies
(**) f (XY ∨ XZ ∨ Y Z) ≤ f (X) ∨ f (Y ) ∨ f (Z).
In this paper we work with an arbitrary Boolean algebra B and with arbitrary
Boolean functions f : Bn −→ B, that is, algebraic functions over B. We prove a
refined generalization of the characterization of positive functions, we prove that
a Boolean function satisfies (*) if and only if it is linear in each variable, and we
prove that every quadratic Boolean function satisfies (**). Moreover, a Boolean
function f : B2 −→ B is linear if and only if it satisfies (*) and a Boolean function
f : B3 −→ B is quadratic if and only if it satisfies (**).
The term Boolean function over an arbitrary Boolean algebra (B, ∨, ·,0 , 0, 1) de-
signates the algebraic functions f : Bn −→ B, that is, the functions which can be
obtained from variables and constants of B by superpositions of the basic operations
∨, ·,0 . In the Boolean algebra ({0, 1}, ∨, ·,0 , 0, 1), where x ∨ y = max{x, y}, x · y =
min{x, y} is also denoted simply xy, and x0 = 1 − x, every function : {0, 1}n −→
{0, 1} is Boolean; besides, {0,1} is the only Boolean algebra with this property. The
monograph [5] is devoted to Boolean functions in this general sense and to Boolean
equations, meaning equations expressed by Boolean functions f : Bn −→ B. See also
the continuation [6].
At the time when [5] was written, the functions f : {0, 1}n −→ {0, 1} were termed
truth functions or switching functions, terms reminiscent of their roles in logic and in
Key words and phrases. Boolean function, positive linear function, linear Boolean function, qua-
dratic Boolean function.
2010 Mathematics Subject Classification. 06E30.
Received: October 10, 2012.
177
178 SERGIU RUDEANU
switching theory, respectively, and distinguishing them from Boolean functions in the
general sense. In the last decades a huge literature is devoted to truth functions and
their numerous applications in science and technology; see e.g. the recent monographs
[3], [4]. These compendia reveal that in most cases the results are mainly based on
specific properties of the algebra {0,1} rather than on general properties of Boolean
algebras.
Under the given circumstances the author deeply regrets that people working in
this field are using the term “Boolean algebra” for the algebra {0,1} and “Boolean
functions” for truth functions, thus using the general terminology for the particular
case.
On the other hand it may be interesting to see whether certain isolated results can
be generalized from truth functions to arbitrary Boolean functions. The present Note
tackles such a particular problem.
Among other results, in [1] (see also [2]) the following theorems were proved about
a truth function f : {0, 1}n −→ {0, 1}:
1) f is positive, i.e., f |xi =0 ≤ f |xi =1 , if and only if it is increasing, i.e., X ≤ Y ⇒
f (X) ≤ f (Y );
2) f is linear, i.e., all its prime implicants are literals, if and only if it satisfies the
functional equation (*) f (X) ∨ f (Y ) = f (XY ) ∨ f (X ∨ Y ), where XY and X ∨ Y
are defined componentwise, and
3) f is quadratic if and only if it satisfies the functional equation (**) f (XY ∨ XZ ∨
Y Z) ≤ f (X) ∨ f (Y ) ∨ f (Z).
In the present Note, after several prerequisites which make the work self-contained,
we obtain the following results:
1’) we generalize and refine Theorem 1) to Boolean functions,
2’) we prove that a Boolean function satisfies property (*) if and only if it is linear
in each variable, and for n = 2 condition (*) characterizes the linear Boolean
functions f : B2 −→ B, and
3’) every quadratic Boolean function satisfies property (**), and for n = 3 condition
(**) characterizes the quadratic Boolean functions f : B3 −→ B.
Prerequisites
Let (B, ∨, ·,0 , 0, 1) be an arbitrary Boolean algebra. Note that {0, 1} is a Boolean
subalgebra of B and every two-element Boolean algebra is isomorphic to the algebra
{0, 1} described above.
Further, let n be a positive integer. We use a vectorial notation like X = (x1 , . . . , xn ),
Y = (y1 , . . . , yn ), · · · ∈ Bn and A = (α1 , . . . , αn ), B = (β1 , . . . , βn ), · · · ∈ {0, 1}n . The
set Bn is a Boolean algebra under the componentwise defined operations ∨, ·,0 , with
zero 0 = (0, . . . , 0) and one 1 = (1, . . . , 1).
The maxterms are the 2n Boolean functions defined by X A = xα1 1 . . . xαnn for A ∈
{0, 1}n , where xα are the Boolean functions defined by x1 = x and x0 = x0 . The basic
ON POSITIVE, LINEAR AND QUADRATIC BOOLEAN FUNCTIONS 179
property of Boolean functions is that they are characterized by the existence of the
canonical disjunctive form _
f (X) = cA X A ,
A∈{0,1}n
where the coefficients cA ∈ B are uniquely determined by cA = f (A) (∀ A ∈ {0, 1}n ).
Therefore every Boolean function f : Bn −→ B is determined by its restriction to
{0, 1}n and conversely, every truth function f : {0, 1}n −→ {0, 1} can be extended to
a unique Boolean function f : Bn −→ B.
This immediately implies that two Boolean functions coincide if and only if their
restrictions to {0, 1}n coincide. In other words, if f, g : Bn −→ B are Boolean
functions, then
f (X) = g(X) (∀ X ∈ Bn ) ⇐⇒ f (A) = g(A) (∀ A ∈ {0, 1}n ) ;
even more generally,
f (X) ≤ g(X) (∀ X ∈ Bn ) ⇐⇒ f (A) ≤ g(A) (∀ A ∈ {0, 1}n ) .
These two results are known as the Müller-Löwenheim verification theorem.
Q
Every Boolean function f : Bn −→ B reaches its minimum A∈{0,1}n f (A) and its
W
maximum A∈{0,1}n f (A); as a matter of fact, the range of f is the interval determined
by these values.
A Boolean equation ax ∨ bx0 = 0 is consistent if and only if ab = 0, or equivalently,
b ≤ a0 , in which case the solution set is the interval [b, a0 ] = {x ∈ B | b ≤ x ≤ a0 }.
The computation rules x ≤ y ⇐⇒ xy 0 = 0, x = y ⇐⇒ xy 0 ∨ x0 y = 0 and
W
xk = 0 (k = 1, . . . , m) ⇐⇒ m k=1 xk = 0 enable the reduction of every system of
Boolean equations and/or inequalities to a single equation of the form f (X) = 0,
where f is a Boolean function. To write down the consistency condition of such an
equation it is convenient to proceed by successive elimination of variables. The current
step of this process is the following. To eliminate a variable x write the equation in
the form αx ∨ βx0 ∨ γ = 0, where the Boolean functions α, β and γ do not depend
on x. Then the consistency condition of the equation f (X) = 0 is the same as the
consistency condition of the equation αβ ∨ γ = 0.
Proof. The equivalences (ii)⇐⇒(iii)⇐⇒(iv) are valid in the more general case of a
function f : Ln −→ L where L is a lattice.
The equivalences (ii)⇐⇒(v), (iii)⇐⇒(vi) and (iv)⇐⇒(vii) are established by the
Müller-Löwenheim verification theorem.
(i)⇒(v): Suppose A, B ∈ {0, 1}n satisfy A ≤ B. If A = B then (v) is trivial. If
A < B then αi ≤ βi for all i ∈ {1, . . . , n} and there are some indices i for which
αi < βi . Let m be the number of those indices i for which αi = 0 and βi = 1; so
0 < m ≤ n. Let further
A = A0 < A1 < · · · < Am = B
be the sequence obtained from A by changing in turn the 0s of A into 1s. Then
f (A) = f (A0 ) ≤ f (A1 ) ≤ · · · ≤ f (Am ) = f (B).
(ii)⇒(i): Trivial. ¤
So, the class of linear functions is indeed a subclass of the class of Boolean functions.
Note that the constant functions and the Boolean functions of one variable are linear.
The problem of characterizing linear Boolean functions is not trivial for n ≥ 2.
n
_
f (XY ) ∨ f (X ∨ Y ) = (ci xi yi ∨ di (x0i ∨ yi0 ) ∨ ci (xi ∨ yi ) ∨ di x0i yi0 )
i=1
_n
= (ci (xi ∨ yi ) ∨ di (x0i ∨ yi0 )).
i=1
¤
To prove a partial converse of Lemma 2.1 we need two preliminaries.
Lemma 2.2. If a Boolean function f : Bn −→ B satisfies (2.2) then it satisfies also
(2.3) f (1, Y ) ∨ f (0, Z) = f (0, Y ) ∨ f (1, Z) (∀ Y, Z ∈ Bn−1 ),
or equivalently,
(2.3’) f (1, B) ∨ f (0, C) = f (0, B) ∨ f (1, C) (∀ B, C ∈ {0, 1}n−1 ).
Proof. It follows from (2.2) that each side of (2.3) equals f (0, Y Z) ∨ f (1, Y ∨ Z).
¤
A weaker property is the following:
Definition 2.2. A Boolean function f : Bn −→ B is linear in a variable xi if it can
be written in the form f (X) = axi ∨ bx0i ∨ g(Y ), where g : Bn−1 −→ B is a Boolean
function of the remaining variables.
Lemma 2.3. If a Boolean function f : Bn −→ B satisfies (2.2), then it is linear in
each variable.
Proof. Since condition (2.2) is invariant to any permutation of the variables, it suffices
to prove that f is linear in x1 . We will prove that condition (2.2) implies the existence
of some elements a, b ∈ B and of a Boolean function g : Bn−1 −→ B such that
(2.4) f (x, Y ) = ax ∨ bx0 ∨ g(Y ) (∀ x ∈ B, ∀ Y ∈ Bn−1 ).
Indeed, identity (2.4) is equivalent to the system
f (1, Y ) =a ∨ g(Y ) (∀ Y ∈ Bn−1 ),
f (0, Y ) =b ∨ g(Y ) (∀ Y ∈ Bn−1 ),
which is equivalent to the equation
f (1, Y )a0 g 0 (Y ) ∨ f 0 (1, Y )a ∨ f 0 (1, Y )g(Y )∨
∨f (0, Y )b0 g 0 (Y ) ∨ f 0 (0, Y )b ∨ f 0 (0, Y )g(Y ) = 0 (∀ Y ∈ Bn−1 ),
which in its turn is equivalent to the system
(2.5.1) f 0 (1, Y )a ∨ f (1, Y )g 0 (Y )a0 =0 (∀ Y ∈ Bn−1 )
(2.5.2) f 0 (0, Y )b ∨ f (0, Y )g 0 (Y )b0 =0 (∀ Y ∈ Bn−1 ),
(2.5.3) [f 0 (1, Y ) ∨ f 0 (0, Y )]g(Y ) =0 (∀ Y ∈ Bn−1 ).
182 SERGIU RUDEANU
that is,
_ Y
(2.6.1) f (1, B)g 0 (B) ≤ a ≤ f (1, C),
B∈{0,1}n−1 C∈{0,1}n−1
_
(2.7.1) f 0 (1, C) f (1, B)g 0 (B) = 0 (∀ B ∈ {0, 1}n−1 ).
C∈{0,1}n−1
Summarizing, the function f is of the form (2.4) if and only if system (2.6) is
consistent, and this happens if and only if system (2.7) is consistent with respect to
the unknowns g(B).
System (2.7) can be written in the form
_ _
f (1, B) f 0 (1, C) ∨ f (0, B) f 0 (0, C) g 0 (B)∨
C∈{0,1}n−1 C∈{0,1}n−1
(∀ B ∈ {0, 1}n−1 ),
which can be written in the equivalent forms
_
f 0 (1, B)f (0, B) f 0 (0, C)∨
C∈{0,1}n−1
_
∨f 0 (0, B)f (1, B) f 0 (1, C) = 0 (∀ B ∈ {0, 1}n−1 ),
C∈{0,1}n−1
f (0, B)f 0 (1, B)f 0 (0, C) = f (1, B)f 0 (0, B)f 0 (1, C) = 0 (∀ B, C ∈ {0, 1}n−1 ).
The latter condition is fulfilled by Lemma 2.2. ¤
Lemmas 2.1 and 2.3 can be joined as the main result of this section:
Theorem 2.1. Every linear Boolean function satisfies (2.2) and every Boolean func-
tion which satisfies (2.2) is linear in each variable.
Proposition 2.1. A Boolean function f : B2 −→ B is linear if and only if it satisfies
(2.2) with n = 2.
Proof. The “only if” part is valid for arbitrary n by Lemma 2.1. Conversely, if
f : B2 −→ B satisfies (2.2), then by Lemma 2.3 identity (2.4) holds, which becomes
f (x, y) = ax ∨ bx0 ∨ g(y); but g(y) = cy ∨ dy 0 . ¤
4. Open questions
1. For n ≥ 3, is it true that a Boolean function linear in each variable is linear?
2. What more can be said about the converse of Proposition 3.1?
References
[1] O. Ekin, S. Foldes, P.L. Hammer, L. Hellerstein, Equational characterizations of Boolean func-
tion classes. Discrete Math. 211 (2000), 27–51.
[2] L. Hellerstein, Characterizations of special classes by functional equations. Chapter 11 in [3].
[3] Y. Crama, P.L. Hammer, Boolean Functions: Theory, Algorithms and Applications. Cambridge
Univ. Press, New York 2011.
[4] Y. Crama, P.L. Hammer, (eds), Boolean Models and Methods in Mathematics, Computer Sci-
ence and Engineering. Cambridge Univ. Press, New York 2010.
[5] S. Rudeanu, Boolean Functions and Equations. North-Holland, Amsterdam/American Elsevier,
New York 1974.
[6] S. Rudeanu, Lattice Functions and Equations. Springer-Verlag, London 2001.
University of Bucharest,
Faculty of Mathematics and Informatics,
Romania
E-mail address: [email protected]