Get 20M+ Full-Text Papers For Less Than $1.50/day. Start a 14-Day Trial for You or Your Team.

Learn More →

Minor complexity of discrete functions

Minor complexity of discrete functions Received 4 June 2018 In this paper we study a class of complexity measures, induced by a new data structure for representing Revised 16 July 2018 k-valued functions (operations), called minor decision diagram. When assigning values to some variables in a Accepted 17 July 2018 function the resulting functions are called subfunctions, and when identifying some variables the resulting functions are called minors. The sets of essential variables in subfunctions of f are called separable in f. Weexaminethemaximalseparablesubsetsofvariablesandtheirconjugates,introducedinthe paper,proving thateachsuchsethasatleastoneconjugate.Theessentialaritygapgapðf Þofthefunctionf istheminimalnumber of essential variables in f which become fictive when identifying distinct essential variables in f. We also investigate separable sets of variables in functions with non-trivial arity gap. This allows us to solve several important algebraic, computational and combinatorial problems about the finite-valued functions. Keywords Separable set, Subfunction, Identification minor, Minor decision diagram, Minor complexity Paper type Original Article 1. Introduction The complexity of finite operations is still one of the fundamental tasks in the theory of computation and besides classical methods like substitution or degree arguments a bunch of combinatorial, and algebraic techniques have been introduced to tackle this extremely difficult problem. A logic gate is a physical device that realizes a Boolean function. A logic circuit is a direct acyclic graph in which all vertices except input vertices carry the labels of gates. When realizing n-variable k-valued functions the circuit is called the ðk; nÞ-circuit or Multi-Valued Logic circuit (MVL-circuit). To move from logical circuits to MVL-circuits, researchers attempt to adapt CMOS (complementary metal oxide semiconductor), I L (integrated injection logic) and ECL (emitter- coupled logic) technologies to implement the many-valued and fuzzy logics gates. The MVL- circuits offer more potential opportunities for the improvement of present VLSI circuit © Slavcho Shtrakov. Published in Applied Computing and Informatics. Published by Emerald Publishing Limited. This article is published under the Creative Commons Attribution (CC BY 4.0) license. Anyone may reproduce, distribute, translate and create derivative works of this article (for both commercial and non-commercial purposes), subject to full attribution to the original publication and authors. The full terms of this license may be seen at http://creativecommons.org/licences/by/4.0/legalcode Declarations of interest: None. An idea for a mesure of the minor complexity of functions was presented by M. Couceiro, E. Lehtonen and T. Waldhauser in [5,6], named parametrized arity gap. However, these results, the present paper and [16] are suitable basis for future investigation of the problems for minor complexities and reconstruction of functions from their MDDs. Publishers note: The publisher wishes to inform readers that the article “Minor complexity of discrete functions” was originally published by the previous publisher of Applied Computing and Informatics and Applied Computing and the pagination of this article has been subsequently changed. There has been no change to the content of Informatics the article. This change was necessary for the journal to transition from the previous publisher to the new pp. 108-130 one. The publisher sincerely apologises for any inconvenience caused. To access and cite this article, Emerald Publishing Limited e-ISSN: 2210-8327 please use Shtrakov, S. (2020), “Minor complexity of discrete functions”, Applied Computing and p-ISSN: 2634-1964 DOI 10.1016/j.aci.2018.07.003 Informatics. Vol. 17 No. 1, pp. 108-130. The original publication date for this paper was 24/07/2018. designs. For instance, MVL-circuits are well-applied in memory technology as flash memory, Complexity of dynamic RAM, and in algebraic circuits [4]. discrete In this paper we investigate a method for reduction of finite valued functions, namely by functions their identification minors. This method is a basic model of computing with MVL-circuits corresponding to collapsing of some inputs in the circuits. We, also study the computational complexity of this method and classify the functions in finite algebras for small values of k and n under such complexity. Computationalcomplexityisexaminedinconcrete and abstract terms. The concrete analysis is based on models that capture the exchange of space for time. It is also performed via the knowledge about circuit complexity of functions. The abstract analysis is done via complexity classes, the classification of data structures, functions etc. by the time and/or space they need. There are two key methods for reduction (computing) of the k-valued functions which are realized by assigning constants or variables to their inputs. Then the resulting objects are: subfunctions or minors, respectively. These reductions are also naturally suited to complexity measures, which illustrate “difficulty” of computing as the number of subfunctions, separable sets, and minors of the functions. Another topic in complexity theory is to classify finite functions by their complexity such that the functions are grouped into equivalence classes with same evaluations of the corresponding complexities. Each equivalence relation in the algebra P of k-valued functions determines a transformation group whose orbits are the equivalence classes (see [8,10,12]. Using the lattice of Restricted Affine Groups (RAG) in [15] we have obtained upper bounds of different combinatorial parameters of several natural equivalences in P for small values of k and n. In the present paper we follow this line to study assigning (not necessarily unique) variable names to some of the input variables in a function f. This method of computing consists of equalizing the values of several inputs of f. Section 2 introduces the basic definitions and notation of separable sets, subfunctions, minors, arity gap, etc. An important result, namely if a function has non-trivial arity gap then all its sets of essential variables are separable, complements this section. Section 3 examines the ordered decision diagrams (ODD), minor decomposition trees (MDTs) and minor decision diagrams (MDDs) of k-valued functions. In Section 3.3 we treat the minor complexities of functions with their classifications by the transformation groups. Section 4 is an illustration of the results in the paper applied to the simplest case of Boolean functions. In the Appendix we provide a classification of all ternary Boolean functions with respect to the minor complexity. 2. Subfunctions and minors of functions A discrete function f is defined as a mapping: f : A→ Bwhere the domain A ¼ 3 A and the i¼1 range B are non-empty finite or countable sets. Let X ¼ fx ; x ; ...g be a countable set of 1 2 variables and let X ¼ fx ; x ; ... ; x g denote the set of the first n variables in X. Let k be a n 1 2 n natural number with k P 2. Let Z denote the set Z ¼ f0; 1; ... ; k− 1g. The operations k k addition “⊕ ” and product “.” modulo k constitute Z as a ring. An n-ary k-valued function n n (operation) on Z is a mapping f : Z → Z for some natural number n, called the arity of f. P k k k k ∞ n denotes the set of all n-ary k-valued functions and P ¼ ∪ P is called the algebra of n¼1 k n k-valued logic. It is well-known fact that there are k functions in P . For simplicity, let us assume that throughout the paper we shall consider k-valued functions, only. For a given variable x and α∈ Z ; x is defined as follows: 1 if x ¼ α x ¼ 0 if x≠ α: The ring-sum expansion (RSE) of a function f is the sum modulo k of a constant and products α 2 of variables x or x , (for α; α∈ Z )of f. For example, 1⊕ x x is a RSE of the function f in i k 1 i 2 2 the algebra P , with f ð1; 2Þ¼ 2; f ð2; 2Þ¼ 0 and f ¼ 1, otherwise. Any k instances of the ACI same product in the RSE can be eliminated since they sum to 0. Throughout the present 17,1 paper, we shall use RSE-representation of functions. Let f ∈ P and let varðfÞ¼ fx ; ... ; x g be the set of all variables, which occur in f.We 1 n say that the i-th variable x ∈ varðf Þis essential in f,or f essentially depends on x , if there exist i i values a ; ... ; a ; b∈ Z , such that 1 n f ða ; ... ; a ; a ; a ; ... ; a Þ≠ f ða ; ... ; a ; b; a ; ... ; a Þ: 110 1 i−1 i iþ1 n 1 i−1 iþ1 n The set of all essential variables in the function f is denoted Essðf Þ and essðfÞ¼jEssðf Þj. The variables from varðf Þ which are not essential in f ∈ P are called inessential or fictive. Let x be an essential variable in f and let c be a constant from Z . The function i k g ¼ f ðx ¼ cÞ obtained from f ∈ P by assigning the constant c to the variable x is called a i i simple subfunction of f (sometimes termed a cofactor or a restriction). When g is a simple subfunction of f we write f ≻ g. The transitive closure of ≻ is denoted c. SubðfÞ¼ fg j fc gg is the set of all subfunctions of f and subðfÞ¼jSubðf Þj. Let fc g; c ¼ ðc ; ... ; c Þ∈ Z and let M ¼fx ; ... ; x g⊂ X with f ¼ g ≻ g ≻ 1 m 1 m m m−1 ... ≻ g ≻ g, g ¼ g ðx ¼ c Þ,and g ¼ g ðx ¼ c Þ for i ¼ 1; ... ; m− 1. Then we write 1 1 1 1 i iþ1 iþ1 iþ1 fc g or equivalently, g ¼ f ðx ¼ c ; ... ; x ¼ c Þ. For brevity, sometimes we shall also use 1 1 m m the notation fc g or fc g. We say that each subfunction g of f is a reduction to f via the subfunction relationship. Definition 2.1. A non-empty set M of essential variables in the function f is called separable in f if there exists a subfunction g, fc g such that M ¼ EssðgÞ. Sepðf Þ denotes the set of all the separable sets in f and sepðfÞ¼jSepðf Þj. The theory of separable sets (TSS) has been developed in the work of many mathematicians since the middle of the last century – K. Chimev [2], A. Salomaa [11], J. Denev, I. Gyudzhenov [7], Sl. Shtrakov [3] etc. TSS is important to avoid any redundancies when computing discrete functions and other structures as graphs [2], terms [14], etc. Let x and x be two distinct essential variables in f. The function h is obtained from i j f ∈ P by identifying (collapsing) the variables x and x ,if i j hða ; ... ; a ; a ; a ; ... ; a Þ¼ f ða ; ... ; a ; a ; a ; ... ; a Þ; 1 i−1 i iþ1 n 1 i−1 j iþ1 n for all ða ; ... ; a Þ∈ Z . 1 n Briefly, when h is obtained from f, by identifying the variable x with x , we write h ¼ f i j i←j and h is called a simple identification minor of f. Clearly, essðf Þ < essðf Þ, because i←j x ∉ Essðf Þ, but it has to be essential in f. When h is a simple identification minor of f we i i←j write f≻h. The transitive closure of ≻ is denoted c. MnrðfÞ¼ fh j fc hg is the set of all distinct minors of f and mnrðfÞ¼jMnrðf Þj. Let h; fc h be an identification minor of f. The natural number r ¼ essðf Þ− essðhÞ; rP1 is called the order of the minor h of f. We say that each minor h of f is a reduction to f via the minor relationship. Let Mnr ðf Þ denote the set Mnr ðfÞ¼ fg j g ∈ Mnrðf Þ & essðgÞ¼ mg and let m m mnr ðfÞ¼ jMnr ðf Þj, for all m; m < n. m m Let f ∈ P be an n-ary k-valued function. The essential arity gap (shortly arity gap or gap) of f is defined as follows gapðfÞ¼ essðfÞ max essðhÞ: h∈Mnrðf Þ Let 2#p#m. We let G denote the set of all k-valued functions which essentially depend p;k on m variables whose arity gap is equal to p, i.e. m n Complexity of G ¼ f ∈ P j essðfÞ¼ m & gapðfÞ¼ p : p;k k discrete We say that the arity gap of f is non-trivial if gapðf ÞP2. It is natural to expect that the functions functions with “huge” gap, have to be more simple for realization by MVL-circuits and functional schemas when computing by identifying variables. An upper bound of gapðf Þ for Boolean functions is found in K. Chimev [2] and A. Salomaa [11], showing that gapðf Þ # 2. In [18] R. Willard also proved that if a function f : A → B depends on n variables and k < n, where k ¼jAjthen gapðf Þ # 2. It is clear that gapðf Þ # n. Thus in all cases gapðf Þ # minðn; kÞ. A complete description of Boolean functions with non-trivial arity gap is presented in [13]. In [16] these results are extended including the functions of k-valued logic, k P 2. In [17], a special class of functions - namely the class of symmetric k-valued functions with non-trivial arity gap, is investigated. Definition 2.2. Two functions g and h are called equivalent (non-distinct as mappings) (written g ≡ h)if g can be obtained from h by permutation of variables, introduction or deletion of inessential variables. As mentioned earlier, there are two general ways for reduction of functions - by subfunctions or by minors. The complexities of these processes we call the subfunction or minor complexities, respectively. An obvious difference between these concepts is the following: Each identification minor can be decomposed into subfunctions, but there are subfunctions which can not be decomposed into minors. For example, we have k−1 f ¼ ⊕ x :f ðx ¼ m; x ¼ mÞ i←j i j m¼0 for all f ; f ∈ P , where f ≻ f ðx ¼ m; x ¼ mÞ and f ≻ f . i j i←j Let f ¼ x ⊕ x ⊕ x be a Boolean function. It is easy to see that the subfunction 1 2 3 f ðx ¼ 1Þ¼ x ⊕ x ⊕ 1 can not be decomposed into any minors of f. 1 2 3 Roughly spoken, the complexity of functions, is a mapping (evaluation) Val : P →Nwith ValðxÞ¼ c for all x∈ X and for some natural number c∈N, called the initial value of the complexity, and Valðf Þ P c for all f ∈ P . The concept of complexity of functions is based on the “difficulties” when computing several resulting objects as subfunctions, implementations, separable sets, values, superpositions, minors, etc. As mentioned, the computational complexities subðf Þ; impðf Þ and sepðf Þ are used in [15] to classify the functions from the algebra P . These complexities are invariants under the action of the suitable transformation groups. Many computations, constructions, processes, translations, mappings and so on, can be modeled as stepwise transformations of objects known as reduction systems. Abstract Reduction Systems (ARS) play an important role in various areas such as abstract data type specification, functional programming, automated deductions, etc. [9] The concepts and properties of ARS also apply to other rewrite systems such as string rewrite systems (Thue systems), tree rewrite systems, graph grammars, etc. For more detailed facts about ARS we n n refer to J.W. Klop and Roel de Vrijer [9]. An ARS in P is a structure W ¼hP ; f→ g ; i, i∈I k k where f→ g is a family of binary relations on P , called reductions or rewrite relations. For a i∈I reduction → the transitive and reflexive closure is denoted↠ . A function g ∈ P is a normal i i form if there is no h∈ P such that g→ h. In all different branches of rewriting two basic concepts occur, known as termination (guaranteeing the existence of normal forms) and confluence (securing the uniqueness of normal forms). n A reduction → has the unique normal form property (UN) if whenever t; r ∈ P are ACI normal forms obtained by applying the reductions → on a function f ∈ P then t and r are 17,1 equivalent (non-distinct as mappings). The computations on functions proposed in the present paper can be regarded as an ARS, namely: W ¼hP ; f≻; ≻gi. Next, we show that ≻ completes the reduction process with unique normal form, whereas ≻ has not unique normal form property. A reduction → is terminating (or strongly normalizing SN) if every reduction sequence f → f → f ...eventually must terminate. A reduction → is weakly confluent (or has weakly 1 2 Church-Rosser property WCR) if f → r and f → v imply that there is w∈ P such that r ↠ w and v↠w. Theorem 2.3. (i) The reduction ≻ is UN; (ii) The reduction ≻ is SN, but it is not WCR. Proof. (i) (SN) If f ≻ g then essðf Þ > essðgÞ. Since the number of essential variables essðf Þ of the functions f in any reduction sequence f ≻ f ≻ ... ≻ f ≻ ... strongly decrease, it i 1 i follows that the sequence eventually must terminate, i.e. the reduction is terminating. (WCR) Let f be a function and f ≻ g, and f ≻ h. Let t and r be normal forms such that g c t and h c r. Note that each normal form is a resulting minor obtained by collapsing all the essential variables in f. Hence, essðtÞ # 1 and essðrÞ # 1. Then we have t ¼ f ðx ; ... ; x Þ, j j for some x ∈ Essðf Þ and r ¼ f ðx ; ... ; x Þ, for some x ∈ Essðf Þ, and hence, j i i i t ¼ f ðx ; ... ; x Þ≡ f ðx ; ... ; x Þ ¼ r: j j i i Now, (i) follows from Newman’s Lemma (Theorem 1.2.1. [9]), which states that WCR & SN0 UN. (ii) Clearly, each value of a function f with essðf Þ > 0 is an its subfunction normal form and each subfunction of f which is not a constant is not a normal form. Hence ≻ is SN. Every non- constant functions have at least two values (normal forms), which shows that ≻ is not WCR and UN. , Thus, for each function f ðx ; ... ; x Þ that depends on all its variables, the function 1 n f ðx; ... ; xÞ is the identification minor normal form of f. An essential variable x in a function f ∈ P is called a strongly essential variable in f if there is a constant c such that Essðf ðx ¼ c ÞÞ ¼ Essðf Þnfx g. The set of all strongly essential i i i i variables in f is denoted SEssðf Þ. The following lemma is independently proved by K. Chimev [2] and A. Salomaa [11]in different variations. Lemma 2.4. [2] Let f be a function. If essðf Þ > 1 then f has at least two strongly essential variables, i.e. essðf Þ > 10jSEssðf Þj > 1. We are going to prove several results in TSS which will be used later to show relationship between arity gap and separable sets. Lemma 2.5. Let N ∈ Sepðf Þ. If there exist m constants c ; ... ; c ∈ Z such that 1 m k N ∩ Essðg Þ¼ Ø where g ¼ f ðx ¼ c Þ for 1#i#m then M ∪ N ∈ Sepðf Þ for all M ≠Ø; i i i i M ⊆ fx ; ... ; x g. 1 m Proof. It suffices to look only at the set M ¼ fx ; ... ; x g. First, assume that M ∩ N ¼ Ø 1 m and without loss of generality let us assume N ¼ fx ; ... ; x g; m < s#n.Since mþ1 s n−s N ∈ Sepðf Þ, there exists a vector of constants, say d ¼ðd ; ... ; d Þ∈ Z such that sþ1 n N ⊆ EssðgÞ, where Complexity of g ¼ f ðx ¼ d ; ... ; x ¼ d Þ: sþ1 sþ1 n n discrete Let us fix an arbitrary variable from N, say the variable x ∈ N. Then there exist s− m− 1 functions constants d ; ... ; d ∈ Z such that x ∈ EssðhÞ where mþ1 s−1 k s h ¼ gðx ¼ d ; ... ; x ¼ d Þ: mþ1 mþ1 s−1 s−1 We have to prove that M ⊆ EssðhÞ. Let us suppose the opposite, i.e. there is a variable, say x ∈ M which is inessential in h. Since x ∈ fx ; ... ; x g, there is a value c ∈ Z such that 1 1 1 m 1 k N ∩ EssðtÞ¼ Ø where t ¼ f ðx ¼ c Þ. Our supposition shows that h ¼ hðx ¼ c Þ and 1 1 1 1 hence, N ∩ EssðhÞ¼ Ø, i.e. x ∉ EssðhÞ, which is a contradiction. Consequently, M ¼ EssðhÞ. Then g c h implies M ⊆ EssðgÞ and hence, M ∪ N ¼ EssðgÞ which establishes that M ∪ N ∈ Sepðf Þ. Second, let M ∩ N ≠Ø. Then we can pick P ¼ MnN and hence, P ⊆ fx ; ... ; x g; 1 m P ∩ N ¼ Ø, and N ∈ Sepðf Þ. As shown, above P ∪ N ∈ Sepðf Þ and M ∪ N ∈ Sepðf Þ,as desired. , Corollary 2.6. Let x and x be two distinct essential variables in f. If there is a constant c; c∈ Z i j k such that f ðx ¼ cÞ does not essentially depend on x then fx ; x g∈ Sepðf Þ. i j i j Definition 2.7. Let M be an inseparable set in f. A subset M of M is called a maximal separable subset of M in f,if M is separable in f and for each M , M ⊂ M ⊆ M it is 1 2 1 2 held M ∉ Sepðf Þ. The set of all maximal separable subsets of M in a function f is denoted by MaxðM; f Þ. Definition 2.8. Let M ; M ∈ MaxðM; f Þ be a maximal separble subset of the inseparable 1 1 set M in f. The essential variable x in f is called an essential conjugate of the set M in f if for i 1 each subfunction g; f ≻ m g, where M ¼ MnM we have M ∈ SepðgÞ and x ∈ EssðgÞ. 2 2 1 1 i 0 1 0 1 2 Example 2.9. Let f be the following function f ¼ x x ⊕ x x x ðmod 3Þ.Itiseasyto 1 2 2 3 4 see that M ¼ fx ; x ; x g∉ Sepðf Þ and MaxðM; fÞ¼ ffx g; fx ; x gg. Clearly, x is an 1 3 4 1 3 4 2 essential conjugate of both fx g and fx ; x g in f. 1 3 4 The next theorem was proven by K. Chimev, and it is an important step to achieve a series of results concerning identification minors of functions [2,3]. Theorem 2.10. [2] Let f ∈ P ; Ø≠ M ∉ Sepðf Þ; M ∈ MaxðM; f Þ and M ¼ MnM . Then 1 2 1 for each subfunction g; fc M g of f, there exists a variable x ; x ∈ Essðf ÞnM such that 2 i i x ∈ EssðgÞ and M ∈ SepðgÞ. i 1 Note that Theorem 2.10 does not provide the existence of at least one essential conjugate of any maximal separable subset of M. We are going to strengthen Theorem 2.10 in this direction. First, we shall prove the following lemma. Lemma 2.11. Let M be a non-empty inseparable set of essential variables in f ; L ¼ Essðf ÞnM and let M ∈ MaxðM; f Þ. Then there exists a subfunction g; fc g such that M : ⊆ EssðgÞ. 1 L 1 Proof. Without loss of generality let us assume that M ¼fx ; ... ; x g; M ¼fx ; ... ; x g and L 1 1 m 1 mþp ¼ fx ; ... ; x g: mþpþ1 n n−m−p Indeed, suppose this were not the case. Then M ⊆ EssðgÞ for each c; c∈ Z . Since the n−m−p variable x is essential in f, there is a vector of constants b ¼ðb ; ... ; b Þ∈ Z , mþ1 mþpþ1 n such that x ∈ EssðtÞ, where mþ1 t ¼ f ðx ¼ b ; ... ; x ¼ b Þ: mþpþ1 mþpþ1 n n p−1 Let a ¼ ða ; .. . ; a Þ∈ Z be a vector of constants from Z such that x ∈ EssðvÞ, mþ2 mþp k mþ1 ACI where 17,1 v ¼ tðx ¼ a ; ... ; x ¼ a Þ: mþ2 mþ2 mþp mþp Theorem 2.10 implies M ⊆ EssðvÞ. Clearly, EssðvÞ ⊆ M ∪ fx g. Hence EssðvÞ¼ M ∪ 1 1 mþ1 1 x ; EssðvÞ ⊆ Essðf Þ and M ⊆ EssðvÞ ⊆ M with M ≠ EssðvÞ≠ M which contradicts f g mþ1 1 1 M ∈ MaxðM; f Þ. Consequently, there is a vector c∈ Z of constants from Z such that 1 k M : ⊆ EssðgÞ where fc g. , The next theorem is a slight improvement of Theorem 2.10. Theorem 2.12. Let f ∈ P ;Ø≠ M ∉ Sepðf Þ and let M ∈ MaxðM; f Þ. Then there exists at least one essential conjugate of M in f. Proof. Without loss of generality let us assume EssðfÞ¼ fx ; ... ; x g; M ¼ fx ; ... ; x g and M ¼ fx ; ... ; x g: 1 n 1 1 m 1 mþp n−p According to Lemma 2.11 there exists a vector c ¼ðc ; ... ; c Þ∈ Z such that mþpþ1 n M : ⊆ EssðgÞ, where g ¼ f ðx ¼ c ; ... ; x ¼ c Þ: 1 mþpþ1 mþpþ1 n n n−p Since M is separable in f there exists a vector b ¼ðb ; ... ; b Þ∈ Z such that 1 mþpþ1 n M ∈ SepðhÞ, where h ¼ f ðx ¼ b ; ... ; x ¼ b Þ: 1 mþpþ1 mþpþ1 n n Let s; 1 # s # n− m− p be the minimal natural number for which M ∈ SeptðtÞ, where t ¼ f ðx ¼ c ; ... ; x ¼ c Þ mþpþ1 mþpþ1 mþpþs−1 mþpþs−1 and M ∉ EssðuÞ, where u ¼ tðx ¼ c Þ: The number s must exist because 1 mþpþs mþpþs M : ⊆ EssðgÞ and M ∈ SepðhÞ. 1 1 First, let s < n− m− p.Then M ∈ SepðtÞ implies that there exist constants d ; ... ; d ∈ Z , such that M ∈ Sepðt Þ and M : ⊆ Essðt Þ where mþpþs n k 1 1 1 2 t ¼ tðx ¼ d ; ... ; x ¼ d Þ 1 mþpþs mþpþs n n and t ¼ uðx ¼ d ; ... ; x ¼ d Þ: 2 mþpþsþ1 mþpþsþ1 n n Pick v ¼ tðx ¼ d ; ... ; x ¼ d Þ: mþpþsþ1 mþpþsþ1 n n Clearly, M ∈ SepðvÞ and x ∈ EssðvÞ.If ðMnM Þ ∩ EssðvÞ¼ Ø then we are clearly done. 1 mþpþs 1 Next, suppose with no loss of generality that L ¼ fx ; ... ; x ; x ; ... ; x g ⊆ EssðvÞ 1 m mþ1 mþr with 1 # r # p. Then L must be inseparable in v and M ∈ MaxðL; vÞ. Now, Theorem 2.10 shows that x is an essential conjugate of M in v and f. mþpþs 1 Second, let as assume s ¼ n− m− p.Then wecan pick z ¼ f ðx ¼ c ; mþpþ1 mþpþ1 ... ; x ¼ c Þ with M ∈ SepðzÞ and M : ⊆ Essðzðx ¼ c ÞÞ. The rest of the proof that n−1 n−1 1 1 n n x is an essential conjugate of M in z and f is left to the reader. , n 1 The improvement of Theorem 2.10 consists in the fact that we might choose the variable x before the choice of the subfunction g; fc M g. A natural question to ask is there an “universal” essential conjugate x ∈ Essðf ÞnM for all maximal separable subsets of M, i.e. is it possible to choose the variable in Theorem 2.12 before the choice of the set M ∈ MaxðM; f Þ? The next example shows that the answer is negative. 0 0 0 Example 2.13. Let k ¼ 2 and f ¼ x x x ⊕ x x x ⊕ x x x . Clearly M ¼ fx ; x ; x g 1 4 2 6 3 5 1 2 3 5 4 6 ∉ Sepðf Þ and MaxðM; fÞ¼ ffx g; fx g; fx gg: Also, it is easy to verify that x ∉ Essðf ðx 1 2 3 6 2 ¼ 0; x ¼ 0ÞÞ; x ∉ Essðf ðx ¼ 0; x ¼ 0ÞÞand x ∉ Essðf ðx ¼ 0; x ¼ 0ÞÞ: The essential 3 5 1 3 4 1 2 conjugates of the maximal separable subsets are: fx ; x g of fx g; fx ; x g of fx g, and 4 5 1 4 6 2 Complexity of fx ; x g of fx g. 5 6 3 discrete Let us turn our attention to the following: functions 1. Each simple minor obtained by collapsing pairs of variables belonging to distinct maximal separable subsets of M depends on possible maximal number of essential variables. Thus we have essðf Þ¼ essðf Þ¼ essðf Þ¼ 5. For instance, 2←1 3←1 3←2 0 0 0 f ¼ x x x ⊕ x x x ⊕ x x x . 2←1 1 4 1 6 3 5 5 4 6 2. The simple minors obtained by pairs of essential conjugates essentially depend on 0 0 four variables, for instance, f ¼ x x x ⊕ x x x . 5←4 2 6 3 5 4 6 Next, we turn our attention to relationship between essential arity gap and separable sets in functions. Theorem 2.14. Let f ∈ p .If gapðf ÞP2 then each non-empty set of essential variables is separable in f. Proof. Let M be an arbitrary non-empty set of essential variables in f. We prove that M ∈ sepðf Þ by considering cases. The theorem is given to be true if n # 2. Next we assume n > 2. Case 1: gapðfÞ¼ 2; n P 3 and k ¼ 2. β β α 0 1 1 0 α 0 0 If n ¼ 3 then Theorem 3.2 [13] implies that f ¼ x ðx x ⊕ x x Þ⊕ x x or f ¼ x ðx x 3 1 2 1 2 1 2 3 1 2 :ðαÞ 1 1 0 1 1 0 ⊕ x x Þ⊕ x ðx x ⊕ x x Þ, where α; β ∈ f0; 1g. Clearly, each set of essential variables in f 1 2 3 1 2 1 2 is separable. 0 1 If n ¼ 4 then according to Theorem 3.3 [13] we have f ¼ x :gðx ; x ; x Þ⊕ x :hðx ; 1 2 3 1 4 4 :ðαÞ :ðαÞ α 0 0 1 1 0 1 1 0 0 0 1 1 α 0 x ; x Þ, with g ¼ x ðx x ⊕ x x Þ⊕ x ðx x ⊕ x x Þ, and h ¼ x ðx x ⊕ x x Þ⊕ x ðx 2 3 3 1 2 1 2 3 1 2 1 2 3 1 2 1 2 3 1 1 1 0 x ⊕ x x Þ, for some α; α∈ f0; 1g (here :ðαÞ means negation of α). Clearly, each set of 2 1 essential variables in f is separable. Let nP5 From Theorem 3.4 in [13] it follows that α α 1 α 1 α n n f ¼ ⊕ x  x or f ¼ ⊕ x  x : 1 n 1 n α ⊕ ⊕ αn¼1 α ⊕ ⊕ αn¼0 1 1 Thus we have EssðfÞ¼ X . Suppose, with no loss of generality that M ¼ fx ;  ; x g; n 1 m m < n and 1 α f ¼ ⊕ x  x : 1 n α ⊕  ⊕ α ¼1 1 n Let c ;  ; c ∈ Z and c ⊕  ⊕ c ¼ 1. We can pick g ¼ f ðx ¼ c ;  ; x ¼ c Þ and 1 n k 1 n mþ1 mþ1 n n r ¼ c ⊕  ⊕ c . Assume without loss of generality that r ¼ 1. Then we have mþ1 n α α 1 m g ¼ ⊕ x  x : 1 m α ⊕ ⊕ α ¼1 1 n It must be shown that M ¼ EssðgÞ. By symmetry, it is enough to show that x ∈ EssðgÞ. Let c ;  ; c ∈ Z with c ⊕  ⊕ c ¼ 0. Then we have 2 m 2 m gð0; c ;  ; c Þ¼ 1 and gð1; c ;  ; c Þ¼ 0; 2 m 2 m which proves that x ∈ EssðgÞ. Case 2: gapðfÞ¼ 2; 2 < k < n. Theorem 2.1 [18] implies that f is a symetric function which essentially depends on all of its n variables. Theorem 4.1 [17] states that: If f is a symmetric function with non-trivial arity gap, then each set of essential variables in f is separable, which completes the proof of this case. Case 3: gapðfÞ¼ 2; n ¼ 3 and kP3. ACI 17,1 Lemma 5.1 [16] states that if f ∈ G then essðf Þ¼ 1 for all i; j∈ f1; 2; 3g; i ≠ j, which i←j 2;k shows that each subset of X is separable in f. Case 4: gapðfÞ¼ 2; 4#n#k. If f is a symmetric function then we are done because of Theorem 4.1 [17]and if f is not a symmetric function then according to Theorem 4.2 [16] there exist n− 2 variables y ; ; y ∈ X such that f ¼ h⊕ g,where EssðhÞ¼ fy ;  ; y g and g ∈ G .Moreover l n l l n− 2 1 n− 2 n;k g ¼ 0for all 1#i; j#n with i ≠ j. Now, the proof can be done as in Case 6:,for p ¼ 2, i←j given below. Case 5: gapðfÞ¼ n; 3#n#k. From Theorem 3.1 [16] it follows that f is presented in the following form: α β f ¼ a ⊕ x ⊕ ⊕ a x (1) 0 r n n α∈Eq β∈Dis k k where s s Eq ¼ fγ ∈ Z ∃i; j; 1#i < j#s; γ ¼ γ g, k k i j γ γ γ γ s s s 1 2 s γ ¼ γ  γ ; x ¼ x x  x and Dis ¼ Z nEq , for s; sP2. Moreover, there exist at least 1 s 1 2 k k k two distinct numbers among a ∈ Z for r ¼ 0; 1;  ; k − 1. r k It is easy to see that EssðfÞ¼ X .Wehavetoshow that M ∈ Sepðf Þ. Without loss of generality let us assume that M ¼fx ;  ; x g; 1#m#n.If m ¼ n or m ¼ 1 we are clearly 1 m n−i done. Let 1 < m < nand let r ¼ β k be a natural number such that a ≠ 0. Then we have i¼1 δ σ g ¼ f ðx ¼ β ;  ; x ¼ β Þ¼ a ⊕ x ⊕ ⊕ a x ; mþ1 n 0 j mþ1 n δ∈Eq σ∈Dis n−i where j ¼ σ k with σ ¼ β for i ¼ m þ 1;  ; n, and there are at least two distinct i i i¼1 i numbers among a . Clearly, g essentially depends on all of its variables, i.e. EssðgÞ¼ M and hence M ∈ Sepðf Þ. Case 6 gapðfÞ¼ p; 2 # p < n, and 4#n < k. According to Theorem 3.4 [16], there exist functions h and g, such that f ¼ h⊕ g, where g ∈ G and essðhÞ¼ n− p. Without loss of generality, let us assume that EssðhÞ¼ fx ;  ; n;k x g. Moreover, g ¼ 0 for all i and j; 1 # j < i# n. n−p i←j Clearly, EssðfÞ¼ X and according to Theorem 3.1 [16] and the Eq. (1), given in Case 5, the function g can be represented as follows g ¼ u⊕ v, where β α u ¼ ⊕ a x and v ¼ a ⊕ x : (2) r 0 n n β∈Dis α∈Eq k k Let x ; x ∈ X ; i > j, be two arbitrary essential variables in g. Say i ¼ n and j ¼ n− 1, for i j n simplicity. Then we have u ¼ 0 and v ¼ a ⊕ xb ¼ a : (3) i←j i←j 0 0 n−2 δ∈z Since g ¼ 0 for all i and j,1 # j < i#n we have v ¼ a ¼ 0 and hence v ¼ 0, and g ¼ u. i←j i←j 0 Let M be a set of essential variables in f. Note that M ∈ sepðgÞ, according to Case 5 and if M ∩ EssðhÞ¼ Ø then M ∈ sepðf Þ: We have to prove that M is separable in f in each other case. We argue by induction on n-the number of essential variables in f and g. Let n 5 4. This is our basis of induction. First, let jMj¼ 2 and P ¼ 2. Clearly, if M ⊆ EssðhÞ then (2) and (3) show that M ∈ Sepðf Þ. Complexity of Next, let us assume that M ¼ fx ; x g and EssðhÞ¼ fx ; x g. Let c ; c ∈ Z be two 1 3 1 2 2 4 discrete constants, such that Essðt Þ ¼fx ; x g, where t ¼ gðx ¼ c ; x ¼ c Þ. Clearly, x ∈ Essðf Þ, 1 1 3 1 2 2 4 4 3 1 functions where f ¼ f ðx ¼ c ; x ¼ c Þ. Let h ¼ hðx ¼ c Þ.If x ∉ Essðh Þ then x ∈ Essðf Þ and 1 2 2 4 4 1 2 2 1 1 1 1 obviously, M ∈ sepðf Þ.If x ∈ Essðh Þ then f ¼ h ðx Þ⊕ t ðx ; x Þ. According to (2) and (3) 1 1 1 1 1 1 1 3 there is a constant c ¼ Z , such that Essðt ðx ¼ c ÞÞ ¼ Ø. Hence x ∈ Essðf ðx ¼ c ÞÞ and 3 k 1 3 3 1 1 3 3 M ∈ sepðf Þ; again. Second, let jMj¼ 3 and P ¼ 2, and EssðhÞ¼ fx ; x g: 1 2 Let x ∉ M. Then there is a constant c ∈ Z such that x ∈ Essðh Þ, where h ¼ hðx ¼ c Þ. 1 1 k 2 2 2 1 1 Thus, (2) implies that fx ; x ; x g ¼ Essðf Þ, where f ¼ f ðx ¼ c Þ and M ∈ sepðf Þ, again. 2 3 4 2 2 2 1 Let x ∉ M. Then there is a constant d ∈ Z such that x ∈ Essðt Þ, where t ¼ gðx ¼ d Þ. 4 4 k 3 2 2 4 4 Clearly, x ∈ Essðf Þ; where f ¼ f ðx ¼ d Þ. According to (2) and (3),wehave 3 3 3 4 4 f ¼ðx ¼ d Þ¼ hðx ; x Þ⊕ a ; which shows that fx ; x ; x g¼ Essðf Þ and hence 3 3 4 1 2 0 1 2 3 3 M ∈ sepðf Þ: One can argue similarly if P ¼ 3 and n ¼ 4: Let us assume that for some natural number l; l P 4, if n < l; 2 # p; l < k and f ∈ G ; p;k then each set of essential variables in f is separable. Let us pick n ¼ l. According to Lemma 2.4 there is a strongly essential variable x , 1 # i # l in g, and let c ∈ Z be a constant such that X nfx g ¼ Essðgðx ¼ c ÞÞ. Without loss i k l i i i of generality, let us assume that i ¼ l and c ¼ k− 1. Using (2), it is easy to verify that t ¼ gðx ¼ k  1Þ ¼ ⊕ b x ~ ; (4) 3 l r l−1 β∈Dis k−1 β β β 1 l−1 where the coefficients b linearly depend on a ; ... ; a l and x ¼ x ... x : r 0 k −1 1 l−1 By p P 2 it follows that we may reorder the variables in h such that EssðhÞ¼ fx ; ... x g with l − p < l − 1: 1 l−p Then we can pick f ¼ f ðx ¼ k− 1Þ¼ h⊕ t . It must be shown that Essðf Þ¼ X . Since 4 3 4 l l−1 p P 2 it follows that N ¼ Essðf ÞnEssðhÞ≠Ø. Next, using (2) one can show that N ∈ Sepðt Þ 4 3 and N ∈ Sepðf Þ. According to (3) we have N ∩ Essðf ðx ¼ k  1ÞÞ  Ø; 4 i for all i ¼ 1; ... ; l − p. Now, Lemma 2.5 implies N ∪ fx ; ... ; x g∈ Sepðf Þ: Hence 1 l−p 4 l−1 Essðf Þ ¼ x : According to (4) it follows that f ∈ G : 4 l−1 4 p;k−1 Therefore the inductive assumption may be applied to f , yielding M ∈ Sepðf Þ, and 4 4 hence M ∈ sepðf Þ: , 3. Decision diagrams of functions 3.1 Ordered decision diagrams Intuitively, it seems that a function f has the maximal complexity under the subfunction reduction if all its sets of essential variables are separable, because the variables from separable sets remain essential after assigning constants to other variables (see [15]). For example, when assigning Boolean constants to some variables of a Boolean function, then a natural complexity measure is the size of its Binary Decision Diagrams (BDDs), which also depend on the variable ordering (see [1]). Each path from the root (function node) to a terminal node (leaf) of BDD is called an implementation of f. The subfunction complexities impðf Þ; subðf Þ and sepðf Þ of all implementations, subfunctions, and separable sets, obtained under all n! variable orderings of n-ary Boolean functions for n; n#5, are studied and calculated in [15]. 0 0 Example 3.1. Let f ¼ x x ⊕ x x ⊕ x x ⊕ x x ðmod 2Þ and g ¼ x ⊕ x ⊕ x ⊕ x 1 3 2 3 2 4 1 2 3 4 4 1 ðmod 2Þ be two Boolean functions. Figure 1 presents their BDDs under the natural ACI 17,1 Figure 1. Binary Desicion Diagrams. variable ordering x ; x ; x ; x . All sets of essential variables in g are separable, whereas the 1 2 3 4 sets ðx ; x Þ and ðx ; x Þ are inseparable in f. Clearly, f has non-trivial essential arity gap 1 2 3 4 and f ∈ G : Note that the implementations (longest paths) in Figure 1 A) consist of three 2;2 edges, but in Figure 1 B) of four edges, which shows that the BDD of the function g is extremely complex with respect to the number of its subfunctions and separable sets, whereas the BDD of f is simpler. 3.2 Minor decision diagrams Next we introduce a new graph-based presentation of the k-valued functions, namely by the minor decision diagrams. The minor decomposition tree (MDT) of a function, consists of the node, labelled f – called the function node and nodes labelled with minor names, called the internal (non- terminal) nodes, and the rectangular nodes (leaves of the tree) called the terminal nodes. The terminal nodes are labelled with the same name of a function (atomic minor) from P (according to Theorem 2.3). The terminal and non-terminal nodes in the MDT for a function f, essentially depending on n variables, are disposed into maximum n− 1 layers of the tree. The i-th layer consists of names of all the distinct minors of order i,for i ¼ 1; ... ; n− 1. 0 0 Figure 2 presents the MDT of the function f ¼ x x ⊕ x x ⊕ x x ⊕ x x , given in 1 3 2 3 2 4 4 1 Example 3.1. We introduce the minor decision diagrams (MDDs) for k-valued functions constructed by reducing their minor decomposition trees (MDTs). Let f be a k-valued function. The minor decision diagram (MDD) of f is obtained from the corresponding MDT by reductions of its nodes and edges applying of the following rules, starting from the MDT and continuing until neither rule can be applied: Reduction rules If two edges have equivalent (as mappings) labels of their nodes they are merged. If two nodes have equivalent labels, they are merged. Example 3.2. Let us build the MDDs of the functions from Example 3.1,namely 0 0 f ¼ x x ⊕ x x ⊕ x x ⊕ x x ðmod 2Þ and g ¼ x ⊕ x ⊕ x ⊕ x ðmod 2Þusing the reduction 1 3 2 3 2 4 1 2 3 4 4 1 rules and their MDT’s. Figure 3 A) shows the MDD of the function f, and Figure 3 B) presents the MDD of g. The identification minors of f and g are: Complexity of f ¼ f ¼ x ⊕ x ; 2←1 4←3 1 3 f ¼ x x ⊕ x x ⊕ x x ; 3←1 1 1 2 2 4 discrete f ≡ f ≡ ½f  ≡ ½f 2←1 4←3 3← 1 4← 2 f ≡ f ≡ f 4←2 2←1 3←1 4←1 3←2 functions 0 0 0 f ¼ x x ⊕ x x ⊕ x x : 4←2 1 3 2 2 1 3 g ≡ g ¼ x ⊕ x ; i←j 2←1 3 4 for 1≤ j < i ≤ 4 and; ½g  ¼ 0: 2← 1 4←3 Each edge e ¼ðv ; v Þ in the diagram is supplied with a label lðv ; v Þ, (written as bold in 1 2 1 2 Figure 3A), which presents the number of the merged edges of the MDT, connecting the nodes v and v in MDT. 1 2 If two nodes in MDT are connected with unique edge then this edge is presented in MDD without label, for brevity. For example, such pairs are ðf ; f Þ; ðf ; f Þ and ðf ; 0Þ. 4←2 3←1 2←1 2←1 The label of the edge ðf ; f Þ is 3 because there are three identification minors, namely 3←1 f ; f and f of f which are equivalent to f (see Figure 2). 3←1 4←1 3←2 3←1 In a similar way we count the labels of the edges in Figure 3 B). Figure 2. 0 0 MDT of f ¼ x x ⊕ x 4 1 x ⊕ x x ⊕ x x 3 2 3 2 4 ðmod 2Þ. ACI 17,1 Figure 3. Minor decision diagrams. So, the MDD of f is an acyclic directed graph, with unique function node and according to Theorem 2.3, with unique terminal node. Clearly, the MDD and MDT are uniquely determined by the function f. 3.3 Complexity and equivalence relations with respect to minor reduction Many of the problems in the applications of the k-valued logic are compounded because of the large number of the functions, namely k . Techniques which involve enumeration of functions can only be used if k and n are trivially small. A common way for extending the scope of such enumerative methods is to classify the functions into equivalence classes by some natural equivalence relation. Let S denote the symmetric group of all permutations of the non-empty set A, and let S A m denote the group S for a natural number m; mP1. f1:;...;mg n n A transformation ψ : P → P is an n-tuple of k-valued functions ψ ¼ðg ; ... ; g Þ; g ∈ 1 n 1 k k n n P ; i ¼ 1; ... ; n; acting on a function f ¼ f ðx ... x Þ∈ P as follows ψðfÞ¼ f ðg ; ... ; g Þ. 1 n 1 n k k Then the composition of two transformations ψ and f ¼ðh ... h Þ is defined as follows 1 n ψf ¼ðh ðg ... g Þ; ... ; h ðg ... g ÞÞ: 1 1 n n 1 n n n The set of all transformations of P is the universal monoid Ω with unity - the identical transformation e ¼ðx ... x Þ. When taking only invertible transformations we obtain the 1 n universal group C which is isomorphic to the symmetric group S . The groups consisting of invertible transformations of P are called transformation groups (sometimes termed permutation groups). n n n n Let ’; ’ ⊆ P 3 P be an equivalence relation on the algebra P . Since P is a finite k k k k algebra of k-valued functions, the equivalence relation ’ makes a partition of the algebra in a finite number equivalence classes. n n n A mapping w : P → P is called a transformation preserving ’ if f ’ wðf Þ for all f ∈ P . k k k Taking only invertible transformations which preserve ’, we get the group G of all transformations preserving ’. The orbits (also called G -types) of this group are denoted by P ; ... ; Pr. Our aim is to classify functions from P into equivalence classes by ’. Thus we have to calculate the number r of G -types, to count the number of functions in different equivalence classes, i.e. compute the cardinalities of the sets P ; ... ; Pr and to create a list of functions belonging to different G -types. ’ n Let f ∈ P and let nof ðf Þ denote the normal form obtained by applying the reduction ≻ on Complexity of f. According to Theorem 2.3, the normal form nof ðf Þ is unique and nof ðf Þ∈ P . Thus, our discrete first natural equivalence is defined as follows: functions Definition 3.3. Let f and g be two functions from P . We say that f and g are nof-equivalent (written f ’ g)if nof ðfÞ¼ nof ðgÞ. nof The transformation group induced by nof-equivalence is denoted NF .The n n n 121 transformations in NF preserve ’ , i.e. nof ðgÞ¼ nof ðψðgÞÞ for all g ∈ P and ψ ∈ NF . nof k k k Since the atomic minors (labels of terminal nodes in MDD) depend on at most one essential n 1 k variable, it follows that the number of the orbits of NF is equal to P ¼ k . These k k transformations involve permuting variables, only (see Theorem 3.9, below). By analogy with the ordered decision diagrams [1,15], we define several equivalence relations in P , which allow us to classify the functions by the complexity of their MDDs. The “scalability” of the diagram is an important measure of the computational complexity of the function. We are going to formalize this problem and establish a method for classification of functions by the minor complexities. First, the number mnrðf Þ of all the minors of a function f is a complexity measure, which can be used to evaluate the MDD of f. Namely, it counts the size (number of terminal and non- terminal nodes) of the MDD. M. Couceiro, E. Lehtonen and T. Waldhauser have studied similar evaluation, named “parametrized arity gap” in [5,6], which characterizes the sequential identification minors of a function. Second, we are going to classify functions in finite algebras under the complexity measures which count the number of minors and the number of ways to obtain these minors. Definition 3.4. Let f ∈ P be a k-valued function. Its cmr-complexity cmrðf Þ is defined as follows: (i)cmrðfÞ¼ 1if essðf Þ#1; (ii)cmrðfÞ¼ 2if essðfÞ¼ 2; (iii)cmrðfÞ¼ cmrðf Þ if essðf ÞP3: i←j j<i; x ;x ∈Essðf Þ i j The minors f with i < j are excluded because f ≡ f . The minor complexity cmr can be i←j i←j j←i inductively calculated using the MDDs of the functions as it is shown in Example 3.5, given below. We start to assign cmr-complexity equals to 1 for the terminal node, which is labeled by the minor of “0” of highest order according to (i) of Definition 3.4. Next, we inductively calculate the cmr-complexity of the minors of f with lower order, applying (ii) and (iii) of Definition 3.4. Example 3.5. Let us count the cmr-complexity of the function f from Example 3.1 , using the identification minors of f obtained in Example 3.2 and MDD of f, given in Figure 3 A). There is two simple minors ðf and f Þ of order 2 and four simple minors of order 1. Thus 2←1 4←3 we have cmrðf Þ¼ cmrðf Þ¼ 2; cmrðf Þ¼ cmrðf Þ¼ cmrðf Þ¼ 1 * 2 þ 2 * 1 2←1 4←3 3←1 4←1 3←2 ¼ 4 and cmrðf Þ¼ 3 * 2 ¼ 6. According to Definition 3.4 we have cmrðfÞ¼ 2 * 2 þ 1 * 6 4←2 þ 3 * 4 ¼ 22. In a similar way from the MDD of g in Figure 3 B) we obtain cmrðgÞ¼ 6 * 2 ¼ 12. Definition 3.6. Let f and g be two functions with essðfÞ¼ n; nP0. We say that f and g are cmr-equivalent (written f ’ g) iff: cmr (i) n#10essðfÞ¼ essðgÞ; (ii) nP20 there exists a bijection σ : Essðf Þ→ EssðgÞ, such that f ’ g , where i←j cmr r←s x ¼ σðx Þand x ¼ σðx Þ, for all j; i, with x ; x ∈ Essðf Þ; j < i. r i s j i j n n Let CM denote the transformation group preserving the equivalence ’ , i.e. ψ ∈ CM if cmr ACI k k and only if ψðfÞ¼ g0f ’ g. cmr 17,1 The nof-equivalence is independent on the cmr-complexity of functions, defined by 0 0 reduction via minors. For example, the functions f ¼ 0 and g ¼ x x ⊕ x x x ðmod 2Þ are 2 1 2 1 3 nof-equivalent, but they are not cmr-equivalent. Next we define another equivalence based on the number of minors (size of MDD) in a function. Definition 3.7. Let f and g be two functions from P . We say that f and g are mnr-equivalent (written f ’ g)if mnr ðfÞ¼ mnr ðgÞ for all m; 0#m#essðf Þ− 1. mnr m m Clearly, if essðf Þ#1 then MnrðfÞ¼ Ø. Hence, if essðfÞ¼ essðgÞ#1 then f ’ g. MN mnr denotes the transformation group which preserves the equivalence ’ . mnr Note that f ’ g or f ’ g do not imply essðfÞ¼ essðgÞ, which can be seen by the mnr nof 0 1 0 1 2 following functions: f ¼ x x ðmod 3Þ and g ¼ x x x ðmod 3Þ. Clearly, f ’ g and f ’ g, mnr nof 1 2 1 2 3 but essðfÞ¼ 2, and essðgÞ¼ 3. Theorem 3.8. (i)f ’ g 0 cmrðfÞ¼ cmrðgÞ; cmr (ii) f ’ g 0 f ’ g. cmr mnr Proof. We argue by induction on the number n ¼ essðf Þ. If essðf Þ#2 (basis for induction) then we are clearly done. Assume that (i) and (ii) are satisfied when n < s for some natural number s; s > 2. Let n ¼ s and f ’ g. Then our cmr inductive assumption implies X X cmrðfÞ¼ cmr f ¼ cmrðg Þ¼ cmrðgÞ; i←j u←v j<i u<v and mnr ðf Þ¼ mnr ðg Þ, where u ¼ πðiÞ and v ¼ πðjÞ for some π ∈ S and m ¼ 0; m i←j m u←v n ... ; n− 1. , Thus, the complexity cmrðf Þ is an invariant of the group CM , and the complexity mnrðf Þ is an invariant of the group MN . It is naturally to ask which groups among “traditional” transformation groups are n n n n n subgroups of the groups NF or CM and which of these groups include NF ; MN or CM k k k k k as their subgroups. n n n Let σ : Z → Z be a mapping and let ψ : P → P be a transformation of P generated by k k σ k k k σ as follows ψ ðf ÞðaÞ¼ σðf ðaÞÞ for all a∈ Z . σ k Theorem 3.9. The transformation ψ preserves ’ if and only if σ is a permutation cmr of Z ; k > 2. Proof. Let σ : Z → Z . k k First, let σ be a permutation of Z .Let f ∈ P be an arbitrary function. If essðf Þ#1then essðψ ðf ÞÞ ¼ essðf Þ and we are clearly done. Let essðfÞ¼ essðgÞ¼ nP2and let i and j be two arbitrary natural numbers with 1#j < i#n.Then wehave ½ψ ðf Þ ðx ; ... ; x Þ¼ σ f ðx ; .. . ; x ÞÞ: 1 n i←j 1 n σ i←j Since σ is a permutation, it follows that f ’ ½ψ ðf Þ which shows that f ’ ψ ðf Þ. i←j cmr σ cmr σ i←j Second, let σ be not a permutation of Z . Hence, there exist two constants a and a from Z k 1 2 k such that a ≠ a and σða Þ¼ σða Þ. Let b ¼ðb ; ... ; b Þ∈ Z ; nP2 be a vector of 1 2 1 2 1 n constants from Z . Then we define the following function from P : a if x ¼ b for i ¼ 1; ... ; n 1 i i f ðx ; ... ; x Þ¼ 1 n a otherwise: 2 Clearly, EssðfÞ¼ X and the range of f consists of two numbers a and a . Then n 1 2 Complexity of σðfa ; a gÞ ¼ fσða Þg, implies that ψ ðf Þðc ; ... ; c Þ¼ σða Þ for all ðc ; ... ; c Þ∈ Z . 1 2 1 1 n 1 1 n discrete Hence, Essðψ ðf ÞÞ ¼ Ø which shows that f :’ ψ ðf Þ and ψ ∉ CM . , cmr σ σ σ k functions We deal with “natural” equivalence relations which involve variables of functions. Such relations induce permutations of the domain Z of the functions. These mappings form a transformation group whose number of equivalence classes can be determined. The restricted affine group (RAG) is defined as a subgroup of the symmetric group on the direct n 123 sum of the module Z of arguments of functions and the ring Z of their outputs. The group RAG permutes the direct sum Z þ Z under restrictions which preserve single-valuedness of all functions from P [8,10]. In the model of RAG an affine transformation ψ operates on the domain or space of inputs x ¼ðx ; .. . ; x Þ to produce the output y ¼ xA⊕ c, which might be used as an 1 n input in the function f.Its output f ðyÞ together with the function variables x ; ... ; x are 1 n linearly combined by a range transformation which defines the image g ¼ ψðf Þ of f as follows: gðxÞ¼ ψðf ÞðxÞ¼ f ðyÞ⊕ a x ⊕ .. . ⊕ a x ⊕ d ¼ 1 1 n n (5) tx f ðxA⊕ cÞ⊕ a ⊕ d; n n where d and a for i ¼ 1; .. . ; n are constants from Z ; c∈ Z ,and a ¼ ða ; ... ; a Þ∈ Z . i k 1 n k k Such a transformation belongs to RAG if A is a non-singular matrix. We want to extract basic facts for several subgroups of RAG which are “neighbourhoods” n n n or “relatives” of our transformation groups NF ; CM and MN . k k k First, a classification occurs when permuting arguments of functions. If π ∈ S then π acts on variables by: πðx ;   ; x Þ¼ðx ;  ; x Þ. Each permutation generates a map on the 1 n πð1Þ πðnÞ domain Z . For example, the permutation π ¼ð1; 2; 3Þ generates a permutation of the domain f0; 1; 2g of the functions from P . Then we have π : 001→ 010→ 100 and in cyclic decimal notation this permutation can be written as ð1; 3; 9Þ. The remaining elements of Z are mapped according to the following cycles of π in decimal notation - ð2; 6; 18Þð4; 12; 10Þ ð5; 15; 19Þð7; 21; 11Þð8; 24; 20Þð14; 16; 22Þð17; 25; 23Þ. Note that each permutation from S n 3 keeps fixed all k constant tuples from Z . In case of Z , these tuples ð0; 0; 0Þ; ð1; 1; 1Þ and k 3 ð2; 2; 2Þ are presented by the decimal numbers 0; 13 and 26. S denotes the transformation group induced by permuting of variables. Boolean functions of two variables are classified into twelve S -classes [8], as it is shown in Table 1.M. Harrison has determined the cycle index of the group S . Using Polya’s counting theorem he has counted the number of equivalence classes under permuting arguments (see [8] and Table 3, below). The subgroups of RAG, defined according to (5) which are “relatives” to the groups n n n n NF ; CM and MN are determined as follows: RAG when A-non-singular; CF when k k k k n n n A ¼ I; a ¼ 0; c ¼ 0; LF when A ¼ I; c ¼ 0; d ¼ 0; CA when A ¼ I; a ¼ 0; d ¼ 0; LG k k k c ¼ 0; a ¼ 0; d ¼ 0; S when A ¼ P; c ¼ 0; a ¼ 0; d ¼ 0, where P denotes a permutation matrix, I is the identity matrix, bandc are n-dimensional vectors from Z and d ∈ Z . n n n It is naturally to ask which subgroups of RAG are subgroups of NF ; CM and MN . k k k n n n n n Theorem 3.8 shows that CF and S are subgroups of MN . Clearly, S #NF . k k k k k Theorem 3.10. n n n n n n (i) CF ≤ CM ; (ii) S ≤ CM ; (iii) S ≤ NF ; k k k k k k n n n n (iv) NF :≤ RAG; (v) CM :≤ RAG; (vi) LG :≤ MN ; k k k k n n n n n n (vii) CA :≤ MN ; (viii) CA :≤ NF ; (ix) LG :≤ NF ; k k k k k k n n n n (x) CM :≤ NF ; (xi) NF :≤ MN : k k k k n n Proof. (i) Follows from Theorem 3.9.(ii) and (iii) – Let π ∈ S and let : P → P be a ACI π k k transformation of P defined as follows f ðf Þða ;  ; a Þ ¼ f ða ;  ; a Þ for all π 1 n πð1Þ πðnÞ 17,1 ða ;  ; a Þ∈ Z . We have to prove that the transformation f preserves the equivalence 1 n relations ’ ; ’ and ’ for all π ∈ S . It suffices to show that f preserves ’ and cmr mnr n cmr nof π ’ . Let f ∈ P be a function and let us assume EssðfÞ¼ X ; nP2. It must be shown that nof n f ’ g and f ’ g, where gða ;  ; a Þ¼ f ðπða Þ;  ; πða ÞÞ for all ða ;  ; a Þ∈ Z . cmr nof 1 n 1 n 1 n Since π is a permutation, we have −1 −1 f ða ;  ; a Þ¼ g π ða Þ;  ; π ða ÞÞ; 1 n 1 n for all ða ;  ; a Þ∈ Z which shows that f ’ g and hence, f ’ f ðf Þ. Since nof ðfÞ¼ 1 n cmr cmr k π f ðx ;  ; x Þand nof ðfÞ¼ f ðx ;  ; x Þ, it follows nof ðgÞ≡ nof ðgÞand f ’ g.(iv) and (v) i j πðiÞ πðiÞ nof – Let f ¼ x ⊕ x ⊕ x ðmod 3Þ and g ¼ x x ⊕ x x ⊕ x x ðmod 3Þ.Thenwehave 1 2 3 1 2 1 3 2 3 f ¼ 2x ⊕ x ðmod 3Þ and g ¼ 2x x ⊕ x x ðmod 3Þ where fi; j; mg ¼ f1; 2; 3g. Clearly, i←j j m i←j j m j j f ¼ g ¼ 0, and hence f ’ g and f ’ g. One can show that there is no i←j i←j cmr nof j← m j← m transformation ψ ∈ RAG,defined as in (5),for which g ¼ ψðf Þ. Consequently, n n n CM : # RAG; NF :# RAG and MN : # RAG.(vi), (vii), (viii), (ix) and (xi) – Let k k k 0 1 0 1 2 1 1 0 1 1 4 f ¼ x x ⊕ x x x ðmod 3Þ and g ¼ x x ⊕ x x x ðmod 3Þ be the functions from P . Let 1 2 2 3 4 0 2 2 3 4 3 0 1 B C B C A ¼ @ A Then clearly, f ðxÞ¼ gðAxÞ and hence, f and g belong to the same equivalence class under the transformation group LG . Let c ¼ð0; 0; 0; 1Þ. Then we have f ðxÞ¼ gðx:I⊕ cÞ, which shows that f and g belong to the same equivalence class under the transformation group CA . One can show that f ’ g. Example 3.5 shows that f :’ g. Consequently, nof mnr n n n n n n n n NF : # MN ; LG : # MN and CA : # MN . Theorem 3.8 shows that NF :#CM ; k k k k k k k k n n n n 0 0 LG : # CM and CA : # CM .ðxÞ - Let us pick f ¼ x x ðmod 2Þ and g ¼ x x ðmod 2Þ. 1 2 k k k k 1 2 Clearly, f ’ g, but nof ðfÞ¼ x :≡ x ¼ nof ðgÞ. , cmr 1 So, Theorem 3.10 summarizes results which determine the positions of the groups n n n NF ; CM and MN , with respect to the subgroups of RAG. It is well-illustrated by Figure 4, k k k in the case of Boolean functions. 4. Classification of Boolean functions by minor complexities Table 2 shows the four classes in P under the equivalence ’ . The ’ -classes are cmr cmr represented as union of several classes under the permuting arguments, according to Theorem 3.10 (ii), which can be observed in Table 1 and Table 2, given below. The number of types under permuting arguments, is an upper bound of the number of equivalence classes induced by the relations ’ ; ’ and ’ (see Figure 4). nof cmr mnr Table 1. The twelve classes in 0 0 0 0 [0], ½x x ; ½x x ; ½x x x x ; 1; 2 2 1 2 2; 1 1 2 P under the 0 0 2 0 0 ½x ⊕ x ; ½x ⊕ x ; ½x ⊕ x x ; 1 2 1 ½x ⊕ x x x ⊕ x x ; 1 2 1 2; 1 2 2 1 2 1 permutating of 0 0 0 0 ½x ⊕ x x ; ½x x ; [1]. ½x ; x ; variables. 1 1 2 1 2 1 2 Complexity of discrete functions Figure 4. Transformation groups in P . n n In Table 3 the columns named SB and SP are calculated in [15] and they present 2 2 the number of classes under the complexities, determined by the number of subfunctions and separable sets in the functions. It is surprising that for n#3these n n columns are same as the columns CM and MN , i.e. the number of classes are the 2 2 same, but these classes are very different as sets of functions, determined by these complexities. Figure 4 presents the subgroups of RAG and transformation groups whose invariants are subfunction, and minor complexities of Boolean functions of n-variables. According to n n Theorem 3.10 the group CM has three subgroups from RAG, namely: S - the group of 2 2 permuting arguments, trivial group consisting of the identity map, and CF - the group of Table 2. The four classes in 0 0 0 0 0 [0, 1] ½x x ; x x ; x ⊕ x ; x ⊕ x ; x ⊕ x x ; x ⊕ x x ; P under the 2 1 1 2 1 1 2 1 2 1 2 2 1 2 0 0 0 0 0 0 0 ½x ; x x ; x ; ½x x ; x ⊕ x x ; x ⊕ x x ; x x : 1 2; 1 2 1 2 1 cmr-complexity. 1 2 1 1 2 1 2 n n n n n NS CM MN SB SP 2 2 2 2 2 14 2 2 2 2 Table 3. 212 4 3 4 3 Number of equivalence 3 80 11 5 11 5 classes in P under 4 3984 ** 74 11 5 37 333 248 ** * 38 transformation groups. n n complementing outputs. The groups NF and MN are not subgroups of any subgroup ACI 2 2 of RAG. 17,1 Next, we turn our attention on classifying the functions with respect to their cmr- complexity. This classification is based on the exhaustive Algorithm 1, given below. Table 4 presents a complete classification of the Boolean functions of tree variables by the minor complexities cmr and mnr. If we agree to regard each 2 -tuple as a binary number then the last column presents the vectors of values of all ternary Boolean functions in their table representation with the natural numbers from the set f0;   ; 127g. According to Theorem 3.9, if a natural number z; 0#z#255, presents a function f which belongs to a cmr- class then the function f presented by 255− z belongs to the same class. Thus the catalogue contents the numbers#127, only (see the last column in Table 4). These numbers represent the functions which preserve zero, i.e. the functions f for which f ð0; 0; 0Þ¼ 0. This classification shows that there are eleven equivalence classes under ’ and five classes cmr under ’ . mnr Theorem 3.8 shows that each mnr-class is a disjoint union of several cmr-classes. Thus the first mnr-class consists of all the functions which belong to the first and the second cmr-class (see fifth column in Table 4). The second mnr-class is equal to the third cmr-class. The fourth and the fifth mnr-classes are unions of three cmr-class, namely: sixth, seventh, and eight, and ninth, tenth, and eleventh, respectively. The main data structure which describes the nodes in the MDD of f is represented by a record declared as follows: The first field, named ess presents the number of essential variables in the minor (located on the corresponding node) and the second field val is a natural number whose k-ary representation is the last column B of the truth table (of size k 3ðn þ 1Þ)of the minor. Table 4 presents classification of ternary Boolean functions under the equivalences ’ cmr and ’ , including the catalogue of the equivalence classes (last column). Let us choose a mnr natural number belonging to the seventh column of Table 4, say 24. It belongs to the row 4 3 numbered 6. The binary representation of 24 is 00011000, because 24 ¼ 1*2 þ 1*2 . Hence, the function f corresponding to 24 is evaluated by 1 on the fourth and fifth miniterms, 0 0 0 0 0 0 namely x x x and x x x . Consequently, f ¼ x x x ⊕ x x x ðmod 2Þ.Thenwehave 2 3 1 2 3 1 1 2 3 1 2 3 0 0 f ¼ f ¼ 0and f ¼ x x ⊕ x x ðmod 2Þ. Clearly, cmrðfÞ¼ 4, which is written in 2←1 3←1 3←2 2 1 1 2 the third cell of the sixth row. The MDD of f is shown in the second cell. The cmr- equivalence class containing f consists of 18 functions, according to the fourth cell of the sixth row and the mnr-equivalence class of f contains 108 functions (see whole fifth column of the table). The function x x x ðmod 2Þ is representative for this class (sixth cell). The 1 2 numerical list of the functions from this equivalence class is given in the last seventh cell of Table 4. The record of the function f is presented as follows f.ess53 and f.val524, Complexity of where k =2 and B5 00011000. discrete functions 127 ACI 17,1 Table 4. Minor classification of ternary Boolean functions. 5. Conclusion Complexity of The transformation groups whose invariants are the minor complexities have only three discrete n n subgroups among the groups in RAG, namely trivial group (identity map), S and CF , k k functions whereas the groups whose invariants are the subfunction complexities have three subgroups more (see [15]). One of motivations to study the group NF is that the reductions are inexpensive and the number of classes is much smaller than the number of classes under the subgroups of RAG, because the order of NF is so large. As mentioned, n k n 129 the number of equivalence classes under NF equals to k . Hence, the order of NF is equal k k n n− 1 k k k to k =k ¼ k . The most complex functions with respect to separable sets [15] are grouped in the largest equivalence class. J. Denev and I. Gyudzhenov in [7] proved that for almost all the k-valued functions all the sets of essential variables are separable. Similar results can not be proved for the minor complexities. For example, in P the most complex functions belong to the class numbered as 11 (see Table 4), which consists of 16 functions. This class is not so large. It presents 1/16 of the all 256 ternary Boolean functions. References [1] R.E. Bryant, Graph-based algorithms for boolean function manipulation, IEEE Trans. Comput. C- 35 (8) (1986) 677–691. [2] K. Chimev, Separable sets of arguments of functions, MTA SzTAKI Tanulmanyok 80 (1986) 1–173. [3] K. Chimev, S. Shtrakov, I. Giudjenov, M. Aslanski, Separable and dominating sets of variables for the functions, in: Math. and Educ. in Math., vol. 16, Union of Bulgarian Mathematicians, BAS, 1987, pp. 61–71. [4] B. Choi, Advancing from two to four valued logic circuits, in: Proc. IEEE Intern. Conf. on Industrial Technology, IEEE, 2013. [5] M. Couceiro, E. Lehtonen, T. Waldhauser, GAP vs. PAG, Multiple-Valued Logic 42 (2012) 268–273. [6] M. Couceiro, E. Lehtonen, T. Waldhauser, Parametrized arity gap, Order 30 (2013) 557–572. [7] J. Denev, I. Gyudzhenov, On separable subsets of arguments of functions from p ,MTA SzTAKI Tanulmanyok 26 (147) (1984) 47–50. [8] M. Harrison, Counting theorems and their applications to classification of switching functions, in: A. Mikhopadhyay (Ed.), Recent Developments in Switching Theory, Academic Press, NY, 1971, pp. 85–120. [9] J. Klop, R. de Vrijer, Term rewriting systems, Cambridge University Press, 2003. [10] R.J. Lechner, Harmonic analysis of switching functions, in: A. Mikhopadhyay (Ed.), Recent Developments in Switching Theory, Academic Press, NY, 1971, pp. 121–228. [11] A. Salomaa, On essential variables of functions, especially in the algebra of logic, Annales Academia Scientiarum Fennicae Ser. A 333 (1963) 1–11. [12] S. Shtrakov, On some transformation groups in k-valued logic, General Algebra Appl. 20 (1993) 225–237. [13] S. Shtrakov, Essential arity gap of boolean functions, Serdica J. Comput. 2 (3) (2008) 249–266. [14] S. Shtrakov, Essential variables and positions in terms, Algebra Universalis 61 (3–4) (2009) 381–397. [15] S. Shtrakov, I. Damyanov, On the computational complexity of finite operations, Int. J. Found. Comput. Sci. 27 (01) (2016) 15–38. [16] S. Shtrakov, J. Koppitz, On finite functions with non-trivial arity gap, J. Discuss. Math. General ACI Algebra Appl. 30 (2010) 217–245. 17,1 [17] S. Shtrakov, J. Koppitz, Finite symmetric functions with non-trivial arity gap, Serdica J. Comput. 6 (4) (2012) 419–436. [18] R. Willard, Essential arities of term operations in finite algebras, Discrete Math. 149 (1996) 239–259. Corresponding author Slavcho Shtrakov can be contacted at: Shtrakovshtrakov@gmail.com For instructions on how to order reprints of this article, please visit our website: www.emeraldgrouppublishing.com/licensing/reprints.htm Or contact us for further details: permissions@emeraldinsight.com http://www.deepdyve.com/assets/images/DeepDyve-Logo-lg.png Applied Computing and Informatics Emerald Publishing

