Utilization of Karnaugh Maps in Multi-Value Qualitative Comparative Analysis

A recent debate in the literature of Qualitative Comparative Analysis (QCA) concerns the potentials and pitfalls of the multi-value variant (mvQCA) in comparison with the more established crisp-set QCA (csQCA) and fuzzy-set QCA (fsQCA) variants. So far, the mvQCA methodology has been implemented either algebraically or via specific software tools such as TOSMANA. The main goal of this paper is to enhance the mvQCA methodology through the utilization of several varieties of Karnaugh maps including (a) the Conventional Karnaugh Map (CKM), (b) the Multi-Valued Karnaugh Map (MVKM), and (c) the Variable-Entered Karnaugh Map (VEKM). The paper offers a tutorial exposition of each of these maps in terms of two recently-published problems concerning the legal provision (introduction) and implementation of party bans in sub-Saharan Africa. Results obtained via various map techniques agree exactly among themselves, and are generally more compact than those obtained earlier via elementary algebraic manipulations, or even via software tools. We show, by way of example, that coding multi-valued variables by binary ones has a harmful primary effect of increasing the input domain. This effect is partially counterbalanced by a (contrarily to common belief) beneficial secondary effect of introducing genuine don’t-care configurations. We also address the issue of unresolved contradictory configurations, and propose two strategies to cope with them. The maps used tackle seven binary variables (or their equivalent), a number beyond the typical map limit of six variables. They are used to produce not only the minimal sum of a Boolean function but the complete sum as well. Though this paper is basically intended as a contribution to mvQCA methodology, it is also of significant utility in any field that demands the use of the Karnaugh map. It serves as a unification/exposition of three fundamental variants of the map, and has a definite pedagogical advantage for the wide spectrum of map users. KeywordsMulti-value qualitative comparative analysis, Conventional Karnaugh map, Multi-valued Karnaugh map, Variable-entered Karnaugh map, Prime implicants, Minimal sum, Complete sum.


