Boolean Curve Fitting with the Aid of Variable-Entered Karnaugh Maps

The Variable-Entered Karnaugh Map is utilized to grant a simpler view and a visual perspective to Boolean curve fitting (Boolean interpolation); a topic whose inherent complexity hinders its potential applications. We derive the function(s) through 𝑚 points in the Boolean space 𝐵 𝑛+1 together with consistency and uniqueness conditions, where 𝐵 is a general ‘big’ Boolean algebra of ℓ ≥ 1 generators, ℒ atoms ( 2 ℓ−1 < ℒ ≤ 2 ℓ ) and 2 ℒ elements. We highlight prominent cases in which the consistency condition reduces to the identity ( 0 = 0) with a unique solution or with multiple solutions. We conjecture that consistent (albeit not necessarily unique) curve fitting is possible if, and only if, 𝑚 = 2 𝑛 . This conjecture is a generalization of the fact that a Boolean function of 𝑛 variables is fully and uniquely determined by its values in the {0,1} 𝑛 subdomain of its 𝐵 𝑛 domain. A few illustrative examples are used to clarify the pertinent concepts and techniques.


Introduction
Cryptography is the science of encrypting and decrypting data so as to allow secure transfer of information over space (transmission over a communication channel) or over time (storage within a computer memory). The 'inverse' of encryption is cryptanalysis, which is the science of analyzing and breaking encrypted messages. Cryptography not only protects data from theft or alteration, but can also be used for user authentication. Conventionally, cryptography was largely of interest to the military and to diplomats. Nowadays, it permeates many aspects of life, including Internet banking, e-commerce, e-mail, and automatic teller machines. It has tremendous impact on the economic, sociological, and political aspects of the contemporary society. A cryptographic scheme, or a system used to accomplish the goals of cryptography is called a cryptosystem (Adler and Gailly, 1999;Menezes et al., 1996;Piper and Murphy, 2002;Tanenbaum and Wetherall, 2011;Rushdi and Alsheikhy, 2017;Ahmad and Rushdi, 2018). This paper serves as a first step towards a novel cryptosystem that is based on the utilization of a 'big' Boolean algebra, i.e., a finite (atomic) Boolean algebra other than the conventional two-valued one (Hammer and Rudeanu, 1968;Brown, 1990;Rudeanu, 1974Rudeanu, , 2001Crama and Hammer, 2011;Rushdi and Amashah, 2011). The basic idea is to dramatically extend the search space needed in satisfiability-based (SAT-based) cryptography . The adversary will not only be obliged to traverse a search space (that can be arbitrarily huge), but will definitely end up with an arbitrarily large number of candidate answers, all of which are wrong except the one corresponding to the encrypted message.
In the envisioned cryptosystem, the alphabet of symbols used is a certain subset of the 2 ℒ elements of a general 'big' Boolean algebra of ℓ ≥ 1 generators, ℒ atoms (2 ℓ−1 < ℒ ≤ 2 ℓ ). The sent message now consists of a sequence of functions ( ) over encrypting the intended symbols , where every symbol is encrypted by an arbitrarily large number of functions ( 1 ≤ ≤ ). A single common particular vector is selected such that ( ) = for all possible values of and . This common vector is entrusted securely to the intended receiver. The job of the receiver is to trivially substitute this into the sequence of functions received, thereby converting it into the original sequence of sent symbols. However, it is a totally different story for the adversary, whose potential approaches for cryptanalysis will be discussed in a forthcoming paper. The present paper will be devoted entirely to the job required of the sender (or system designer), which is to construct a pool of functions ( ) such that ( ) = for all possible values of and . It is also desirable that these functions should be as 'different' as possible and that none of them should equate to at an input other than . These requirements can be achieved via Boolean curve fitting (Boolean interpolation), which allows the algebraic derivation of a function passing through m points in the Boolean space +1 . As it is the case of all problems concerning Boolean equations, certain consistency conditions might be needed and uniqueness is not always guaranteed, (Hammer and Rudeanu, 1968;Brown, 1990;Rudeanu, 1974Rudeanu, , 2001Crama and Hammer, 2011;Rushdi and Amashah, 2011).
The problem of Boolean curve fitting (Boolean interpolation) was handled as a pure mathematical curiosity with no view of practical applications during the past century. Most prominent among the early contributions to this problem are those due to Stamm (1925), McKinsey (1936a, 1936b, Ellis (1953Ellis ( , 1956, and Scognamiglio (1961). Such contributions culminated in the (now) classical treatise by Rudeanu (1974). A sequel paper by Melter and Rudeanu (1984) specialized the results for Boolean functions that are linear in the sense of Löwenheim (Löwenheim, 1918). We have searched many scientific databases vehemently and repeatedly for any contribution to (or application of) Boolean interpolation beyond 1984, but could not find any. However, we should note that there are many papers containing the words 'Boolean interpolation' in text (and even in title), but these apparently refer to the utilization of Boolean methods in real interpolation (see, e.g. (Delvos and Posdorf, 1979;Neumann, 1982aNeumann, , 1982bDelvos, 1982Delvos, , 1990Rudeanu and Simovici, 2004). The work of Rushdi and Albarakati (2012) is related to Boolean interpolation as a special case since it deals with the inverse problem of Boolean equations, in which a Boolean function ( ) is required to have the same value of 0 (or 1) at (and only at) several distinct points . However, the techniques used in (Rushdi and Albarakati, 2012) are not derived from or based on concepts of Boolean interpolation (Rushdi and Balamesh, 2018). It seems that the topic of Boolean interpolation (as understood herein) matured in a pure mathematical sense several decades ago. Subsequently, it went into a temporary state of hibernation in wait for a practical application. We hope that the appropriate time has arrived for such an application, and that the suggested application is a serious and important one, indeed.
To set the stage for our intended application in cryptography, we studied the available results on Boolean interpolation, and produced a tutorial exposition of them in Section 2. In Section 3, we considered important special cases in which the consistency condition needed for Boolean interpolation reduces to the trivial identity (0 = 0). In Section 4, we gave our exposition an insightful, visual and procedural interpretation with the aid of the Variable-Entered Karnaugh Map (VEKM) (Rushdi, 1987(Rushdi, , 2004(Rushdi, , 2018a(Rushdi, , 2018bAhmad, 2017, 2018;Al-Yahya, 2000, 2001;Albarakati, 2012, 2014;Rushdi and Ba-Rukab, 2017;, which is the natural map for functions on big Boolean algebras (Rushdi and Amashah, 2011). We supplemented this interpretation with three demonstrative examples. Section 5 uses elementary solution techniques to further illustrate and independently verify the results of the demonstrative examples in Section 4. Section 6 concludes the paper.
To make the paper self-contained, it is supplemented with two appendices. Appendix A is a general discussion of the solution of a Boolean equation in a single variable. Appendix B details the solution of the Boolean equation in one of the illustrative examples.

Boolean Curve Fitting
In this section, we reproduce from (Rudeanu, 1974) the main results known on Boolean curve fitting or Boolean interpolation. We replace the mathematical theorem-proof style in (Rudeanu, 1974) by an engineering problem-solving procedure. We take care to have a rather self-contained exposition and fill-in any missing details in (Rudeanu, 1974). We realize that some of the details might be said to be 'obvious' (to particularly talented mathematicians). The problem at hand requires the determination of a Boolean curve whose graph passes through given points ( 1 , 1 ), ( 2 , 2 ), … , ( , ) of the Boolean space +1 , where = [ ,1 , ,2 , … , , ] ∈ , = 1, 2, … , and ∈ , = 1, 2, … , . This is equivalent to finding a Boolean function : → such that The function ( ) and its complement ̅ ( ) can, respectively, be represented by their minterm expansions (Hammer and Rudeanu, 1968;Rudeanu, 1974Rudeanu, , 2001Brown, 1990;Crama and Hammer, 2011) and where = [ 1 , 2 , … , ] ∈ {0,1} , ( ) and ̅ ( ) are discriminants of ( ) and ̅ ( ), respectively, and is the primitive product (minterm) given by and The set of equations (1) can be rewritten in the equivalent form which are characterized with a 0 in the right-hand side. These are further combined into a single equivalent equation: Replacing the XOR function with its equivalent sum-of-products expression, we get Substituting the minterm expansions (2) and (3) for ( ) and ̅ ( ), we obtain Interchanging the OR operators over and , we obtain Equation (10) is equivalent to a set of 2 equations valid for each ∈ {0,1} : Each of these equations is a Boolean equation in a single variable ( ). The function in the lefthand side of (11) can be represented by the Variable-Entered Karnaugh Map (VEKM) (Rushdi, 1987(Rushdi, , 2004Al-Yahya, 2000, 2001;Albarakati, 2012, 2014;Rushdi and Ahmad, 2017) of a single map variable ( ) shown in Figure 1.
We use the results in Appendix A to solve the Boolean equation (11). The consistency condition for this equation is The condition in (12) is valid for each ∈ {0,1} . This means that we have 2 consistency conditions that can be combined into a single consistency condition by ORing (12) over all possible values of .
If we interchange and ℎ in (13), we obtain ORing (13) and (14), we obtain We now replace ̅ ℎ ∨ ̅ ℎ by ⊕ ℎ and interchange the order of the ORing to obtain Now, using Lemma 13.3 in Rudeanu (1974) We simplify the overall consistency condition into Using Appendix A, we write the parametric solution of (11) as where is a parameter that belongs to the underlying Boolean algebra . The last term in (19) can be simplified by De Morgan's law and, then, by the reflection law to The right-hand side of (20) is equal to ⋀ ( ) ̅̅̅̅̅̅̅

=1
ORed with products containing at least one term. Each of these products subsumes (and hence is absorbed in) some of the terms in ⋁ =1 when inserted in (19). Therefore, (19) will ultimately take the form This solution for ( ) is then substituted in the minterm expansion (2) to obtain the desired interpolating function: The solution in (22) is unique if, and only if, the term containing vanishes for each ∈ {0,1} . This will occur if, and only if (McKinsey, 1936a;Rudeanu, 1974) and, in this case, the unique solution is Note that the uniqueness condition (23) depends only on the 's and is independent of the 's. Incidentally, a Boolean curve through a single point (i.e., = 1) cannot be unique, since becomes identically 1 and cannot be equated to 0.

Cases of Unconditional Consistency
There are two prominent cases in which the consistency condition (18) reduces to the identity 0 = 0, and hence consistency is achieved unconditionally: 1) The case when the 's are the same, i.e. = 0 for 1 ≤ ≤ . This includes the case of = 1 and, more importantly, the case of the inverse problem of consistent Boolean equations (Rushdi and Albarakati, 2012).

VEKM Representation
The algebraic solution procedure in Section 2 will now be implemented by constructing a sequence of five Variable-Entered Karnaugh Maps (VEKMs) of map variables , that we characterize in Table 1. Use of the map allows us to work either at the level of a single cell ∈ {0,1} or the level of the entire map. The entries of the cell for the first two VEKMs are, respectively, the two subfunctions (0) and (1) of the function ( ( )) in Figure 1. The entry in cell of the third VEKM is obtained by ANDing the corresponding entries in the first two VEKMs. All VKEM entries are expressed solely in terms of the input data of the problem, with the only exception of the fifth VEKM which needs an arbitrarily selected parameter ∈ . Out of the five VKEM functions in Table 1, the third and fourth functions are important for stating the consistency and uniqueness conditions. In fact, each of these two conditions results by equating to 0 the disjunctive eliminant (Brown, 1990) or join derivative (Thayse, 1978) of the corresponding function, i.e., ORing all VEKM entries of the corresponding map. The fifth VEKM function is the general desired solution subject to the consistency condition. If further the uniqueness condition is involved, the fifth VEKM is replaced by the first VEKM which stands for a unique solution. Only the second function, called an auxiliary function, is merely an intermediate product and not a final one. In the following sections, we demonstrate the solution of the Boolean curve fitting problem by constructing the aforementioned VEKMs.

Elementary Solution Techniques
In this section, we revisit the three examples in Section 4 solving them by elementary methods. We verify that, in each case, we recover the same solutions obtained via the formal interpolation procedure.

Example 1 -Revisited
Here, we solve example 1 from first principles and without using the theory presented in Sections 2 and 4. Figure 6 shows the function table ( 4 2 → 4 ) for ( 1 , 2 ). Note that the section marked with the thick line is the Karnaugh map ({0,1} 2 → 4 ) for this function. The function ( 1 , 2 ) is uniquely determined by its Karnaugh map. Two entries in the Karnaugh are required by the problem statements to be (0,0) = 0 and (1,1) = 1. So, to complete the entries of the map, we assume that (0,1) = and (1,0) = , as shown in Figure 6. Then the map produces ( 1 , 2 ) = 1 ̅ 2 ∨ ̅ 1 2 ∨ 1 2 = 1 2 ∨ 1 ∨ 2 Now, we find the conditions on , ∈ 4 from the remaining known elements in the function table.
We obtain the following set of simple Boolean equations with their corresponding solutions: (1, ̅) = 1 = ̅ ∨ ∨ ̅ ̅ = ̅ ∨ ⇒ ∈ {1, } Conditions in (35)-(39) are consistent and they produce the solution = ̅ and = . These values are also consistent with the given value for ( , ̅), since as required. Substituting for and into (34), we obtain ( 1 , 2 ) = 1 2 ∨ 1 ∨ 2 = 1 2 ∨ 1 ∨ ̅ 2 = 1 ∨ ̅ 2 which is identical to the solution obtained before in (28).  Figure 7 shows the function table for the function in example 2, where we have assumed that (1,0) = and (0,1) = where , ∈ 4 . So, we can write the function based on its Karnaugh map as ( 1 , 2 ) = 1 ̅ 2 ∨ ̅ 1 2 ∨ 1 2 = 1 ∨ 2 ∨ 1 2 Note that, in this case, we have no further constraints on . So, there are no more conditions on and other than the fact that each of them belongs to 4 . This solution (42) is exactly the same as the earlier solution (29) with identified as 1 and identified as 2 . Figure 8 shows the function table for the function in example 3. We can write the function as

Example 3 -Revisited
( 1 , 2 ) = ̅ 1 ̅ 2 ∨ 1 ̅ 2 ∨ ̅ 1 2 ∨ 1 2 We apply the constraints dictated by the function table to get equations on the unknowns , , , and . Table 2 shows the resulting equations and their individual solutions (which could be obtained either by inspection or formally as shown in Appendix B). The overall solution set is the intersection of the solutions of the individual equations which is not empty (indicating that the system of equations is consistent). This overall solution set is ∈ {0, }, = , = ̅, ∈ { ̅, 1} Substituting the four possible solutions obtained in (43), we obtain the four functional expressions in (30)-(33). International Journal of Mathematical, Engineering and Management Sciences Vol. 4, No. 6, 1287-1306https://dx.doi.org/10.33889/IJMEMS.2019

Conclusions
This paper revisited the classical problem of Boolean curve fitting, and offered a detailed exposition of its algebraic formulation and solution together with conditions for consistency and uniqueness. This is followed by a map procedure implementing these algebraic results via a sequence of five Variable-Entered Karnaugh Maps (VEKMs). Three illustrative examples are then solved twice, first via the curve-fitting procedure and then based on elementary principles of Boolean algebra. The solutions based on elementary principles are insightful, but they demand much care or effort in solving the elementary Boolean equations required. The earlier solutions based on the curvefitting procedure are almost mechanical in nature, since the solution of Boolean equations is already taken care of.
The main aim of this paper is to set the stage for constructing a cryptosystem based on Boolean curve fitting. As an offshoot, it is an invitation for further exploration of Boolean curves drawn in arbitrary Boolean spaces. It is well known that if the interpolation points exactly cover the 2 Karnaugh map points {0,1} , then it is possible to draw a Boolean curve through them consistently and uniquely. One of our examples (Example 3) shows that when 2 interpolation points other than the Karnaugh-map points are used, consistency is achieved but uniqueness is not. So far, we have been unable to prove a conjecture that 2 interpolation points will lead to consistent curve fitting, but in the meanwhile we could not find a counterexample against this conjecture.
The single equation (A3) is equivalent to the following three individual equations taken collectively Equations (A4) and (A5) are, respectively, equivalent to the inequalities which can be combined into the general subsumptive solution of (A1), namely subject to the consistency condition (A6), which is implicit in (A9), since if is eliminated, one obtains the inequality which is equivalent to (A6). Another prominent solution of (A1) is its general parametric solution where ∈ is an arbitrary parameter.
The consistency condition (A6) is interpreted to mean that any atom of belonging to (0) (1) must be nullified or annihilated, thereby leading to collapse of the algebra to a subalgebra lacking the nullified atoms (Rushdi, 2004;Crama and Hammer, 2011;Rushdi and Albarakati, 2014;Rushdi and Ahmad, 2017;). The solution (A11) indicates that is a disjunction of certain atoms of . This disjunction includes at least all the atoms constituting (0) and possibly some of the atoms which imply ̅ (1). To disjoint the two terms in (A11), we apply the Reflection Law to obtain Since the parameter is any element of , it is a disjunction of any possible subset of the set of atoms of . Its multiplication by ̅ (0) ̅ (1) can select or omit any atoms appearing in ̅ (0) ̅ (1) independently of the other atoms.
The parametric solution (A11) or (A12) can be directly obtained by viewing the VEKM in Figure  A1 that represents ̅ ( ) and seeking solutions of the equation by using the method in (Brown, 1990;A. M. Rushdi and Amashah, 2011). According to this method, we can divide the atoms in the map into four categories, namely: 1) Atoms that do not appear in any map cell, i.e., atoms whose disjunction constitutes (0) (1). These atoms should be nullified as a consistency condition. 2) Atoms that appear in both map cells, i.e. atoms whose disjunction constitutes ̅ (0) ̅ (1). Each of these atoms should be tagged in the -cell by an independent parameter of its own and tagged in the ̅ -cell by the complement of this parameter. Each of these parameters belongs to 2 = {0,1} (and not necessarily to the underlying , which might be a bigger algebra). The disjunction of these atoms tagged by the respective parameters constitutes a part of the sumof-products expression for .
3) Atoms that appear in the -cell but not in the ̅ -cell, i.e. atoms whose disjunction constitutes (0) ̅ (1). Each of these atoms is tagged by a 1 (i.e., remains intact) and is added to the sumof-products expression of . 4) Atoms that appear in the ̅ -cell but not in the -cell, i.e., atoms whose disjunction constitutes ̅ (0) (1). Each of these atoms is tagged by 1 and is not added to the sum-of-products expression of .

Appendix B: Solution of the Boolean Equations in Example 3 (Revisited)
In this Appendix, we use the methods in (Brown, 1990;Rudeanu, 2003;A. M. Rushdi, 2001A. M. Rushdi, , 2012A. M. Rushdi andAmashah, 2011, 2012) to develop parametric (and then particular) solutions of the four equations in Example 3 (revisited). Each of the equations is a consistent equation of two variables that can be written (directly or via complementation) in the form ( 1 , 2 ) = 1, where : 4 2 → 4 , 1 ≤ ≤ 4. The Boolean algebra 4 has two atoms, and ̅, either of which appears twice in the natural map of (1 ≤ ≤ 4) as shown in Table B1. This means that the consistency condition is the identity {0 = 0} and the number of particular solutions is 2 × 2 = 4. We need a single parameter ∈ 4 to produce the orthonormal set of tags { , ̅ } and use these two elements ̅( 0) ̅ (1) ̅( )  1303 of the set to tag the two appearances of each of the atoms and ̅, thereby producing the auxiliary functions (1 ≤ ≤ 4) in Table B1. The final columns of Table B1 list the parametric solutions and then the particular solutions of each equation.