Minor complexity of discrete functions

Applied Computing and Informatics , Volume 17 (1): 23 – Jan 4, 2021

Loading next page...
 
/lp/emerald-publishing/minor-complexity-of-discrete-functions-pUHynRy4qV
Publisher
Emerald Publishing
Copyright
© Slavcho Shtrakov
ISSN
2634-1964
DOI
10.1016/j.aci.2018.07.003
Publisher site
See Article on Publisher Site

Abstract

Received 4 June 2018 In this paper we study a class of complexity measures, induced by a new data structure for representing Revised 16 July 2018 k-valued functions (operations), called minor decision diagram. When assigning values to some variables in a Accepted 17 July 2018 function the resulting functions are called subfunctions, and when identifying some variables the resulting functions are called minors. The sets of essential variables in subfunctions of f are called separable in f. Weexaminethemaximalseparablesubsetsofvariablesandtheirconjugates,introducedinthe paper,proving thateachsuchsethasatleastoneconjugate.Theessentialaritygapgapðf Þofthefunctionf istheminimalnumber of essential variables in f which become fictive when identifying distinct essential variables in f. We also investigate separable sets of variables in functions with non-trivial arity gap. This allows us to solve several important algebraic, computational and combinatorial problems about the finite-valued functions. Keywords Separable set, Subfunction, Identification minor, Minor decision diagram, Minor complexity Paper type Original Article 1. Introduction The complexity of finite operations is still one of the fundamental tasks in the theory of computation and besides classical methods like substitution or degree arguments a bunch of combinatorial, and algebraic techniques have been introduced to tackle this extremely difficult problem. A logic gate is a physical device that realizes a Boolean function. A logic circuit is a direct acyclic graph in which all vertices except input vertices carry the labels of gates. When realizing n-variable k-valued functions the circuit is called the ðk; nÞ-circuit or Multi-Valued Logic circuit (MVL-circuit). To move from logical circuits to MVL-circuits, researchers attempt to adapt CMOS (complementary metal oxide semiconductor), I L (integrated injection logic) and ECL (emitter- coupled logic) technologies to implement the many-valued and fuzzy logics gates. The MVL- circuits offer more potential opportunities for the improvement of present VLSI circuit © Slavcho Shtrakov. Published in Applied Computing and Informatics. Published by Emerald Publishing Limited. This article is published under the Creative Commons Attribution (CC BY 4.0) license. Anyone may reproduce, distribute, translate and create derivative works of this article (for both commercial and non-commercial purposes), subject to full attribution to the original publication and authors. The full terms of this license may be seen at http://creativecommons.org/licences/by/4.0/legalcode Declarations of interest: None. An idea for a mesure of the minor complexity of functions was presented by M. Couceiro, E. Lehtonen and T. Waldhauser in [5,6], named parametrized arity gap. However, these results, the present paper and [16] are suitable basis for future investigation of the problems for minor complexities and reconstruction of functions from their MDDs. Publishers note: The publisher wishes to inform readers that the article “Minor complexity of discrete functions” was originally published by the previous publisher of Applied Computing and Informatics and Applied Computing and the pagination of this article has been subsequently changed. There has been no change to the content of Informatics the article. This change was necessary for the journal to transition from the previous publisher to the new pp. 108-130 one. The publisher sincerely apologises for any inconvenience caused. To access and cite this article, Emerald Publishing Limited e-ISSN: 2210-8327 please use Shtrakov, S. (2020), “Minor complexity of discrete functions”, Applied Computing and p-ISSN: 2634-1964 DOI 10.1016/j.aci.2018.07.003 Informatics. Vol. 17 No. 1, pp. 108-130. The original publication date for this paper was 24/07/2018. designs. For instance, MVL-circuits are well-applied in memory technology as flash memory, Complexity of dynamic RAM, and in algebraic circuits [4]. discrete In this paper we investigate a method for reduction of finite valued functions, namely by functions their identification minors. This method is a basic model of computing with MVL-circuits corresponding to collapsing of some inputs in the circuits. We, also study the computational complexity of this method and classify the functions in finite algebras for small values of k and n under such complexity. Computationalcomplexityisexaminedinconcrete and abstract terms. The concrete analysis is based on models that capture the exchange of space for time. It is also performed via the knowledge about circuit complexity of functions. The abstract analysis is done via complexity classes, the classification of data structures, functions etc. by the time and/or space they need. There are two key methods for reduction (computing) of the k-valued functions which are realized by assigning constants or variables to their inputs. Then the resulting objects are: subfunctions or minors, respectively. These reductions are also naturally suited to complexity measures, which illustrate “difficulty” of computing as the number of subfunctions, separable sets, and minors of the functions. Another topic in complexity theory is to classify finite functions by their complexity such that the functions are grouped into equivalence classes with same evaluations of the corresponding complexities. Each equivalence relation in the algebra P of k-valued functions determines a transformation group whose orbits are the equivalence classes (see [8,10,12]. Using the lattice of Restricted Affine Groups (RAG) in [15] we have obtained upper bounds of different combinatorial parameters of several natural equivalences in P for small values of k and n. In the present paper we follow this line to study assigning (not necessarily unique) variable names to some of the input variables in a function f. This method of computing consists of equalizing the values of several inputs of f. Section 2 introduces the basic definitions and notation of separable sets, subfunctions, minors, arity gap, etc. An important result, namely if a function has non-trivial arity gap then all its sets of essential variables are separable, complements this section. Section 3 examines the ordered decision diagrams (ODD), minor decomposition trees (MDTs) and minor decision diagrams (MDDs) of k-valued functions. In Section 3.3 we treat the minor complexities of functions with their classifications by the transformation groups. Section 4 is an illustration of the results in the paper applied to the simplest case of Boolean functions. In the Appendix we provide a classification of all ternary Boolean functions with respect to the minor complexity. 2. Subfunctions and minors of functions A discrete function f is defined as a mapping: f : A→ Bwhere the domain A ¼ 3 A and the i¼1 range B are non-empty finite or countable sets. Let X ¼ fx ; x ; ...g be a countable set of 1 2 variables and let X ¼ fx ; x ; ... ; x g denote the set of the first n variables in X. Let k be a n 1 2 n natural number with k P 2. Let Z denote the set Z ¼ f0; 1; ... ; k− 1g. The operations k k addition “⊕ ” and product “.” modulo k constitute Z as a ring. An n-ary k-valued function n n (operation) on Z is a mapping f : Z → Z for some natural number n, called the arity of f. P k k k k ∞ n denotes the set of all n-ary k-valued functions and P ¼ ∪ P is called the algebra of n¼1 k n k-valued logic. It is well-known fact that there are k functions in P . For simplicity, let us assume that throughout the paper we shall consider k-valued functions, only. For a given variable x and α∈ Z ; x is defined as follows: 1 if x ¼ α x ¼ 0 if x≠ α: The ring-sum expansion (RSE) of a function f is the sum modulo k of a constant and products α 2 of variables x or x , (for α; α∈ Z )of f. For example, 1⊕ x x is a RSE of the function f in i k 1 i 2 2 the algebra P , with f ð1; 2Þ¼ 2; f ð2; 2Þ¼ 0 and f ¼ 1, otherwise. Any k instances of the ACI same product in the RSE can be eliminated since they sum to 0. Throughout the present 17,1 paper, we shall use RSE-representation of functions. Let f ∈ P and let varðfÞ¼ fx ; ... ; x g be the set of all variables, which occur in f.We 1 n say that the i-th variable x ∈ varðf Þis essential in f,or f essentially depends on x , if there exist i i values a ; ... ; a ; b∈ Z , such that 1 n f ða ; ... ; a ; a ; a ; ... ; a Þ≠ f ða ; ... ; a ; b; a ; ... ; a Þ: 110 1 i−1 i iþ1 n 1 i−1 iþ1 n The set of all essential variables in the function f is denoted Essðf Þ and essðfÞ¼jEssðf Þj. The variables from varðf Þ which are not essential in f ∈ P are called inessential or fictive. Let x be an essential variable in f and let c be a constant from Z . The function i k g ¼ f ðx ¼ cÞ obtained from f ∈ P by assigning the constant c to the variable x is called a i i simple subfunction of f (sometimes termed a cofactor or a restriction). When g is a simple subfunction of f we write f ≻ g. The transitive closure of ≻ is denoted c. SubðfÞ¼ fg j fc gg is the set of all subfunctions of f and subðfÞ¼jSubðf Þj. Let fc g; c ¼ ðc ; ... ; c Þ∈ Z and let M ¼fx ; ... ; x g⊂ X with f ¼ g ≻ g ≻ 1 m 1 m m m−1 ... ≻ g ≻ g, g ¼ g ðx ¼ c Þ,and g ¼ g ðx ¼ c Þ for i ¼ 1; ... ; m− 1. Then we write 1 1 1 1 i iþ1 iþ1 iþ1 fc g or equivalently, g ¼ f ðx ¼ c ; ... ; x ¼ c Þ. For brevity, sometimes we shall also use 1 1 m m the notation fc g or fc g. We say that each subfunction g of f is a reduction to f via the subfunction relationship. Definition 2.1. A non-empty set M of essential variables in the function f is called separable in f if there exists a subfunction g, fc g such that M ¼ EssðgÞ. Sepðf Þ denotes the set of all the separable sets in f and sepðfÞ¼jSepðf Þj. The theory of separable sets (TSS) has been developed in the work of many mathematicians since the middle of the last century – K. Chimev [2], A. Salomaa [11], J. Denev, I. Gyudzhenov [7], Sl. Shtrakov [3] etc. TSS is important to avoid any redundancies when computing discrete functions and other structures as graphs [2], terms [14], etc. Let x and x be two distinct essential variables in f. The function h is obtained from i j f ∈ P by identifying (collapsing) the variables x and x ,if i j hða ; ... ; a ; a ; a ; ... ; a Þ¼ f ða ; ... ; a ; a ; a ; ... ; a Þ; 1 i−1 i iþ1 n 1 i−1 j iþ1 n for all ða ; ... ; a Þ∈ Z . 1 n Briefly, when h is obtained from f, by identifying the variable x with x , we write h ¼ f i j i←j and h is called a simple identification minor of f. Clearly, essðf Þ < essðf Þ, because i←j x ∉ Essðf Þ, but it has to be essential in f. When h is a simple identification minor of f we i i←j write f≻h. The transitive closure of ≻ is denoted c. MnrðfÞ¼ fh j fc hg is the set of all distinct minors of f and mnrðfÞ¼jMnrðf Þj. Let h; fc h be an identification minor of f. The natural number r ¼ essðf Þ− essðhÞ; rP1 is called the order of the minor h of f. We say that each minor h of f is a reduction to f via the minor relationship. Let Mnr ðf Þ denote the set Mnr ðfÞ¼ fg j g ∈ Mnrðf Þ & essðgÞ¼ mg and let m m mnr ðfÞ¼ jMnr ðf Þj, for all m; m < n. m m Let f ∈ P be an n-ary k-valued function. The essential arity gap (shortly arity gap or gap) of f is defined as follows gapðfÞ¼ essðfÞ max essðhÞ: h∈Mnrðf Þ Let 2#p#m. We let G denote the set of all k-valued functions which essentially depend p;k on m variables whose arity gap is equal to p, i.e. m n Complexity of G ¼ f ∈ P j essðfÞ¼ m & gapðfÞ¼ p : p;k k discrete We say that the arity gap of f is non-trivial if gapðf ÞP2. It is natural to expect that the functions functions with “huge” gap, have to be more simple for realization by MVL-circuits and functional schemas when computing by identifying variables. An upper bound of gapðf Þ for Boolean functions is found in K. Chimev [2] and A. Salomaa [11], showing that gapðf Þ # 2. In [18] R. Willard also proved that if a function f : A → B depends on n variables and k < n, where k ¼jAjthen gapðf Þ # 2. It is clear that gapðf Þ # n. Thus in all cases gapðf Þ # minðn; kÞ. A complete description of Boolean functions with non-trivial arity gap is presented in [13]. In [16] these results are extended including the functions of k-valued logic, k P 2. In [17], a special class of functions - namely the class of symmetric k-valued functions with non-trivial arity gap, is investigated. Definition 2.2. Two functions g and h are called equivalent (non-distinct as mappings) (written g ≡ h)if g can be obtained from h by permutation of variables, introduction or deletion of inessential variables. As mentioned earlier, there are two general ways for reduction of functions - by subfunctions or by minors. The complexities of these processes we call the subfunction or minor complexities, respectively. An obvious difference between these concepts is the following: Each identification minor can be decomposed into subfunctions, but there are subfunctions which can not be decomposed into minors. For example, we have k−1 f ¼ ⊕ x :f ðx ¼ m; x ¼ mÞ i←j i j m¼0 for all f ; f ∈ P , where f ≻ f ðx ¼ m; x ¼ mÞ and f ≻ f . i j i←j Let f ¼ x ⊕ x ⊕ x be a Boolean function. It is easy to see that the subfunction 1 2 3 f ðx ¼ 1Þ¼ x ⊕ x ⊕ 1 can not be decomposed into any minors of f. 1 2 3 Roughly spoken, the complexity of functions, is a mapping (evaluation) Val : P →Nwith ValðxÞ¼ c for all x∈ X and for some natural number c∈N, called the initial value of the complexity, and Valðf Þ P c for all f ∈ P . The concept of complexity of functions is based on the “difficulties” when computing several resulting objects as subfunctions, implementations, separable sets, values, superpositions, minors, etc. As mentioned, the computational complexities subðf Þ; impðf Þ and sepðf Þ are used in [15] to classify the functions from the algebra P . These complexities are invariants under the action of the suitable transformation groups. Many computations, constructions, processes, translations, mappings and so on, can be modeled as stepwise transformations of objects known as reduction systems. Abstract Reduction Systems (ARS) play an important role in various areas such as abstract data type specification, functional programming, automated deductions, etc. [9] The concepts and properties of ARS also apply to other rewrite systems such as string rewrite systems (Thue systems), tree rewrite systems, graph grammars, etc. For more detailed facts about ARS we n n refer to J.W. Klop and Roel de Vrijer [9]. An ARS in P is a structure W ¼hP ; f→ g ; i, i∈I k k where f→ g is a family of binary relations on P , called reductions or rewrite relations. For a i∈I reduction → the transitive and reflexive closure is denoted↠ . A function g ∈ P is a normal i i form if there is no h∈ P such that g→ h. In all different branches of rewriting two basic concepts occur, known as termination (guaranteeing the existence of normal forms) and confluence (securing the uniqueness of normal forms). n A reduction → has the unique normal form property (UN) if whenever t; r ∈ P are ACI normal forms obtained by applying the reductions → on a function f ∈ P then t and r are 17,1 equivalent (non-distinct as mappings). The computations on functions proposed in the present paper can be regarded as an ARS, namely: W ¼hP ; f≻; ≻gi. Next, we show that ≻ completes the reduction process with unique normal form, whereas ≻ has not unique normal form property. A reduction → is terminating (or strongly normalizing SN) if every reduction sequence f → f → f ...eventually must terminate. A reduction → is weakly confluent (or has weakly 1 2 Church-Rosser property WCR) if f → r and f → v imply that there is w∈ P such that r ↠ w and v↠w. Theorem 2.3. (i) The reduction ≻ is UN; (ii) The reduction ≻ is SN, but it is not WCR. Proof. (i) (SN) If f ≻ g then essðf Þ > essðgÞ. Since the number of essential variables essðf Þ of the functions f in any reduction sequence f ≻ f ≻ ... ≻ f ≻ ... strongly decrease, it i 1 i follows that the sequence eventually must terminate, i.e. the reduction is terminating. (WCR) Let f be a function and f ≻ g, and f ≻ h. Let t and r be normal forms such that g c t and h c r. Note that each normal form is a resulting minor obtained by collapsing all the essential variables in f. Hence, essðtÞ # 1 and essðrÞ # 1. Then we have t ¼ f ðx ; ... ; x Þ, j j for some x ∈ Essðf Þ and r ¼ f ðx ; ... ; x Þ, for some x ∈ Essðf Þ, and hence, j i i i t ¼ f ðx ; ... ; x Þ≡ f ðx ; ... ; x Þ ¼ r: j j i i Now, (i) follows from Newman’s Lemma (Theorem 1.2.1. [9]), which states that WCR & SN0 UN. (ii) Clearly, each value of a function f with essðf Þ > 0 is an its subfunction normal form and each subfunction of f which is not a constant is not a normal form. Hence ≻ is SN. Every non- constant functions have at least two values (normal forms), which shows that ≻ is not WCR and UN. , Thus, for each function f ðx ; ... ; x Þ that depends on all its variables, the function 1 n f ðx; ... ; xÞ is the identification minor normal form of f. An essential variable x in a function f ∈ P is called a strongly essential variable in f if there is a constant c such that Essðf ðx ¼ c ÞÞ ¼ Essðf Þnfx g. The set of all strongly essential i i i i variables in f is denoted SEssðf Þ. The following lemma is independently proved by K. Chimev [2] and A. Salomaa [11]in different variations. Lemma 2.4. [2] Let f be a function. If essðf Þ > 1 then f has at least two strongly essential variables, i.e. essðf Þ > 10jSEssðf Þj > 1. We are going to prove several results in TSS which will be used later to show relationship between arity gap and separable sets. Lemma 2.5. Let N ∈ Sepðf Þ. If there exist m constants c ; ... ; c ∈ Z such that 1 m k N ∩ Essðg Þ¼ Ø where g ¼ f ðx ¼ c Þ for 1#i#m then M ∪ N ∈ Sepðf Þ for all M ≠Ø; i i i i M ⊆ fx ; ... ; x g. 1 m Proof. It suffices to look only at the set M ¼ fx ; ... ; x g. First, assume that M ∩ N ¼ Ø 1 m and without loss of generality let us assume N ¼ fx ; ... ; x g; m < s#n.Since mþ1 s n−s N ∈ Sepðf Þ, there exists a vector of constants, say d ¼ðd ; ... ; d Þ∈ Z such that sþ1 n N ⊆ EssðgÞ, where Complexity of g ¼ f ðx ¼ d ; ... ; x ¼ d Þ: sþ1 sþ1 n n discrete Let us fix an arbitrary variable from N, say the variable x ∈ N. Then there exist s− m− 1 functions constants d ; ... ; d ∈ Z such that x ∈ EssðhÞ where mþ1 s−1 k s h ¼ gðx ¼ d ; ... ; x ¼ d Þ: mþ1 mþ1 s−1 s−1 We have to prove that M ⊆ EssðhÞ. Let us suppose the opposite, i.e. there is a variable, say x ∈ M which is inessential in h. Since x ∈ fx ; ... ; x g, there is a value c ∈ Z such that 1 1 1 m 1 k N ∩ EssðtÞ¼ Ø where t ¼ f ðx ¼ c Þ. Our supposition shows that h ¼ hðx ¼ c Þ and 1 1 1 1 hence, N ∩ EssðhÞ¼ Ø, i.e. x ∉ EssðhÞ, which is a contradiction. Consequently, M ¼ EssðhÞ. Then g c h implies M ⊆ EssðgÞ and hence, M ∪ N ¼ EssðgÞ which establishes that M ∪ N ∈ Sepðf Þ. Second, let M ∩ N ≠Ø. Then we can pick P ¼ MnN and hence, P ⊆ fx ; ... ; x g; 1 m P ∩ N ¼ Ø, and N ∈ Sepðf Þ. As shown, above P ∪ N ∈ Sepðf Þ and M ∪ N ∈ Sepðf Þ,as desired. , Corollary 2.6. Let x and x be two distinct essential variables in f. If there is a constant c; c∈ Z i j k such that f ðx ¼ cÞ does not essentially depend on x then fx ; x g∈ Sepðf Þ. i j i j Definition 2.7. Let M be an inseparable set in f. A subset M of M is called a maximal separable subset of M in f,if M is separable in f and for each M , M ⊂ M ⊆ M it is 1 2 1 2 held M ∉ Sepðf Þ. The set of all maximal separable subsets of M in a function f is denoted by MaxðM; f Þ. Definition 2.8. Let M ; M ∈ MaxðM; f Þ be a maximal separble subset of the inseparable 1 1 set M in f. The essential variable x in f is called an essential conjugate of the set M in f if for i 1 each subfunction g; f ≻ m g, where M ¼ MnM we have M ∈ SepðgÞ and x ∈ EssðgÞ. 2 2 1 1 i 0 1 0 1 2 Example 2.9. Let f be the following function f ¼ x x ⊕ x x x ðmod 3Þ.Itiseasyto 1 2 2 3 4 see that M ¼ fx ; x ; x g∉ Sepðf Þ and MaxðM; fÞ¼ ffx g; fx ; x gg. Clearly, x is an 1 3 4 1 3 4 2 essential conjugate of both fx g and fx ; x g in f. 1 3 4 The next theorem was proven by K. Chimev, and it is an important step to achieve a series of results concerning identification minors of functions [2,3]. Theorem 2.10. [2] Let f ∈ P ; Ø≠ M ∉ Sepðf Þ; M ∈ MaxðM; f Þ and M ¼ MnM . Then 1 2 1 for each subfunction g; fc M g of f, there exists a variable x ; x ∈ Essðf ÞnM such that 2 i i x ∈ EssðgÞ and M ∈ SepðgÞ. i 1 Note that Theorem 2.10 does not provide the existence of at least one essential conjugate of any maximal separable subset of M. We are going to strengthen Theorem 2.10 in this direction. First, we shall prove the following lemma. Lemma 2.11. Let M be a non-empty inseparable set of essential variables in f ; L ¼ Essðf ÞnM and let M ∈ MaxðM; f Þ. Then there exists a subfunction g; fc g such that M : ⊆ EssðgÞ. 1 L 1 Proof. Without loss of generality let us assume that M ¼fx ; ... ; x g; M ¼fx ; ... ; x g and L 1 1 m 1 mþp ¼ fx ; ... ; x g: mþpþ1 n n−m−p Indeed, suppose this were not the case. Then M ⊆ EssðgÞ for each c; c∈ Z . Since the n−m−p variable x is essential in f, there is a vector of constants b ¼ðb ; ... ; b Þ∈ Z , mþ1 mþpþ1 n such that x ∈ EssðtÞ, where mþ1 t ¼ f ðx ¼ b ; ... ; x ¼ b Þ: mþpþ1 mþpþ1 n n p−1 Let a ¼ ða ; .. . ; a Þ∈ Z be a vector of constants from Z such that x ∈ EssðvÞ, mþ2 mþp k mþ1 ACI where 17,1 v ¼ tðx ¼ a ; ... ; x ¼ a Þ: mþ2 mþ2 mþp mþp Theorem 2.10 implies M ⊆ EssðvÞ. Clearly, EssðvÞ ⊆ M ∪ fx g. Hence EssðvÞ¼ M ∪ 1 1 mþ1 1 x ; EssðvÞ ⊆ Essðf Þ and M ⊆ EssðvÞ ⊆ M with M ≠ EssðvÞ≠ M which contradicts f g mþ1 1 1 M ∈ MaxðM; f Þ. Consequently, there is a vector c∈ Z of constants from Z such that 1 k M : ⊆ EssðgÞ where fc g. , The next theorem is a slight improvement of Theorem 2.10. Theorem 2.12. Let f ∈ P ;Ø≠ M ∉ Sepðf Þ and let M ∈ MaxðM; f Þ. Then there exists at least one essential conjugate of M in f. Proof. Without loss of generality let us assume EssðfÞ¼ fx ; ... ; x g; M ¼ fx ; ... ; x g and M ¼ fx ; ... ; x g: 1 n 1 1 m 1 mþp n−p According to Lemma 2.11 there exists a vector c ¼ðc ; ... ; c Þ∈ Z such that mþpþ1 n M : ⊆ EssðgÞ, where g ¼ f ðx ¼ c ; ... ; x ¼ c Þ: 1 mþpþ1 mþpþ1 n n n−p Since M is separable in f there exists a vector b ¼ðb ; ... ; b Þ∈ Z such that 1 mþpþ1 n M ∈ SepðhÞ, where h ¼ f ðx ¼ b ; ... ; x ¼ b Þ: 1 mþpþ1 mþpþ1 n n Let s; 1 # s # n− m− p be the minimal natural number for which M ∈ SeptðtÞ, where t ¼ f ðx ¼ c ; ... ; x ¼ c Þ mþpþ1 mþpþ1 mþpþs−1 mþpþs−1 and M ∉ EssðuÞ, where u ¼ tðx ¼ c Þ: The number s must exist because 1 mþpþs mþpþs M : ⊆ EssðgÞ and M ∈ SepðhÞ. 1 1 First, let s < n− m− p.Then M ∈ SepðtÞ implies that there exist constants d ; ... ; d ∈ Z , such that M ∈ Sepðt Þ and M : ⊆ Essðt Þ where mþpþs n k 1 1 1 2 t ¼ tðx ¼ d ; ... ; x ¼ d Þ 1 mþpþs mþpþs n n and t ¼ uðx ¼ d ; ... ; x ¼ d Þ: 2 mþpþsþ1 mþpþsþ1 n n Pick v ¼ tðx ¼ d ; ... ; x ¼ d Þ: mþpþsþ1 mþpþsþ1 n n Clearly, M ∈ SepðvÞ and x ∈ EssðvÞ.If ðMnM Þ ∩ EssðvÞ¼ Ø then we are clearly done. 1 mþpþs 1 Next, suppose with no loss of generality that L ¼ fx ; ... ; x ; x ; ... ; x g ⊆ EssðvÞ 1 m mþ1 mþr with 1 # r # p. Then L must be inseparable in v and M ∈ MaxðL; vÞ. Now, Theorem 2.10 shows that x is an essential conjugate of M in v and f. mþpþs 1 Second, let as assume s ¼ n− m− p.Then wecan pick z ¼ f ðx ¼ c ; mþpþ1 mþpþ1 ... ; x ¼ c Þ with M ∈ SepðzÞ and M : ⊆ Essðzðx ¼ c ÞÞ. The rest of the proof that n−1 n−1 1 1 n n x is an essential conjugate of M in z and f is left to the reader. , n 1 The improvement of Theorem 2.10 consists in the fact that we might choose the variable x before the choice of the subfunction g; fc M g. A natural question to ask is there an “universal” essential conjugate x ∈ Essðf ÞnM for all maximal separable subsets of M, i.e. is it possible to choose the variable in Theorem 2.12 before the choice of the set M ∈ MaxðM; f Þ? The next example shows that the answer is negative. 0 0 0 Example 2.13. Let k ¼ 2 and f ¼ x x x ⊕ x x x ⊕ x x x . Clearly M ¼ fx ; x ; x g 1 4 2 6 3 5 1 2 3 5 4 6 ∉ Sepðf Þ and MaxðM; fÞ¼ ffx g; fx g; fx gg: Also, it is easy to verify that x ∉ Essðf ðx 1 2 3 6 2 ¼ 0; x ¼ 0ÞÞ; x ∉ Essðf ðx ¼ 0; x ¼ 0ÞÞand x ∉ Essðf ðx ¼ 0; x ¼ 0ÞÞ: The essential 3 5 1 3 4 1 2 conjugates of the maximal separable subsets are: fx ; x g of fx g; fx ; x g of fx g, and 4 5 1 4 6 2 Complexity of fx ; x g of fx g. 5 6 3 discrete Let us turn our attention to the following: functions 1. Each simple minor obtained by collapsing pairs of variables belonging to distinct maximal separable subsets of M depends on possible maximal number of essential variables. Thus we have essðf Þ¼ essðf Þ¼ essðf Þ¼ 5. For instance, 2←1 3←1 3←2 0 0 0 f ¼ x x x ⊕ x x x ⊕ x x x . 2←1 1 4 1 6 3 5 5 4 6 2. The simple minors obtained by pairs of essential conjugates essentially depend on 0 0 four variables, for instance, f ¼ x x x ⊕ x x x . 5←4 2 6 3 5 4 6 Next, we turn our attention to relationship between essential arity gap and separable sets in functions. Theorem 2.14. Let f ∈ p .If gapðf ÞP2 then each non-empty set of essential variables is separable in f. Proof. Let M be an arbitrary non-empty set of essential variables in f. We prove that M ∈ sepðf Þ by considering cases. The theorem is given to be true if n # 2. Next we assume n > 2. Case 1: gapðfÞ¼ 2; n P 3 and k ¼ 2. β β α 0 1 1 0 α 0 0 If n ¼ 3 then Theorem 3.2 [13] implies that f ¼ x ðx x ⊕ x x Þ⊕ x x or f ¼ x ðx x 3 1 2 1 2 1 2 3 1 2 :ðαÞ 1 1 0 1 1 0 ⊕ x x Þ⊕ x ðx x ⊕ x x Þ, where α; β ∈ f0; 1g. Clearly, each set of essential variables in f 1 2 3 1 2 1 2 is separable. 0 1 If n ¼ 4 then according to Theorem 3.3 [13] we have f ¼ x :gðx ; x ; x Þ⊕ x :hðx ; 1 2 3 1 4 4 :ðαÞ :ðαÞ α 0 0 1 1 0 1 1 0 0 0 1 1 α 0 x ; x Þ, with g ¼ x ðx x ⊕ x x Þ⊕ x ðx x ⊕ x x Þ, and h ¼ x ðx x ⊕ x x Þ⊕ x ðx 2 3 3 1 2 1 2 3 1 2 1 2 3 1 2 1 2 3 1 1 1 0 x ⊕ x x Þ, for some α; α∈ f0; 1g (here :ðαÞ means negation of α). Clearly, each set of 2 1 essential variables in f is separable. Let nP5 From Theorem 3.4 in [13] it follows that α α 1 α 1 α n n f ¼ ⊕ x  x or f ¼ ⊕ x  x : 1 n 1 n α ⊕ ⊕ αn¼1 α ⊕ ⊕ αn¼0 1 1 Thus we have EssðfÞ¼ X . Suppose, with no loss of generality that M ¼ fx ;  ; x g; n 1 m m < n and 1 α f ¼ ⊕ x  x : 1 n α ⊕  ⊕ α ¼1 1 n Let c ;  ; c ∈ Z and c ⊕  ⊕ c ¼ 1. We can pick g ¼ f ðx ¼ c ;  ; x ¼ c Þ and 1 n k 1 n mþ1 mþ1 n n r ¼ c ⊕  ⊕ c . Assume without loss of generality that r ¼ 1. Then we have mþ1 n α α 1 m g ¼ ⊕ x  x : 1 m α ⊕ ⊕ α ¼1 1 n It must be shown that M ¼ EssðgÞ. By symmetry, it is enough to show that x ∈ EssðgÞ. Let c ;  ; c ∈ Z with c ⊕  ⊕ c ¼ 0. Then we have 2 m 2 m gð0; c ;  ; c Þ¼ 1 and gð1; c ;  ; c Þ¼ 0; 2 m 2 m which proves that x ∈ EssðgÞ. Case 2: gapðfÞ¼ 2; 2 < k < n. Theorem 2.1 [18] implies that f is a symetric function which essentially depends on all of its n variables. Theorem 4.1 [17] states that: If f is a symmetric function with non-trivial arity gap, then each set of essential variables in f is separable, which completes the proof of this case. Case 3: gapðfÞ¼ 2; n ¼ 3 and kP3. ACI 17,1 Lemma 5.1 [16] states that if f ∈ G then essðf Þ¼ 1 for all i; j∈ f1; 2; 3g; i ≠ j, which i←j 2;k shows that each subset of X is separable in f. Case 4: gapðfÞ¼ 2; 4#n#k. If f is a symmetric function then we are done because of Theorem 4.1 [17]and if f is not a symmetric function then according to Theorem 4.2 [16] there exist n− 2 variables y ; ; y ∈ X such that f ¼ h⊕ g,where EssðhÞ¼ fy ;  ; y g and g ∈ G .Moreover l n l l n− 2 1 n− 2 n;k g ¼ 0for all 1#i; j#n with i ≠ j. Now, the proof can be done as in Case 6:,for p ¼ 2, i←j given below. Case 5: gapðfÞ¼ n; 3#n#k. From Theorem 3.1 [16] it follows that f is presented in the following form: α β f ¼ a ⊕ x ⊕ ⊕ a x (1) 0 r n n α∈Eq β∈Dis k k where s s Eq ¼ fγ ∈ Z ∃i; j; 1#i < j#s; γ ¼ γ g, k k i j γ γ γ γ s s s 1 2 s γ ¼ γ  γ ; x ¼ x x  x and Dis ¼ Z nEq , for s; sP2. Moreover, there exist at least 1 s 1 2 k k k two distinct numbers among a ∈ Z for r ¼ 0; 1;  ; k − 1. r k It is easy to see that EssðfÞ¼ X .Wehavetoshow that M ∈ Sepðf Þ. Without loss of generality let us assume that M ¼fx ;  ; x g; 1#m#n.If m ¼ n or m ¼ 1 we are clearly 1 m n−i done. Let 1 < m < nand let r ¼ β k be a natural number such that a ≠ 0. Then we have i¼1 δ σ g ¼ f ðx ¼ β ;  ; x ¼ β Þ¼ a ⊕ x ⊕ ⊕ a x ; mþ1 n 0 j mþ1 n δ∈Eq σ∈Dis n−i where j ¼ σ k with σ ¼ β for i ¼ m þ 1;  ; n, and there are at least two distinct i i i¼1 i numbers among a . Clearly, g essentially depends on all of its variables, i.e. EssðgÞ¼ M and hence M ∈ Sepðf Þ. Case 6 gapðfÞ¼ p; 2 # p < n, and 4#n < k. According to Theorem 3.4 [16], there exist functions h and g, such that f ¼ h⊕ g, where g ∈ G and essðhÞ¼ n− p. Without loss of generality, let us assume that EssðhÞ¼ fx ;  ; n;k x g. Moreover, g ¼ 0 for all i and j; 1 # j < i# n. n−p i←j Clearly, EssðfÞ¼ X and according to Theorem 3.1 [16] and the Eq. (1), given in Case 5, the function g can be represented as follows g ¼ u⊕ v, where β α u ¼ ⊕ a x and v ¼ a ⊕ x : (2) r 0 n n β∈Dis α∈Eq k k Let x ; x ∈ X ; i > j, be two arbitrary essential variables in g. Say i ¼ n and j ¼ n− 1, for i j n simplicity. Then we have u ¼ 0 and v ¼ a ⊕ xb ¼ a : (3) i←j i←j 0 0 n−2 δ∈z Since g ¼ 0 for all i and j,1 # j < i#n we have v ¼ a ¼ 0 and hence v ¼ 0, and g ¼ u. i←j i←j 0 Let M be a set of essential variables in f. Note that M ∈ sepðgÞ, according to Case 5 and if M ∩ EssðhÞ¼ Ø then M ∈ sepðf Þ: We have to prove that M is separable in f in each other case. We argue by induction on n-the number of essential variables in f and g. Let n 5 4. This is our basis of induction. First, let jMj¼ 2 and P ¼ 2. Clearly, if M ⊆ EssðhÞ then (2) and (3) show that M ∈ Sepðf Þ. Complexity of Next, let us assume that M ¼ fx ; x g and EssðhÞ¼ fx ; x g. Let c ; c ∈ Z be two 1 3 1 2 2 4 discrete constants, such that Essðt Þ ¼fx ; x g, where t ¼ gðx ¼ c ; x ¼ c Þ. Clearly, x ∈ Essðf Þ, 1 1 3 1 2 2 4 4 3 1 functions where f ¼ f ðx ¼ c ; x ¼ c Þ. Let h ¼ hðx ¼ c Þ.If x ∉ Essðh Þ then x ∈ Essðf Þ and 1 2 2 4 4 1 2 2 1 1 1 1 obviously, M ∈ sepðf Þ.If x ∈ Essðh Þ then f ¼ h ðx Þ⊕ t ðx ; x Þ. According to (2) and (3) 1 1 1 1 1 1 1 3 there is a constant c ¼ Z , such that Essðt ðx ¼ c ÞÞ ¼ Ø. Hence x ∈ Essðf ðx ¼ c ÞÞ and 3 k 1 3 3 1 1 3 3 M ∈ sepðf Þ; again. Second, let jMj¼ 3 and P ¼ 2, and EssðhÞ¼ fx ; x g: 1 2 Let x ∉ M. Then there is a constant c ∈ Z such that x ∈ Essðh Þ, where h ¼ hðx ¼ c Þ. 1 1 k 2 2 2 1 1 Thus, (2) implies that fx ; x ; x g ¼ Essðf Þ, where f ¼ f ðx ¼ c Þ and M ∈ sepðf Þ, again. 2 3 4 2 2 2 1 Let x ∉ M. Then there is a constant d ∈ Z such that x ∈ Essðt Þ, where t ¼ gðx ¼ d Þ. 4 4 k 3 2 2 4 4 Clearly, x ∈ Essðf Þ; where f ¼ f ðx ¼ d Þ. According to (2) and (3),wehave 3 3 3 4 4 f ¼ðx ¼ d Þ¼ hðx ; x Þ⊕ a ; which shows that fx ; x ; x g¼ Essðf Þ and hence 3 3 4 1 2 0 1 2 3 3 M ∈ sepðf Þ: One can argue similarly if P ¼ 3 and n ¼ 4: Let us assume that for some natural number l; l P 4, if n < l; 2 # p; l < k and f ∈ G ; p;k then each set of essential variables in f is separable. Let us pick n ¼ l. According to Lemma 2.4 there is a strongly essential variable x , 1 # i # l in g, and let c ∈ Z be a constant such that X nfx g ¼ Essðgðx ¼ c ÞÞ. Without loss i k l i i i of generality, let us assume that i ¼ l and c ¼ k− 1. Using (2), it is easy to verify that t ¼ gðx ¼ k  1Þ ¼ ⊕ b x ~ ; (4) 3 l r l−1 β∈Dis k−1 β β β 1 l−1 where the coefficients b linearly depend on a ; ... ; a l and x ¼ x ... x : r 0 k −1 1 l−1 By p P 2 it follows that we may reorder the variables in h such that EssðhÞ¼ fx ; ... x g with l − p < l − 1: 1 l−p Then we can pick f ¼ f ðx ¼ k− 1Þ¼ h⊕ t . It must be shown that Essðf Þ¼ X . Since 4 3 4 l l−1 p P 2 it follows that N ¼ Essðf ÞnEssðhÞ≠Ø. Next, using (2) one can show that N ∈ Sepðt Þ 4 3 and N ∈ Sepðf Þ. According to (3) we have N ∩ Essðf ðx ¼ k  1ÞÞ  Ø; 4 i for all i ¼ 1; ... ; l − p. Now, Lemma 2.5 implies N ∪ fx ; ... ; x g∈ Sepðf Þ: Hence 1 l−p 4 l−1 Essðf Þ ¼ x : According to (4) it follows that f ∈ G : 4 l−1 4 p;k−1 Therefore the inductive assumption may be applied to f , yielding M ∈ Sepðf Þ, and 4 4 hence M ∈ sepðf Þ: , 3. Decision diagrams of functions 3.1 Ordered decision diagrams Intuitively, it seems that a function f has the maximal complexity under the subfunction reduction if all its sets of essential variables are separable, because the variables from separable sets remain essential after assigning constants to other variables (see [15]). For example, when assigning Boolean constants to some variables of a Boolean function, then a natural complexity measure is the size of its Binary Decision Diagrams (BDDs), which also depend on the variable ordering (see [1]). Each path from the root (function node) to a terminal node (leaf) of BDD is called an implementation of f. The subfunction complexities impðf Þ; subðf Þ and sepðf Þ of all implementations, subfunctions, and separable sets, obtained under all n! variable orderings of n-ary Boolean functions for n; n#5, are studied and calculated in [15]. 0 0 Example 3.1. Let f ¼ x x ⊕ x x ⊕ x x ⊕ x x ðmod 2Þ and g ¼ x ⊕ x ⊕ x ⊕ x 1 3 2 3 2 4 1 2 3 4 4 1 ðmod 2Þ be two Boolean functions. Figure 1 presents their BDDs under the natural ACI 17,1 Figure 1. Binary Desicion Diagrams. variable ordering x ; x ; x ; x . All sets of essential variables in g are separable, whereas the 1 2 3 4 sets ðx ; x Þ and ðx ; x Þ are inseparable in f. Clearly, f has non-trivial essential arity gap 1 2 3 4 and f ∈ G : Note that the implementations (longest paths) in Figure 1 A) consist of three 2;2 edges, but in Figure 1 B) of four edges, which shows that the BDD of the function g is extremely complex with respect to the number of its subfunctions and separable sets, whereas the BDD of f is simpler. 3.2 Minor decision diagrams Next we introduce a new graph-based presentation of the k-valued functions, namely by the minor decision diagrams. The minor decomposition tree (MDT) of a function, consists of the node, labelled f – called the function node and nodes labelled with minor names, called the internal (non- terminal) nodes, and the rectangular nodes (leaves of the tree) called the terminal nodes. The terminal nodes are labelled with the same name of a function (atomic minor) from P (according to Theorem 2.3). The terminal and non-terminal nodes in the MDT for a function f, essentially depending on n variables, are disposed into maximum n− 1 layers of the tree. The i-th layer consists of names of all the distinct minors of order i,for i ¼ 1; ... ; n− 1. 0 0 Figure 2 presents the MDT of the function f ¼ x x ⊕ x x ⊕ x x ⊕ x x , given in 1 3 2 3 2 4 4 1 Example 3.1. We introduce the minor decision diagrams (MDDs) for k-valued functions constructed by reducing their minor decomposition trees (MDTs). Let f be a k-valued function. The minor decision diagram (MDD) of f is obtained from the corresponding MDT by reductions of its nodes and edges applying of the following rules, starting from the MDT and continuing until neither rule can be applied: Reduction rules If two edges have equivalent (as mappings) labels of their nodes they are merged. If two nodes have equivalent labels, they are merged. Example 3.2. Let us build the MDDs of the functions from Example 3.1,namely 0 0 f ¼ x x ⊕ x x ⊕ x x ⊕ x x ðmod 2Þ and g ¼ x ⊕ x ⊕ x ⊕ x ðmod 2Þusing the reduction 1 3 2 3 2 4 1 2 3 4 4 1 rules and their MDT’s. Figure 3 A) shows the MDD of the function f, and Figure 3 B) presents the MDD of g. The identification minors of f and g are: Complexity of f ¼ f ¼ x ⊕ x ; 2←1 4←3 1 3 f ¼ x x ⊕ x x ⊕ x x ; 3←1 1 1 2 2 4 discrete f ≡ f ≡ ½f  ≡ ½f 2←1 4←3 3← 1 4← 2 f ≡ f ≡ f 4←2 2←1 3←1 4←1 3←2 functions 0 0 0 f ¼ x x ⊕ x x ⊕ x x : 4←2 1 3 2 2 1 3 g ≡ g ¼ x ⊕ x ; i←j 2←1 3 4 for 1≤ j < i ≤ 4 and; ½g  ¼ 0: 2← 1 4←3 Each edge e ¼ðv ; v Þ in the diagram is supplied with a label lðv ; v Þ, (written as bold in 1 2 1 2 Figure 3A), which presents the number of the merged edges of the MDT, connecting the nodes v and v in MDT. 1 2 If two nodes in MDT are connected with unique edge then this edge is presented in MDD without label, for brevity. For example, such pairs are ðf ; f Þ; ðf ; f Þ and ðf ; 0Þ. 4←2 3←1 2←1 2←1 The label of the edge ðf ; f Þ is 3 because there are three identification minors, namely 3←1 f ; f and f of f which are equivalent to f (see Figure 2). 3←1 4←1 3←2 3←1 In a similar way we count the labels of the edges in Figure 3 B). Figure 2. 0 0 MDT of f ¼ x x ⊕ x 4 1 x ⊕ x x ⊕ x x 3 2 3 2 4 ðmod 2Þ. ACI 17,1 Figure 3. Minor decision diagrams. So, the MDD of f is an acyclic directed graph, with unique function node and according to Theorem 2.3, with unique terminal node. Clearly, the MDD and MDT are uniquely determined by the function f. 3.3 Complexity and equivalence relations with respect to minor reduction Many of the problems in the applications of the k-valued logic are compounded because of the large number of the functions, namely k . Techniques which involve enumeration of functions can only be used if k and n are trivially small. A common way for extending the scope of such enumerative methods is to classify the functions into equivalence classes by some natural equivalence relation. Let S denote the symmetric group of all permutations of the non-empty set A, and let S A m denote the group S for a natural number m; mP1. f1:;...;mg n n A transformation ψ : P → P is an n-tuple of k-valued functions ψ ¼ðg ; ... ; g Þ; g ∈ 1 n 1 k k n n P ; i ¼ 1; ... ; n; acting on a function f ¼ f ðx ... x Þ∈ P as follows ψðfÞ¼ f ðg ; ... ; g Þ. 1 n 1 n k k Then the composition of two transformations ψ and f ¼ðh ... h Þ is defined as follows 1 n ψf ¼ðh ðg ... g Þ; ... ; h ðg ... g ÞÞ: 1 1 n n 1 n n n The set of all transformations of P is the universal monoid Ω with unity - the identical transformation e ¼ðx ... x Þ. When taking only invertible transformations we obtain the 1 n universal group C which is isomorphic to the symmetric group S . The groups consisting of invertible transformations of P are called transformation groups (sometimes termed permutation groups). n n n n Let ’; ’ ⊆ P 3 P be an equivalence relation on the algebra P . Since P is a finite k k k k algebra of k-valued functions, the equivalence relation ’ makes a partition of the algebra in a finite number equivalence classes. n n n A mapping w : P → P is called a transformation preserving ’ if f ’ wðf Þ for all f ∈ P . k k k Taking only invertible transformations which preserve ’, we get the group G of all transformations preserving ’. The orbits (also called G -types) of this group are denoted by P ; ... ; Pr. Our aim is to classify functions from P into equivalence classes by ’. Thus we have to calculate the number r of G -types, to count the number of functions in different equivalence classes, i.e. compute the cardinalities of the sets P ; ... ; Pr and to create a list of functions belonging to different G -types. ’ n Let f ∈ P and let nof ðf Þ denote the normal form obtained by applying the reduction ≻ on Complexity of f. According to Theorem 2.3, the normal form nof ðf Þ is unique and nof ðf Þ∈ P . Thus, our discrete first natural equivalence is defined as follows: functions Definition 3.3. Let f and g be two functions from P . We say that f and g are nof-equivalent (written f ’ g)if nof ðfÞ¼ nof ðgÞ. nof The transformation group induced by nof-equivalence is denoted NF .The n n n 121 transformations in NF preserve ’ , i.e. nof ðgÞ¼ nof ðψðgÞÞ for all g ∈ P and ψ ∈ NF . nof k k k Since the atomic minors (labels of terminal nodes in MDD) depend on at most one essential n 1 k variable, it follows that the number of the orbits of NF is equal to P ¼ k . These k k transformations involve permuting variables, only (see Theorem 3.9, below). By analogy with the ordered decision diagrams [1,15], we define several equivalence relations in P , which allow us to classify the functions by the complexity of their MDDs. The “scalability” of the diagram is an important measure of the computational complexity of the function. We are going to formalize this problem and establish a method for classification of functions by the minor complexities. First, the number mnrðf Þ of all the minors of a function f is a complexity measure, which can be used to evaluate the MDD of f. Namely, it counts the size (number of terminal and non- terminal nodes) of the MDD. M. Couceiro, E. Lehtonen and T. Waldhauser have studied similar evaluation, named “parametrized arity gap” in [5,6], which characterizes the sequential identification minors of a function. Second, we are going to classify functions in finite algebras under the complexity measures which count the number of minors and the number of ways to obtain these minors. Definition 3.4. Let f ∈ P be a k-valued function. Its cmr-complexity cmrðf Þ is defined as follows: (i)cmrðfÞ¼ 1if essðf Þ#1; (ii)cmrðfÞ¼ 2if essðfÞ¼ 2; (iii)cmrðfÞ¼ cmrðf Þ if essðf ÞP3: i←j j<i; x ;x ∈Essðf Þ i j The minors f with i < j are excluded because f ≡ f . The minor complexity cmr can be i←j i←j j←i inductively calculated using the MDDs of the functions as it is shown in Example 3.5, given below. We start to assign cmr-complexity equals to 1 for the terminal node, which is labeled by the minor of “0” of highest order according to (i) of Definition 3.4. Next, we inductively calculate the cmr-complexity of the minors of f with lower order, applying (ii) and (iii) of Definition 3.4. Example 3.5. Let us count the cmr-complexity of the function f from Example 3.1 , using the identification minors of f obtained in Example 3.2 and MDD of f, given in Figure 3 A). There is two simple minors ðf and f Þ of order 2 and four simple minors of order 1. Thus 2←1 4←3 we have cmrðf Þ¼ cmrðf Þ¼ 2; cmrðf Þ¼ cmrðf Þ¼ cmrðf Þ¼ 1 * 2 þ 2 * 1 2←1 4←3 3←1 4←1 3←2 ¼ 4 and cmrðf Þ¼ 3 * 2 ¼ 6. According to Definition 3.4 we have cmrðfÞ¼ 2 * 2 þ 1 * 6 4←2 þ 3 * 4 ¼ 22. In a similar way from the MDD of g in Figure 3 B) we obtain cmrðgÞ¼ 6 * 2 ¼ 12. Definition 3.6. Let f and g be two functions with essðfÞ¼ n; nP0. We say that f and g are cmr-equivalent (written f ’ g) iff: cmr (i) n#10essðfÞ¼ essðgÞ; (ii) nP20 there exists a bijection σ : Essðf Þ→ EssðgÞ, such that f ’ g , where i←j cmr r←s x ¼ σðx Þand x ¼ σðx Þ, for all j; i, with x ; x ∈ Essðf Þ; j < i. r i s j i j n n Let CM denote the transformation group preserving the equivalence ’ , i.e. ψ ∈ CM if cmr ACI k k and only if ψðfÞ¼ g0f ’ g. cmr 17,1 The nof-equivalence is independent on the cmr-complexity of functions, defined by 0 0 reduction via minors. For example, the functions f ¼ 0 and g ¼ x x ⊕ x x x ðmod 2Þ are 2 1 2 1 3 nof-equivalent, but they are not cmr-equivalent. Next we define another equivalence based on the number of minors (size of MDD) in a function. Definition 3.7. Let f and g be two functions from P . We say that f and g are mnr-equivalent (written f ’ g)if mnr ðfÞ¼ mnr ðgÞ for all m; 0#m#essðf Þ− 1. mnr m m Clearly, if essðf Þ#1 then MnrðfÞ¼ Ø. Hence, if essðfÞ¼ essðgÞ#1 then f ’ g. MN mnr denotes the transformation group which preserves the equivalence ’ . mnr Note that f ’ g or f ’ g do not imply essðfÞ¼ essðgÞ, which can be seen by the mnr nof 0 1 0 1 2 following functions: f ¼ x x ðmod 3Þ and g ¼ x x x ðmod 3Þ. Clearly, f ’ g and f ’ g, mnr nof 1 2 1 2 3 but essðfÞ¼ 2, and essðgÞ¼ 3. Theorem 3.8. (i)f ’ g 0 cmrðfÞ¼ cmrðgÞ; cmr (ii) f ’ g 0 f ’ g. cmr mnr Proof. We argue by induction on the number n ¼ essðf Þ. If essðf Þ#2 (basis for induction) then we are clearly done. Assume that (i) and (ii) are satisfied when n < s for some natural number s; s > 2. Let n ¼ s and f ’ g. Then our cmr inductive assumption implies X X cmrðfÞ¼ cmr f ¼ cmrðg Þ¼ cmrðgÞ; i←j u←v j<i u<v and mnr ðf Þ¼ mnr ðg Þ, where u ¼ πðiÞ and v ¼ πðjÞ for some π ∈ S and m ¼ 0; m i←j m u←v n ... ; n− 1. , Thus, the complexity cmrðf Þ is an invariant of the group CM , and the complexity mnrðf Þ is an invariant of the group MN . It is naturally to ask which groups among “traditional” transformation groups are n n n n n subgroups of the groups NF or CM and which of these groups include NF ; MN or CM k k k k k as their subgroups. n n n Let σ : Z → Z be a mapping and let ψ : P → P be a transformation of P generated by k k σ k k k σ as follows ψ ðf ÞðaÞ¼ σðf ðaÞÞ for all a∈ Z . σ k Theorem 3.9. The transformation ψ preserves ’ if and only if σ is a permutation cmr of Z ; k > 2. Proof. Let σ : Z → Z . k k First, let σ be a permutation of Z .Let f ∈ P be an arbitrary function. If essðf Þ#1then essðψ ðf ÞÞ ¼ essðf Þ and we are clearly done. Let essðfÞ¼ essðgÞ¼ nP2and let i and j be two arbitrary natural numbers with 1#j < i#n.Then wehave ½ψ ðf Þ ðx ; ... ; x Þ¼ σ f ðx ; .. . ; x ÞÞ: 1 n i←j 1 n σ i←j Since σ is a permutation, it follows that f ’ ½ψ ðf Þ which shows that f ’ ψ ðf Þ. i←j cmr σ cmr σ i←j Second, let σ be not a permutation of Z . Hence, there exist two constants a and a from Z k 1 2 k such that a ≠ a and σða Þ¼ σða Þ. Let b ¼ðb ; ... ; b Þ∈ Z ; nP2 be a vector of 1 2 1 2 1 n constants from Z . Then we define the following function from P : a if x ¼ b for i ¼ 1; ... ; n 1 i i f ðx ; ... ; x Þ¼ 1 n a otherwise: 2 Clearly, EssðfÞ¼ X and the range of f consists of two numbers a and a . Then n 1 2 Complexity of σðfa ; a gÞ ¼ fσða Þg, implies that ψ ðf Þðc ; ... ; c Þ¼ σða Þ for all ðc ; ... ; c Þ∈ Z . 1 2 1 1 n 1 1 n discrete Hence, Essðψ ðf ÞÞ ¼ Ø which shows that f :’ ψ ðf Þ and ψ ∉ CM . , cmr σ σ σ k functions We deal with “natural” equivalence relations which involve variables of functions. Such relations induce permutations of the domain Z of the functions. These mappings form a transformation group whose number of equivalence classes can be determined. The restricted affine group (RAG) is defined as a subgroup of the symmetric group on the direct n 123 sum of the module Z of arguments of functions and the ring Z of their outputs. The group RAG permutes the direct sum Z þ Z under restrictions which preserve single-valuedness of all functions from P [8,10]. In the model of RAG an affine transformation ψ operates on the domain or space of inputs x ¼ðx ; .. . ; x Þ to produce the output y ¼ xA⊕ c, which might be used as an 1 n input in the function f.Its output f ðyÞ together with the function variables x ; ... ; x are 1 n linearly combined by a range transformation which defines the image g ¼ ψðf Þ of f as follows: gðxÞ¼ ψðf ÞðxÞ¼ f ðyÞ⊕ a x ⊕ .. . ⊕ a x ⊕ d ¼ 1 1 n n (5) tx f ðxA⊕ cÞ⊕ a ⊕ d; n n where d and a for i ¼ 1; .. . ; n are constants from Z ; c∈ Z ,and a ¼ ða ; ... ; a Þ∈ Z . i k 1 n k k Such a transformation belongs to RAG if A is a non-singular matrix. We want to extract basic facts for several subgroups of RAG which are “neighbourhoods” n n n or “relatives” of our transformation groups NF ; CM and MN . k k k First, a classification occurs when permuting arguments of functions. If π ∈ S then π acts on variables by: πðx ;   ; x Þ¼ðx ;  ; x Þ. Each permutation generates a map on the 1 n πð1Þ πðnÞ domain Z . For example, the permutation π ¼ð1; 2; 3Þ generates a permutation of the domain f0; 1; 2g of the functions from P . Then we have π : 001→ 010→ 100 and in cyclic decimal notation this permutation can be written as ð1; 3; 9Þ. The remaining elements of Z are mapped according to the following cycles of π in decimal notation - ð2; 6; 18Þð4; 12; 10Þ ð5; 15; 19Þð7; 21; 11Þð8; 24; 20Þð14; 16; 22Þð17; 25; 23Þ. Note that each permutation from S n 3 keeps fixed all k constant tuples from Z . In case of Z , these tuples ð0; 0; 0Þ; ð1; 1; 1Þ and k 3 ð2; 2; 2Þ are presented by the decimal numbers 0; 13 and 26. S denotes the transformation group induced by permuting of variables. Boolean functions of two variables are classified into twelve S -classes [8], as it is shown in Table 1.M. Harrison has determined the cycle index of the group S . Using Polya’s counting theorem he has counted the number of equivalence classes under permuting arguments (see [8] and Table 3, below). The subgroups of RAG, defined according to (5) which are “relatives” to the groups n n n n NF ; CM and MN are determined as follows: RAG when A-non-singular; CF when k k k k n n n A ¼ I; a ¼ 0; c ¼ 0; LF when A ¼ I; c ¼ 0; d ¼ 0; CA when A ¼ I; a ¼ 0; d ¼ 0; LG k k k c ¼ 0; a ¼ 0; d ¼ 0; S when A ¼ P; c ¼ 0; a ¼ 0; d ¼ 0, where P denotes a permutation matrix, I is the identity matrix, bandc are n-dimensional vectors from Z and d ∈ Z . n n n It is naturally to ask which subgroups of RAG are subgroups of NF ; CM and MN . k k k n n n n n Theorem 3.8 shows that CF and S are subgroups of MN . Clearly, S #NF . k k k k k Theorem 3.10. n n n n n n (i) CF ≤ CM ; (ii) S ≤ CM ; (iii) S ≤ NF ; k k k k k k n n n n (iv) NF :≤ RAG; (v) CM :≤ RAG; (vi) LG :≤ MN ; k k k k n n n n n n (vii) CA :≤ MN ; (viii) CA :≤ NF ; (ix) LG :≤ NF ; k k k k k k n n n n (x) CM :≤ NF ; (xi) NF :≤ MN : k k k k n n Proof. (i) Follows from Theorem 3.9.(ii) and (iii) – Let π ∈ S and let : P → P be a ACI π k k transformation of P defined as follows f ðf Þða ;  ; a Þ ¼ f ða ;  ; a Þ for all π 1 n πð1Þ πðnÞ 17,1 ða ;  ; a Þ∈ Z . We have to prove that the transformation f preserves the equivalence 1 n relations ’ ; ’ and ’ for all π ∈ S . It suffices to show that f preserves ’ and cmr mnr n cmr nof π ’ . Let f ∈ P be a function and let us assume EssðfÞ¼ X ; nP2. It must be shown that nof n f ’ g and f ’ g, where gða ;  ; a Þ¼ f ðπða Þ;  ; πða ÞÞ for all ða ;  ; a Þ∈ Z . cmr nof 1 n 1 n 1 n Since π is a permutation, we have −1 −1 f ða ;  ; a Þ¼ g π ða Þ;  ; π ða ÞÞ; 1 n 1 n for all ða ;  ; a Þ∈ Z which shows that f ’ g and hence, f ’ f ðf Þ. Since nof ðfÞ¼ 1 n cmr cmr k π f ðx ;  ; x Þand nof ðfÞ¼ f ðx ;  ; x Þ, it follows nof ðgÞ≡ nof ðgÞand f ’ g.(iv) and (v) i j πðiÞ πðiÞ nof – Let f ¼ x ⊕ x ⊕ x ðmod 3Þ and g ¼ x x ⊕ x x ⊕ x x ðmod 3Þ.Thenwehave 1 2 3 1 2 1 3 2 3 f ¼ 2x ⊕ x ðmod 3Þ and g ¼ 2x x ⊕ x x ðmod 3Þ where fi; j; mg ¼ f1; 2; 3g. Clearly, i←j j m i←j j m j j f ¼ g ¼ 0, and hence f ’ g and f ’ g. One can show that there is no i←j i←j cmr nof j← m j← m transformation ψ ∈ RAG,defined as in (5),for which g ¼ ψðf Þ. Consequently, n n n CM : # RAG; NF :# RAG and MN : # RAG.(vi), (vii), (viii), (ix) and (xi) – Let k k k 0 1 0 1 2 1 1 0 1 1 4 f ¼ x x ⊕ x x x ðmod 3Þ and g ¼ x x ⊕ x x x ðmod 3Þ be the functions from P . Let 1 2 2 3 4 0 2 2 3 4 3 0 1 B C B C A ¼ @ A Then clearly, f ðxÞ¼ gðAxÞ and hence, f and g belong to the same equivalence class under the transformation group LG . Let c ¼ð0; 0; 0; 1Þ. Then we have f ðxÞ¼ gðx:I⊕ cÞ, which shows that f and g belong to the same equivalence class under the transformation group CA . One can show that f ’ g. Example 3.5 shows that f :’ g. Consequently, nof mnr n n n n n n n n NF : # MN ; LG : # MN and CA : # MN . Theorem 3.8 shows that NF :#CM ; k k k k k k k k n n n n 0 0 LG : # CM and CA : # CM .ðxÞ - Let us pick f ¼ x x ðmod 2Þ and g ¼ x x ðmod 2Þ. 1 2 k k k k 1 2 Clearly, f ’ g, but nof ðfÞ¼ x :≡ x ¼ nof ðgÞ. , cmr 1 So, Theorem 3.10 summarizes results which determine the positions of the groups n n n NF ; CM and MN , with respect to the subgroups of RAG. It is well-illustrated by Figure 4, k k k in the case of Boolean functions. 4. Classification of Boolean functions by minor complexities Table 2 shows the four classes in P under the equivalence ’ . The ’ -classes are cmr cmr represented as union of several classes under the permuting arguments, according to Theorem 3.10 (ii), which can be observed in Table 1 and Table 2, given below. The number of types under permuting arguments, is an upper bound of the number of equivalence classes induced by the relations ’ ; ’ and ’ (see Figure 4). nof cmr mnr Table 1. The twelve classes in 0 0 0 0 [0], ½x x ; ½x x ; ½x x x x ; 1; 2 2 1 2 2; 1 1 2 P under the 0 0 2 0 0 ½x ⊕ x ; ½x ⊕ x ; ½x ⊕ x x ; 1 2 1 ½x ⊕ x x x ⊕ x x ; 1 2 1 2; 1 2 2 1 2 1 permutating of 0 0 0 0 ½x ⊕ x x ; ½x x ; [1]. ½x ; x ; variables. 1 1 2 1 2 1 2 Complexity of discrete functions Figure 4. Transformation groups in P . n n In Table 3 the columns named SB and SP are calculated in [15] and they present 2 2 the number of classes under the complexities, determined by the number of subfunctions and separable sets in the functions. It is surprising that for n#3these n n columns are same as the columns CM and MN , i.e. the number of classes are the 2 2 same, but these classes are very different as sets of functions, determined by these complexities. Figure 4 presents the subgroups of RAG and transformation groups whose invariants are subfunction, and minor complexities of Boolean functions of n-variables. According to n n Theorem 3.10 the group CM has three subgroups from RAG, namely: S - the group of 2 2 permuting arguments, trivial group consisting of the identity map, and CF - the group of Table 2. The four classes in 0 0 0 0 0 [0, 1] ½x x ; x x ; x ⊕ x ; x ⊕ x ; x ⊕ x x ; x ⊕ x x ; P under the 2 1 1 2 1 1 2 1 2 1 2 2 1 2 0 0 0 0 0 0 0 ½x ; x x ; x ; ½x x ; x ⊕ x x ; x ⊕ x x ; x x : 1 2; 1 2 1 2 1 cmr-complexity. 1 2 1 1 2 1 2 n n n n n NS CM MN SB SP 2 2 2 2 2 14 2 2 2 2 Table 3. 212 4 3 4 3 Number of equivalence 3 80 11 5 11 5 classes in P under 4 3984 ** 74 11 5 37 333 248 ** * 38 transformation groups. n n complementing outputs. The groups NF and MN are not subgroups of any subgroup ACI 2 2 of RAG. 17,1 Next, we turn our attention on classifying the functions with respect to their cmr- complexity. This classification is based on the exhaustive Algorithm 1, given below. Table 4 presents a complete classification of the Boolean functions of tree variables by the minor complexities cmr and mnr. If we agree to regard each 2 -tuple as a binary number then the last column presents the vectors of values of all ternary Boolean functions in their table representation with the natural numbers from the set f0;   ; 127g. According to Theorem 3.9, if a natural number z; 0#z#255, presents a function f which belongs to a cmr- class then the function f presented by 255− z belongs to the same class. Thus the catalogue contents the numbers#127, only (see the last column in Table 4). These numbers represent the functions which preserve zero, i.e. the functions f for which f ð0; 0; 0Þ¼ 0. This classification shows that there are eleven equivalence classes under ’ and five classes cmr under ’ . mnr Theorem 3.8 shows that each mnr-class is a disjoint union of several cmr-classes. Thus the first mnr-class consists of all the functions which belong to the first and the second cmr-class (see fifth column in Table 4). The second mnr-class is equal to the third cmr-class. The fourth and the fifth mnr-classes are unions of three cmr-class, namely: sixth, seventh, and eight, and ninth, tenth, and eleventh, respectively. The main data structure which describes the nodes in the MDD of f is represented by a record declared as follows: The first field, named ess presents the number of essential variables in the minor (located on the corresponding node) and the second field val is a natural number whose k-ary representation is the last column B of the truth table (of size k 3ðn þ 1Þ)of the minor. Table 4 presents classification of ternary Boolean functions under the equivalences ’ cmr and ’ , including the catalogue of the equivalence classes (last column). Let us choose a mnr natural number belonging to the seventh column of Table 4, say 24. It belongs to the row 4 3 numbered 6. The binary representation of 24 is 00011000, because 24 ¼ 1*2 þ 1*2 . Hence, the function f corresponding to 24 is evaluated by 1 on the fourth and fifth miniterms, 0 0 0 0 0 0 namely x x x and x x x . Consequently, f ¼ x x x ⊕ x x x ðmod 2Þ.Thenwehave 2 3 1 2 3 1 1 2 3 1 2 3 0 0 f ¼ f ¼ 0and f ¼ x x ⊕ x x ðmod 2Þ. Clearly, cmrðfÞ¼ 4, which is written in 2←1 3←1 3←2 2 1 1 2 the third cell of the sixth row. The MDD of f is shown in the second cell. The cmr- equivalence class containing f consists of 18 functions, according to the fourth cell of the sixth row and the mnr-equivalence class of f contains 108 functions (see whole fifth column of the table). The function x x x ðmod 2Þ is representative for this class (sixth cell). The 1 2 numerical list of the functions from this equivalence class is given in the last seventh cell of Table 4. The record of the function f is presented as follows f.ess53 and f.val524, Complexity of where k =2 and B5 00011000. discrete functions 127 ACI 17,1 Table 4. Minor classification of ternary Boolean functions. 5. Conclusion Complexity of The transformation groups whose invariants are the minor complexities have only three discrete n n subgroups among the groups in RAG, namely trivial group (identity map), S and CF , k k functions whereas the groups whose invariants are the subfunction complexities have three subgroups more (see [15]). One of motivations to study the group NF is that the reductions are inexpensive and the number of classes is much smaller than the number of classes under the subgroups of RAG, because the order of NF is so large. As mentioned, n k n 129 the number of equivalence classes under NF equals to k . Hence, the order of NF is equal k k n n− 1 k k k to k =k ¼ k . The most complex functions with respect to separable sets [15] are grouped in the largest equivalence class. J. Denev and I. Gyudzhenov in [7] proved that for almost all the k-valued functions all the sets of essential variables are separable. Similar results can not be proved for the minor complexities. For example, in P the most complex functions belong to the class numbered as 11 (see Table 4), which consists of 16 functions. This class is not so large. It presents 1/16 of the all 256 ternary Boolean functions. References [1] R.E. Bryant, Graph-based algorithms for boolean function manipulation, IEEE Trans. Comput. C- 35 (8) (1986) 677–691. [2] K. Chimev, Separable sets of arguments of functions, MTA SzTAKI Tanulmanyok 80 (1986) 1–173. [3] K. Chimev, S. Shtrakov, I. Giudjenov, M. Aslanski, Separable and dominating sets of variables for the functions, in: Math. and Educ. in Math., vol. 16, Union of Bulgarian Mathematicians, BAS, 1987, pp. 61–71. [4] B. Choi, Advancing from two to four valued logic circuits, in: Proc. IEEE Intern. Conf. on Industrial Technology, IEEE, 2013. [5] M. Couceiro, E. Lehtonen, T. Waldhauser, GAP vs. PAG, Multiple-Valued Logic 42 (2012) 268–273. [6] M. Couceiro, E. Lehtonen, T. Waldhauser, Parametrized arity gap, Order 30 (2013) 557–572. [7] J. Denev, I. Gyudzhenov, On separable subsets of arguments of functions from p ,MTA SzTAKI Tanulmanyok 26 (147) (1984) 47–50. [8] M. Harrison, Counting theorems and their applications to classification of switching functions, in: A. Mikhopadhyay (Ed.), Recent Developments in Switching Theory, Academic Press, NY, 1971, pp. 85–120. [9] J. Klop, R. de Vrijer, Term rewriting systems, Cambridge University Press, 2003. [10] R.J. Lechner, Harmonic analysis of switching functions, in: A. Mikhopadhyay (Ed.), Recent Developments in Switching Theory, Academic Press, NY, 1971, pp. 121–228. [11] A. Salomaa, On essential variables of functions, especially in the algebra of logic, Annales Academia Scientiarum Fennicae Ser. A 333 (1963) 1–11. [12] S. Shtrakov, On some transformation groups in k-valued logic, General Algebra Appl. 20 (1993) 225–237. [13] S. Shtrakov, Essential arity gap of boolean functions, Serdica J. Comput. 2 (3) (2008) 249–266. [14] S. Shtrakov, Essential variables and positions in terms, Algebra Universalis 61 (3–4) (2009) 381–397. [15] S. Shtrakov, I. Damyanov, On the computational complexity of finite operations, Int. J. Found. Comput. Sci. 27 (01) (2016) 15–38. [16] S. Shtrakov, J. Koppitz, On finite functions with non-trivial arity gap, J. Discuss. Math. General ACI Algebra Appl. 30 (2010) 217–245. 17,1 [17] S. Shtrakov, J. Koppitz, Finite symmetric functions with non-trivial arity gap, Serdica J. Comput. 6 (4) (2012) 419–436. [18] R. Willard, Essential arities of term operations in finite algebras, Discrete Math. 149 (1996) 239–259. Corresponding author Slavcho Shtrakov can be contacted at: Shtrakovshtrakov@gmail.com For instructions on how to order reprints of this article, please visit our website: www.emeraldgrouppublishing.com/licensing/reprints.htm Or contact us for further details: permissions@emeraldinsight.com

Journal

Applied Computing and InformaticsEmerald Publishing

Published: Jan 4, 2021

Keywords: Separable set; Subfunction; Identification minor; Minor decision diagram; Minor complexity

References