Introduction
The method of Qualitative Comparative Analysis (QCA), introduced by Ragin et al. (1984) and Ragin (1987), is now the leading method for detecting non-random systematic patterns and causal paths concerning social, political, economic, managerial and engineering phenomena (Jordan et al., 2011;Kan et al., 2016). This method has branched into several threads and variants. Most prominent among these variants is the initial variant, viz., the crisp-set QCA (csQCA), as well as the fuzzy-set QCA (fsQCA) and the multi-value QCA (mvQCA). The two variants of csQCA and fsQCA seem to be more established than the mvQCA variant. Recently, Vink and van Vliet (2009) have raised certain criticisms against mvQCA, which sparked a heated debate (Thiem, 2013;Vink and van Vliet, 2013) about the potentials and pitfalls of mvQCA. We join this debate in support and defense of mvQCA, showing not only that many of the criticisms against it are not justified, but also that some of the arguments in its favor can be enhanced. We argue that the current methodologies (Rohlfing, 2012) used for implementing mvQCA, including Boolean-algebraic techniques and existing computer codes lack visibility, insight and possibly exactness or optimality. To remedy this situation, we suggest the implementation of mvQCA via the Karnaugh-map One of the important issues discussed herein is the question of expanding the input space when binary variables are used to encode multi-value ones. For each of the two problems considered herein, the input domain has three ternary or trinary (three-valued) variables and a single binary variable and hence possesses 3*3*3*2 = 54 configurations. When each ternary variable is coded by two binary variables, the input domain is expanded to have 7 binary variables and subsequently 2 7 = 128 configurations. This expansion in the input domain is the primary consequence of coding multi-valued variables by binary variables, which can be viewed as a switching from mvQCA to csQCA. Once this expansion takes place, one realizes that the expansion is due to the introduction of unused configurations that never happen, and hence can be arbitrarily assigned don't-care values. The use of don't-cares in the extra input space is a secondary and beneficial effect, rather than a primary and harmful one.
We stress that the act of switching from the mvQCA representation to the csQCA one seems a matter of taste and convenience. The increase of the input domain from 54 configurations to 128 ones is inadvertent indeed, but its harm is diluted (rather than aggravated) by having the extra 74 cells with don't-care entries. The appearance of these don't-cares is not a disadvantage (as claimed by Thiem (2013)) but is something to welcome as it facilitates the minimization process and partially compensates for or counterbalances the inconvenience caused by the larger domain size.
Another issue of concern here is that of contradictions (Marx and Duşa, 2011), which were identified by the symbol C* in Tables 3 and 4 of Hartmann and Kemmerzell (2010). These contradictions should have been handled or resolved according to the standard guidelines of Rihoux and de Meur (2009), but instead were kept unresolved. We will retain the C* symbols in our work in an attempt to reproduce the results of Hartmann and Kemmerzell (2010). Moreover, we will consider our outcomes to be of three values {0, 1, C*} instead of just two values {0, 1}, and hence produce symbolic algebraic expressions that faithfully describe our current state of incomplete knowledge, i.e., without resolving contradictions. We do not belittle the importance of contradiction resolution. Nor do we suggest our faithful description as a replacement or substitute for it. We just offer the best we can do to handle the status quo, instead of keeping idle in anticipation of the (might be long-awaited for) resolution of contradictions. In summary, we note that when contradictions are resolved the map entries will not include C*s and will consist solely of 1's and 0's (and, of course, d's, which are 1's or 0's, anyhow). However, we work herein under the assumption that contradictions have not yet been resolved, so that the outcome has three values {0, 1, C*} rather than two {0, 1}. Hence, we produce formulas for [1] (representing the case when is definitely asserted with all contradictions assumed to take the opposite value of 0, [0] (representing the case when is definitely negated with all contradictions assumed to take the opposite value of 1), and [ * ] (representing unresolved contradictory configurations). We understand that the formulas [1] and [0] are lower bounds on the true [1] and [0] (which can result only after resolving all contradictions), i.e.
As an alternative (albeit tedious) strategy, we can distinguish contradictory configurations by calling them C1*, C2*, C3*, …. and so on. Then we obtain expressions for [1] and [0] for each possible combination of values for these contradictions.
The organization of the rest of this paper is as follows. Section 2 describes the two party-ban problems and provides a pertinent list of notation. Section 3 discusses the use of the Conventional Karnaugh Map (CKM) in mvQCA from the perspective of the two party-ban problems. Section 4 utilizes the Multi-Value Karnaugh Map (MVKM) to recover the results of Section 3, while Section 5 repeats the same using the Variable-Entered Karnaugh Map (VEKM). Section 6 explores utilizing the VEKM variant of the map for deriving the complete sum (rather than the minimal sum) of the pertinent two-valued Boolean function. Section 7 concludes the paper.

List of Notation
The following list of notation is adapted from Tables 1 and 2 of Hartmann and Kemmerzell (2010). The list introduces two output variables B I and B 2 as well as five input variables C, F, T, R, and V. For each of the ternary variables ( , , and ), we use a two-bit binary coding in which is replaced by a pair of binary variables { 1 , 0 } such that where the case 1 0 is forbidden or don't care (d), i.e.
This coding is demonstrated by the double map labeling in Fig. 1. One labeling indicates that the three-valued is now apparently four-valued {0, 1, 2, d}. Another labeling indicates the domain where each of the binary variables 1 and 0 is asserted, i.e., equal to 1. The binary variable 1 is asserted (1) in the two rightmost cells of the map and negated (0) in the two leftmost cells (The complementary variable 1 ̅̅̅ is asserted (1) in the two leftmost cells and negated (0) in the two rightmost cells). Likewise, the binary variable 0 is asserted (1) in the two middle cells and negated (0) in the two extreme cells (The complementary variable 0 ̅̅̅ is asserted (1) in the two extreme cells, and negated (0) in the two middle cells). Note that a value d for is fictitious as it never happens. In fact, has solely three realistic values: {0}: which is uniquely represented in binary terms as 1 ̅̅̅ 0 ̅̅̅ , {1}: which is represented as either 1 ̅̅̅ 0 or as 0 . These two values happen to be equivalent since

Conventional Karnaugh Maps
Fig. 2 is a 7-variable map representation of (introduction of party bans). It is a reproduction of Table 3 in Hartmann and Kemmerzell (2010), with a single binary variable and with three ternary variables , and being replaced by pairs of binary variables { 1 , 0 }, { 1 , 0 } and { 1 , 0 } according to the scheme of equations (2). This 7-variable map can be viewed as a map of 4 variables 1 , 0 , 1 and 0 with 16 cells, such that each cell is in turn a map of 3 variables 1 , 0 and . Two kinds of don't cares appear in Fig. 2, those corresponding to lines missing in the original table, and those resulting from coding ternary variables by binary ones. In drawing loops in Fig. 2, it is mandatory to cover every cell entered by 1, optional to cover any cell entered by d, and prohibitive to cover any cell entered by 0 (including the C* cell which is assumed 0 for the time being). Once a 1-cell is covered, it is changed immediately to a d-cell, i.e., its coverage becomes optional rather than mandatory. In other words, an original 1-cell must be covered at least once and could be covered more than once. The 1-cell marked by the + sign as 1+, has a single neighboring 0-cell (again marked by the + sign as 0+). Hence, the largest loop to cover this 1-cell might cover its other 6 neighboring cells, and hence could be of 2 6 = 64 cells. Such a loop is possible to construct (it contains only 1's and d's and does not contain any 0), and hence is called an essential prime implicant for {1}. This loop is the single-literal loop in Fig. 1. It is called prime since it cannot be included in a larger loop, and it is called essential since it is the only prime loop to cover the cell marked as 1+. Note that this loop covers many other 1-cells allowing us to stop worrying about covering them. Likewise, the 1-cell marked as 1-has a single neighboring 0-cell marked 0-, and it is possible to cover it by another essential prime implicant loop, namely 0 . Now, the 1-cell 1 ̅̅̅ 0 ̅̅̅ 1 ̅ 0 1 0 ̅̅̅ marked as 1◊ has one neighboring non-asserted cell (the C* cell), so its largest candidate covering loop is the 64-cell loop 1 ̅̅̅ . Such a loop is impossible to construct since it contains some 0-cells and one must settle for a smaller loop that is at best, one half of it. The candidate half loops of 1 ̅̅̅ are 1 ̅̅̅ 0 ̅̅̅ , 1 ̅̅̅ 1 ̅ , 1 ̅̅̅ 0 ̅̅̅ , 1 ̅̅̅ , 1 ̅̅̅ 1 , 1 ̅̅̅ 0 . Out of these, each of the last two is possible to use as it contains no 0-cells. They stand on equal footing, since they are of the same size, and each of them covers a single extra yet uncovered 1-cell (the cell above the 1◊ cell). We arbitrarily choose the last one 1 ̅̅̅ 0 as a non-essential prime implicant. Finally, the 1-cell 1 0 ̅̅̅ 1 ̅ 0 1 0 ̅̅̅ ̅ marked as 1• has a single neighboring non-asserted cell (the C* cell), so its largest covering candidate loop is the 64-cells loop ̅ . Such a loop is not valid as it contains some 0-cells. Its six half loops are 0 ̅̅̅ ̅ , 1 ̅ ̅ , 0 ̅̅̅ ̅ , 1 ̅ , 0 ̅ , and 1 ̅ . Out of these each of the last three contains Domain of X{2} is either no 0-cells and we arbitrarily choose to take the last one ( 1 ̅ ) as a non-essential prime implicant. Our final minimal solution is This can be rewritten as The above discussion shows that the minimal sum in (4a) or (4b) is one out of six equivalent minimal sums. The solution reported in Hartmann and Kemmerzell (2010) is which is obviously in error since {0,1} covers three 0-cells in Fig. 2. In fact, these cells correspond to the set of countries{Botswana + Mauritius, South Africa, Zimbabwe} which Table 3 in Hartmann and Kemmerzell (2010) clearly assigns as input = 0 and an output = 0. In passing, we stress that we used the subscript in {1} to indicate that we are getting a lower bound for {1} since we assume the single C* value is 0. If, instead, this value is set to 1, we obtain the following upper bound {1} of {1}, which is a unique minimal sum consisting solely of essential prime implicants:  Table 4 rather  than Table 3 of Hartmann and Kemmerzell (2010) and hence represents 2 (implementation of party bans) rather than 1 , and (b) it replaces the ternary input variable by another . Now we want to find 2 {1} in Fig. 3 under the assumption C1* = C2* = C3* = 0. Map minimization yields or equivalently The expression (7a) comprises one essential prime implicant C 0 ̅̅̅ R 1 together with two non-essential prime implicants C 1 V and C 1 F 1 ̅̅̅ R 0 ̅̅̅̅ . We have assigned special labels to the 1-cells C 1 ̅̅̅ C 0 ̅̅̅ F 1 F 0 ̅̅̅ R 1 R 0 ̅̅̅̅ V ̅ , C 1 C 0 ̅̅̅ F 1 ̅̅̅ F 0 R 1 ̅̅̅̅ R 0 V and C 1 C 0 ̅̅̅ F 1 ̅̅̅ F 0 ̅̅̅ R 1 ̅̅̅̅ R 0 ̅̅̅̅ V ̅ , and their neighboring 0-cells to help the reader verify our findings (in a way similar to the one we did for Fig. 2). The corresponding solution of the Hartmann and Kemmerzell (2010), in this case is correct and almost minimal as it differs slightly from (7b)  (8) Fig. 2. A representation of (introduction of party bans) by a 7-variable CKM, a translation of Table 3 in Hartmann and Kemmerzell (2010), with prime implicant loops covering the asserted part { } of . Here we assume C* = 0, and hence we obtain a lower bound { } of

Multi-Valued Karnaugh Maps
There are many ways to handle multi-valued logic visually (Bahraini and Epstein, 1988;Ali et al., 1996;Ghiye et al., 2014). We have chosen to do so via the multi-valued Karnaugh map that appears in Figs. 4-8. Fig. 4 is a 4-variable multi-valued map that seems to be almost a replica of the 7variable conventional map in Fig. 2, with a considerable reduction in size due to the omission of extraneous don't-care combinations that were inadvertently added during the coding process. The loops in Fig. 4 are exactly those in Fig. 2, and hence the result (4b) for B 2l {1} is reproduced directly (without a need for (4a) as an intermediary).
Similarly, we reproduce in Fig. 5 a multi-valued version of the conventional map in Fig. 3 representing B 2 (implementation of party bans). Again, the multi-valued version is significantly smaller with the omission of the extraneous or fictitious don't-care configurations. Under the assumption that C1* = C2* = C3* = 0, we construct loops that are identical to those in Fig. 3, thereby reproducing the formula for B 2l in (7b), again bypassing any need for (7a). However, we might choose to replace the term C{2}V{1} by the term C{1,2}V{1} which corresponds to a larger and encompassing loop (shown dotted) in Fig. 5. Note that in Fig. 3 there is an absolutelyeliminable all-d prime implicant loop C 0 V 1 which is not included in (7a), and which might be used to account for the possibility of employing the C{1,2}V{1} variant in Fig. 5 Fig. 6 is a multi-valued map for B I in which C* is assumed 1, so as to get a lower bound B Il {0} for B I {0}. As the figure indicates, this bound is either Fig. 4. A multi-valued-Karnaugh-map representation of (introduction of party bans), a translation of Table 3 in Hartmann and Kemmerzell (2010), with loops covering the prime implicants of the asserted part { } of assuming C* = 0  Table 4 in Hartmann and Kemmerzell (2010), with loops covering the prime implicants of the asserted part { }, assuming C1* = C2* = C3* = 0 in agreement with Hartmann and Kemmerzell (2010). The true {0} and {1} are exhaustive in the sense that they jointly cover all non-forbidden configurations, i.e.,  6. A multi-valued-Karnaugh-map representation of (introduction of party bans), a translation of Table 3 in Hartmann and Kemmerzell (2010) Next, we present 2 (implementation of party ban) by the multi-valued map in Fig. 7 in which we assume C1* = C2* = C3* = 1, and hence obtain a minimal result for 2 {0} as The effect of our ignorance of the contradictory values C1*, C2* and C3* (together with our current inability to resolve these contradictions) cannot be mitigated by arbitrarily assigning specific values to them. However, we can overview the whole picture if we exhaust all such specific assignments. This is exactly what Table 1 does, since it shows formulas for 2 {0} and 2 {1} for the eight possible combinations of C1*, C2* and C3*. Note that when we set C1*= C2* = C3* = 0, we get a lower bound for 2 {1} and an upper bound for 2 {0}, while the assignment C1*= C2* = C3* = 1 produces an upper bound for 2 {1} and a lower bound for 2 {0}. For comparison, the answer given by Hartmann and Kemmerzell (2010) is which is correct but obviously far from minimal. Now, we express 2 { * } simply by writing the minterms covering the three * , namely Again, we do not want to spread contradictions. So, we have not tried to cover adjacent don't cares to minimize our expression. For comparison, Hartmann and Kemmerzell (2010) obtained the correct minimal formula.  Fig. 7. A multi-valued-Karnaugh-map representation of (implementation of party bans), a translation of Table 3 in Hartmann and Kemmerzell (2010), with loops covering the prime implicants of the negated part { } of , assuming C1*= C2* = C3* = 1

Variable-Entered Karnaugh Maps
The Variable-Entered Karnaugh Maps (VEKM) have a long history of being used as a tool for increasing the variable-handling capability of Karnaugh maps (Rushdi 1983;1985;, or as natural maps for 'big' Boolean algebras (Brown, 1990;Rushdi and Amashah, 2011). They have been known in the literature under a variety of other names such as variable-entered maps (Fletcher 1980), K-maps within K-maps or reduced Karnaugh maps (Vingron, 2004;, truth tables with distributed simplification (Rathore, 2014), or basic maps with eliminated variables (Rathore and Jain, 2014). Figs. 8 and 9 demonstrate two VEKMs for 1 and 2 which are compact versions of Figs. 2 and 3. Each of these VEKMs use the four variables 1 , 0 , 1 and 0 as map variables and the remaining three variables ( 1 , 0 and ) as entered variables. Fig. 10 demonstrates how a conventional cell in Fig. 3 (namely, the cell 1 ̅̅̅ 0 ̅̅̅ 1 0 ̅̅̅ ) is compacted into the corresponding entered cell in Fig. 9. Using well-known techniques for VEKM processing (Rushdi, 1987; Rushdi and Al-   Yahya, 2000;2001a), we were able to reproduce the minimal formulas of the previous two sections. For example, we reproduce Fig. 8 in Fig. 11 with only the asserted and don't-care entries being retained, while the negated and contradictory entries are omitted. However, since Fig. 11 is intended for coverage of {1}, the entries in this figure are made to cover the asserted entries as well as the don't-care entries of Fig. 8. A formula for 1 {1} is immediately obtained as a disjunction of each asserted entered term ANDed with a certain "contribution" of it expressing map loops which cover it (Rushdi, 1987), namely The loops drawn in Fig. 11 suffice to explain how this "weird" formula is reduced and significantly simplified to take the form of Equation (4a). For example, the loop 0 is drawn as a contribution of the entered product 1 ̅ 0 ̅̅̅ ̅ since this product appears (whether asserted or don't-care) in every cell of the loop 0 . After drawing that loop, we find that the term 1 (which is subsumed by the initially-considered term 1 ̅ 0 ̅̅̅ ̅ ) appears (don't-are) within all cells of the loop. According to an "enlargement" rule, the loop is now considered a contribution (1) of 1 rather than a contribution ( 1 ̅ 0 ̅̅̅ ̅ ) of the original term 1 ̅ 0 ̅̅̅ ̅ and hence we modify Equation (14) to replace (1) (1) = (1) 0 = 0 . Note that this loop covers any other asserted term entered within it, since all terms subsume the term 1. Similarly, we draw the two loops 1 and 1 ̅̅̅ 0 to discover that they are also contributions of 1 and hence cause ( 1 ̅ 0 ( 1 ̅ 0 ) ∨ 1 0 ̅̅̅ ( 1 0 ̅̅̅ )) in Equation (14) to be replaced by ( 1 ∨ 1 ̅̅̅ 0 ). The fourth loop in Fig. 11 is the loop 1 which is initially intended as ( 1 0 ̅̅̅ ̅ ) or ( 1 ̅ 0 ̅ ) and ultimately becomes ( ̅ ), thereby adding 1 ( ̅ ) to Equation (14) replacing therein.

The Complete Sum versus the Minimal Sum
So far, we have followed the common QCA practice by using Boolean minimization to obtain the minimal sum of the pertinent output or effect function (Thiem and Duşa, 2013a;2013b;Duşa and Thiem, 2015). This practice is definitely useful since it provides us with a minimal-sum characterization of the function that is as compact as possible. The minimal sum covers the asserted part of the function with as few as possible prime implicants. Each of these prime implicants is a minimally-sufficient cause of the given effect. Non-prime implicants are not included in the minimal sum since they are not minimally-sufficient causes albeit being sufficient ones.    Fig. 3 to an entered one in Fig. 9 by drawing loops for each of the four entities {1, 0, C * , d}. Loops for a specific entity are possibly overlapping, but they must be disjoint with those of other entities Fig. 11. Reading the VEKM in Fig. 8 to obtain formula (4a) Unless the function considered is monotone, the minimal sum typically does not contain all prime implicants (Crama and Hammer, 2011). The disjunction of all prime implicants is called the complete sum (Muroga, 1979), and is known also as the Blake Canonical Form (Brown, 1990). The complete sum informs us explicitly about all minimally-sufficient causes, and hence its role supplements that of the minimal sum which characterizes the function but does not exhaust all minimally-sufficient causes. In computing the complete sum all don't-care configurations are considered asserted. There are many algorithmic ways to compute the complete sum (Muroga, 1979;Brown, 1990;Rushdi and Al-Yahya, 2001b;Rushdi et al., 2015a;2015b). The CKM is not particularly convenient for computing the complete sum (Muroga, 1979) since it is possible that some prime implicants might be overlooked. However, the VEKM allows an algorithm called VEKM folding for obtaining all prime implicants (Rushdi and Al-Yahya, 2001b). We reproduce the VEKM for in Fig. 8 as shown in Fig. 12 by omitting negated and contradictory entries, asserting all don't-care entries and casting all the final entries into complete-sum form. The new VEKM in Fig. 12 Equation (19) list fifteen prime implicants for {1}. Out of these, the first four were included in the minimal sum (4a), and the next three were mentioned while deriving (4a). The remaining eight prime implicants were not immediately evident from the CKM in Fig. 2. However, they can be easily verified once discovered. Take for example, the prime implicant 1 ̅ = {2} {0}. It covers each of the two top left cells in every interior 8-cell map of 1 , 0 and that is within a cell of the exterior 16-cell map of 1 , 0 , 1 , 0 . Furthermore, this implicant is indeed prime; it cannot be enlarged to 1 (because of the * cell) or to ̅ (due to the 0 cells). Our verification of the 1 ̅ = {2} {0} prime implicant can even be taken back to the Table 3

Conclusions
We demonstrated the utility and equivalence of three versions of Karnaugh maps (CKMs, MVKMs, and VEKMs) in solving minimization problems of multi-value Qualitative Comparative Analysis (mvQCA). We have herein given a large weight to on our favorite version, namely the MVKM version, which is the most compact, and perhaps, easiest to understand (albeit least familiar) version. However, we tried to render due justice to the CKM version by showing that its disadvantages of increasing the input domain is (at least partially) counterbalanced by utilization of the don't-cares that appear in the extra domain. We also gave a glimpse of VEKMs and stressed their potential utility in problems involving a larger-than-usual number of variables. We also addressed the issue of contradictions, and suggested ways to live with them if it is not possible to resolve them beforehand. Finally, we pointed out the importance of obtaining all the prime implicants of the pertinent Boolean function, and demonstrated the utility of the VEKM in achieving that purpose.