Algorithm of Superposition of Boolean Functions Given with Truth Vectors Anatoly Plotnikov 1 , Alexander Petrov 2 , Anton Petrov 3 1 Department of Computer Systems and Networks, Volodymyr Dalh East-Ukrainian National University Luhansk, 91034, Ukraine 2 Department Applied Informatics, AGH University of Science and Technology Krakow, Poland Department of Computer Systems and Networks, the Dalh East-Ukrainian national university 3 Department of Computer Systems and Networks, Volodymyr Dalh East-Ukrainian National University Luhansk, 91034, Ukraine Abstract In this paper are examined the practical problems of construction of arbitrary superposition of Boolean functions when all functions are given with truth vectors. Keywords: Boolean Function, True Vector, Truth Table, Superposition. 1. Problem statement Let there be a set E = {0;1}. Then the mapping of f: n E E is called a Boolean function. A Boolean function 1 2 ( , ,..., ) n f x x x E ( i x E , i = 1,2,...,n) can be completely defined with truth table: Table 1: Truth table 1 x 2 x … 1 n x n x 1 2 1 ( , ,..., , ) n n f x x x x 0 0 0 0 … 1 1 0 0 0 0 … 1 1 … … … … … … … 0 0 1 1 … 1 1 0 1 0 1 … 0 1 f(0,0,…,0,0) f(0,0,…,0,1) f(0,0,…,1,0) f(0,0,…,1,1) … f(1,1,…,1,0) f(1,1,…,1,1) The first columns of this table contain the lexicographically ordered value sets of Boolean variables and the last column of this table is the value of the given function of every set. This last column is called truth vector of the Boolean function 1 2 ( , ,..., ). n f x x x It is obvious that it is not necessary to write all 2 n sets of values of Boolean variables for determining the Boolean function. It is enough to submit the truth row that corresponds with it. Example 1. Let the Boolean function of three variables be represented with the truth vector: (10110010). Then we can write the appropriate truth table: 1 x 2 x 3 x 1 2 3 ( , , ) f x x x 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 1 0 1 1 0 0 1 0 Let there be a system of Boolean functions: 1 2 1 1 2 2 1 2 1 2 ( , ,..., ) ( , ,..., ) ( , ,..., ) ....................... ( , ,..., ) n m m n m f x x x f x x x f x x x f x x x (1) Then the function 1 1 2 2 1 2 1 2 ( ( , ,..., ), ( , ,..., ),..., ( , ,..., )) m m n m f f x x x f x x x f x x x 1 2 ( , ,..., ) m F x x x is called a superposition of functions of the system (1). In simple terms superposition is the construction of new function by means of replacement of some variables of the initial function by the appropriate functions. IJCSI International Journal of Computer Science Issues, Vol. 9, Issue 4, No 1, July 2012 ISSN (Online): 1694-0814 www.IJCSI.org 19 Copyright (c) 2012 International Journal of Computer Science Issues. All Rights Reserved.