3.1. Quine-Mc Cluskey Algorithm for the Minimization of Partial Multi-Valued Logical Functions
In the case of logic trees, the logical values of the variables are encoded on the branches of the tree. There can only be one Boolean variable per level of the tree, with the number of floors being equal to the number of independent variables of a given Boolean function. Representing a given Boolean function written in canonical alternative normal form (KAPN) on a logic tree involves encoding the individual canonical products on a tree path from the root to the end vertex. An individual path on the tree (from root to vertex) is a component of the singularity of the logical function, describing the realization of one possible solution. On the contrary, the set of paths is the set of all possible solutions.
Figure 4 shows a logic tree in which a fixed Boolean function of three variables is encoded.
In the Quine–McCluskey algorithm, a truncated alternative normal form (SAPN) and eventually a minimum alternative normal form (MAPN) are obtained by simplifying the Boolean functions encoded in KAPN (
Figure 5).
A minimized form of the output function (with a minimum number of literals) is subsequently obtained. However, given that so-called isolated branches exit, this is not the minimum decision form, meaning that there is no continuity between the root and the vertices. In the case of multi-valued logical functions—as in Boolean functions—the notions of incomplete gluing and elementary absorption, which are applied to the APN of a given logical function, play a fundamental role in the search for prime implicants.
A
gluing operation is called a transformation:
where
and
denotes an elementary partial product, of which, variables of the individual literals belong to the set
.
An
incomplete gluing operation is called a transformation:
where
and
denotes a partial product of which the variables of the individual literals belong to a set of
.
An elementary absorption operation is called a transformation:
where
and
denotes a partial product of which the variables of the individual literals belong to a set of
. If the above equation holds, then A absorbs
. Signs (v) denote that a given partial product of the elementary, written using the digits of the system
-positional, takes part in the gluing with those products that have a sign (v) in the same column. The notation marks of the gluing operation are entered separately in the columns and not in a single column as was the case in previous literature studies of bivalent cases. In the case of equal, multivalued variables
of a given logical function, the set of first implicants is obtained as a special case from different multi-valued variables.
Example 1. Using the relationship:
where, The successive steps of minimizing a multi-valued logical function can be represented as follows:
0 | 2 | 0 | | | | | 0 | 2 | - | | | | | | | | |
1 | 0 | 1 | | | | | 2 | 0 | - | | | | | | | | |
2 | 0 | 0 | | | | | 1 | - | 1 | | | | | | | | |
0 | 2 | 1 | | | | | 2 | 1 | - | | | | | | | | |
1 | 1 | 1 | | | | | - | 2 | 1 | | | | | | | | |
2 | 0 | 1 | | | | | 2 | - | 1 | | | | | | | | |
2 | 1 | 0 | | | | | | | | | | | | | | | |
0 | 2 | 2 | | | | | | | | | | | | | | | |
1 | 2 | 1 | | | | | | | | | | | | | | | |
2 | 0 | 2 | | | | | | | | | | | | | | | |
2 | 1 | 1 | | | | | | | | | | | | | | | |
2 | 1 | 2 | | | | | | | | | | | | | | | |
2 | 2 | 1 | | | | | | | | | | | | | | | |
| 020 | 200 | 101 | 021 | 201 | 210 | 111 | 022 | 121 | 202 | 211 | 212 | 221 |
02- | ∗ | | | ∗ | | | | ∗ | | | | | |
20- | | ∗ | | | ∗ | | | | | ∗ | | | |
1-1 | | | ∗ | | | | ∗ | | ∗ | | | | |
21- | | | | | | ∗ | | | | | ∗ | ∗ | |
-21 | | | | ∗ | | | | | ∗ | | | | ∗ |
2-1 | | | | | ∗ | | | | | | ∗ | | ∗ |
Finally, two NAPNs and MAPNs of a given logic function are obtained, written using m-position system numbers: {(02-), (20-), (1-1), (21-), (-21)} and {(02-), (20-), (1-1), (21-), (2-1)}.
The rank of importance of successive decision variables is determined using complex alternative normal forms through the swapping of floors in logical decision trees. The swapping of logical tree floors in complex, multi-valued logical functions establishes the rank of importance of logical variables from the most important (at the root) to the least important (at the top). There is a generalization of a bivariate quality indicator to a multivariate one; (Ck − kimi) + (ki + Ki), where Ck represents the number of branches of the k-th floor, ki is the simplification factor on the k-th floor of the mi-value variable, and Ki represents the number of branches (k − 1)-th floors from which the non-simplifying branches of the k-th floor are formed. In this way, it is possible to obtain the minimum complexity alternative normal form (MZAPN) of a given logical function without isolated branches on the decision tree and with a concomitant minimum number of real (realizable) branches, which in particular can be considered to be elementary design guidelines. All transformations refer to the so-called Quine—McCluskey algorithm for minimising individual partial multi-valued logical functions.
Example 2. A multi-valued logical function f(x1, x2, x3), where x1, x2and x3are 0, 1 and 2, respectively; with a numerically recorded KAPN: 100, 010, 002, 020, 101, 110, 021, 102, 210, 111, 201, 120, 022, 112, 211, 121, 212, 221 and 122; and with one MZAPN after applying the Quine—McCluskey algorithm for minimising individual partial multi-valued logical functions has 13 literals:
Figure 6 shows all possible ZKAPNs of a given multi-valued logical function.
| | V | | | | | | | | | |
x1 | x2 | x3 | | | | | | | | | |
1 | 0 | 0 | | V | | | | | | | |
0 | 1 | 0 | | | | | | V | | | |
0 | 0 | 2 | | | | | | | V | | |
0 | 2 | 0 | V | | | | | | | | |
1 | 0 | 1 | | V | | | | | | | |
1 | 1 | 0 | | | V | | | | | | |
0 | 2 | 1 | V | | | | | | | | |
1 | 0 | 2 | | V | | | | | | | |
2 | 1 | 0 | | | | | V | | | | |
1 | 1 | 1 | | | V | | | | | | |
2 | 0 | 1 | | | | | | | | V | |
1 | 2 | 0 | | | | V | | | | | |
0 | 2 | 2 | V | | | | | | | | |
1 | 1 | 2 | | | V | | | | | | |
2 | 1 | 1 | | | | | V | | | | |
1 | 2 | 1 | | | | V | | | | | |
2 | 1 | 2 | | | | | V | | | | |
2 | 2 | 1 | | | | | | | | | V |
1 | 2 | 2 | | | | V | | | | | |
- 2.
The first stage of minimization due to x1:
v | | | | | | | | | | | |
x1 | x2 | x3 | | | | | | | | | |
1 | 0 | 0 | | | V | | | | | | |
0 | 1 | 0 | V | | | | | | | | |
0 | 0 | 2 | | | | V | | | | | |
0 | 2 | 0 | | | | | V | | | | |
1 | 0 | 1 | | | | | | V | | | |
1 | 1 | 0 | V | | | | | | | | |
0 | 2 | 1 | | V | | | | | | | |
1 | 0 | 2 | | | | V | | | | | |
2 | 1 | 0 | V | | | | | | | | |
1 | 1 | 1 | | | | | | | V | | |
2 | 0 | 1 | | | | | | V | | | |
1 | 2 | 0 | | | | | V | | | | |
0 | 2 | 2 | | | | | | | | V | |
1 | 1 | 2 | | | | | | | | | V |
2 | 1 | 1 | | | | | | | V | | |
1 | 2 | 1 | | V | | | | | | | |
2 | 1 | 2 | | | | | | | | | V |
2 | 2 | 1 | | V | | | | | | | |
1 | 2 | 2 | | | | | | | | V | |
- 3.
The first stage of minimisation due to x2:
| v | | | | | | | | | | |
x1 | x2 | x3 | | | | | | | | | |
1 | 0 | 0 | V | | | | | | | | |
0 | 1 | 0 | | | | | V | | | | |
0 | 0 | 2 | | | | | | V | | | |
0 | 2 | 0 | | | | | V | | | | |
1 | 0 | 1 | | V | | | | | | | |
1 | 1 | 0 | V | | | | | | | | |
0 | 2 | 1 | | | | | | | V | | |
1 | 0 | 2 | | | V | | | | | | |
2 | 1 | 0 | | | | | | | | V | |
1 | 1 | 1 | | V | | | | | | | |
2 | 0 | 1 | | | | V | | | | | |
1 | 2 | 0 | V | | | | | | | | |
0 | 2 | 2 | | | | | | V | | | |
1 | 1 | 2 | | | V | | | | | | |
2 | 1 | 1 | | | | V | | | | | |
1 | 2 | 1 | | V | | | | | | | |
2 | 1 | 2 | | | | | | | | | V |
2 | 2 | 1 | | | | V | | | | | |
1 | 2 | 2 | | | V | | | | | | |
x1: 19 − 2 × 3 + 2 + 7 = 22
x2: 19 − 4 × 3 + 4 + 5 = 16
x3: 19 − 5 × 3 + 5 + 4 = 13
Further minimisation steps for other variables:
| | v | | | | | v | | | | |
| x1 | x2 | | | | | x1 | x2 | | | |
| 0 | 0 | | V | | | 0 | 0 | V | | |
- | 1 | 0 | V | | | - | 1 | 0 | V | | |
| 0 | 1 | | V | | | 0 | 1 | | V | |
- | 0 | 2 | | V | | - | 0 | 2 | | | V |
- | 1 | 1 | V | | | - | 1 | 1 | | V | |
| 2 | 0 | | | V | | 2 | 0 | V | | |
- | 2 | 1 | | | V | - | 2 | 1 | | V | |
- | 1 | 2 | V | | | - | 1 | 2 | | | V |
| 2 | 2 | | | V | | 2 | 2 | | | V |
x1: 9 − 0 × 3 + 0 + 3 = 12
x2: 9 − 1 × 3 + 1 + 2 = 9
3.2. Generalization of the Quine–Mc Cluskey Algorithm for Minimization of Partial Multi-Valued Logical Functions for Multi-Valued Weighting Factors
In multi-valued logical functions with weighted products it is possible to apply the Quine–McCluskey algorithm for the minimization of multi-valued functions. As with the minimization of multi-valued logical functions without weighting coefficients, in the algorithm the elementary products are written as numbers in the corresponding positional systems. Additional elements and operations are introduced to account for the weighting coefficients.
In partial data of multi-valued logical functions n of variables , value-added gluing and pseudo-gluing operations should include weighting factors assigned to the corresponding multi-valued logical products.
The Quine–McCluskey algorithm for minimizing multi-valued logical functions is built from n columns with weighting factors.
Symbols indicating pseudo-gluing (V) and gluing (v) sequentially relative to groups of indices differing by one are placed in the columns corresponding to the values of the weighting factors for the corresponding logical products.
Given multi-valued weighting coefficients, individual (parallel) pseudo-bonding operations sequentially against groups of indices, differing by at least one, and containing at most elements can proceed in canonical products with different weighting coefficients.
The characters appear in different columns. In addition, they may be in columns with a corresponding coefficient . Therefore, the columns with weighting coefficients introduce position numbers , with i = 1,...,n, which is useful for calculating the quality of the minimization in further stages.
Definitions of ‘pure’ and ‘impure’ gluing are introduced for gluing operations of individual partial multi-valued logical functions with weighted coefficients.
Definition 1. The pure gluing operation is the gluing of multi-valued canonical elementary products according to the Quine–McCluskey algorithm with the same weighting factor .
A pure gluing operation is a transformation of:
where
and
represents a partial product of which the variables of the individual literals belong to a set of
. In
n m-value variables, the weighting factor before the partial canonical product takes values in the interval
, with
and
.
Definition 2. The gluing operation according to the Quine–McCluskey algorithm of multi-valued canonical elementary products with different values of weight coefficients is impure gluing.
The impure gluing operation for multi-valued canonical elementary products is performed with respect to the weighting factor with the smallest value, i.e., .
An impure bonding operation is a transformation:
where
,
, and
denotes a partial product of which the variables of the individual literals belong to a set of
. In
n-value variables, the weighting factor
before the partial canonical product takes values in the interval
, with
where
.
Definition 3. An incomplete gluing operation is a transformation that retains the original records to be glued after the algorithm has been executed in the result.
Given that there is an isomorphic interpretation of logical transformations, the Quine– McCluskey algorithm for minimizing individual partial multi-valued logical functions can be considered with the weighting factors mentioned, which is important for describing the rank validity of design guidelines.
Example 3 with weighting factors. In a partial logical function, written numerically in KAPN: 010, 100, 002, 011, 110, 012 and 112, the Quine–McCluskey algorithm for minimizing logical functions with multi-valued weight coefficients yields one MZAPN which has 11 literals of , i.e.,while other ZAPN,,andof a given logical function have 12 and13 literals, respectively. The following are the successive steps in the minimisation of logical functions due to given decision variables:
| | | v | |
wi | x1 | x2 | x3 | wi = 2 | wi = 1 |
1 | 0 | 1 | 0 | | | | | | | V | | | | | |
1 | 1 | 0 | 0 | | | | | | | | | V | | | |
2 | 0 | 0 | 2 | | | | V | | | | | | | | |
2 | 0 | 1 | 1 | V | | | | | | V | | | | | |
2 | 1 | 1 | 0 | | V | | | | | | | | | | |
2 | 0 | 1 | 2 | V | | | | | | V | | | | | |
1 | 1 | 1 | 2 | | | | | | | | V | | | | |
| pi | 1 | 2 | 3 | 4 | 5 | 6 | 1 | 2 | 3 | 4 | 5 | 6 |
| | v | | |
wi | x1 | x2 | x3 | wi = 2 | wi = 1 |
1 | 0 | 1 | 0 | | | | | | | | | V | | | |
1 | 1 | 0 | 0 | | | | | | | V | | | | | |
2 | 0 | 0 | 2 | | V | | | | | | | | | | |
2 | 0 | 1 | 1 | | | | V | | | | | | | | |
2 | 1 | 1 | 0 | V | | | | | | V | | | | | |
2 | 0 | 1 | 2 | | V | | | | | | | | | | |
1 | 1 | 1 | 2 | | | | | | | | | | | V | |
| pi | 1 | 2 | 3 | 4 | 5 | 6 | 1 | 2 | 3 | 4 | 5 | 6 |
| v | | | |
wi | x1 | x2 | x3 | wi = 2 | wi = 1 |
1 | 0 | 1 | 0 | | | | | | | | V | | | | |
1 | 1 | 0 | 0 | | | | | | | | | V | | | |
2 | 0 | 0 | 2 | | | | V | | | | | | | | |
2 | 0 | 1 | 1 | | | | | V | | | | | | | |
2 | 1 | 1 | 0 | | V | | | | | | V | | | | |
2 | 0 | 1 | 2 | V | | | | | | V | | | | | |
1 | 1 | 1 | 2 | | | | | | | V | | | | | |
| pi | 1 | 2 | 3 | 4 | 5 | 6 | 1 | 2 | 3 | 4 | 5 | 6 |
| | | V | |
| wi | x2 | x3 | wi = 2 | wi = 1 |
2(012) | 1- | 1 | 2 | | | | | | | V | | | | | |
2(110) | 1- | 1 | 0 | | | | | | | V | | | | | |
| 2 | 1 | 1 | V | | | | | | | | | | | |
| 2 | 0 | 2 | | V | | | | | | | | | | |
| 2 | 0 | 0 | | V | | | | | | | | | | |
| pi | 1 | 2 | 3 | 4 | 5 | 6 | 1 | 2 | 3 | 4 | 5 | 6 |
| | V | | |
| wi | x2 | x3 | wi = 2 | wi = 1 |
2(012) | 1- | 1 | 2 | | | | | | | V | | | | | |
2(110) | 1- | 1 | 0 | | | | | | | | V | | | | |
| 2 | 1 | 1 | | | V | | | | | | | | | |
| 2 | 0 | 2 | V | | | | | | | | | | | |
| 2 | 0 | 0 | | V | | | | | | | | | | |
| pi | 1 | 2 | 3 | 4 | 5 | 6 | 1 | 2 | 3 | 4 | 5 | 6 |
| | | V | | |
| wi | x1 | x3 | wi = 2 | wi = 1 |
| 1 | 0 | 0 | | | | | | | V | | | | | |
2(110) | 1- | 1 | 0 | | | | | | | | V | | | | |
| 2- | 0 | 2 | V | | | | | | | | | | | |
| 2 | 0 | 1 | V | | | | | | | | | | | |
| 1 | 1 | 2 | | | | | | | | V | | | | |
| pi | 1 | 2 | 3 | 4 | 5 | 6 | 1 | 2 | 3 | 4 | 5 | 6 |
| | V | | | |
| wi | x1 | x3 | wi = 2 | wi = 1 |
| 1 | 0 | 0 | | | | | | | V | | | | | |
2(110) | 1- | 1 | 0 | | | | | | | V | | | | | |
| 2- | 0 | 2 | | | V | | | | | | | | | |
| 2 | 0 | 1 | | V | | | | | | | | | | |
| 1 | 1 | 2 | | | | | | | | | V | | | |
| pi | 1 | 2 | 3 | 4 | 5 | 6 | 1 | 2 | 3 | 4 | 5 | 6 |
Tree interpretation.
Figure 7 shows the MZAPN of the multi-valued logical function from Example 3.
The proposed methodology can be described by the flow chart shown in
Figure 8.
The structuring of the described problem takes into account the methodology of multi-valued logical trees, allowing for the introduction of appropriate formal notations and even making it possible to combine complex quantitative and qualitative features with different degrees of detail according to the principles of a multidimensional morphological array. Therefore, there is no need to extend the generation process to sub-arrays when using a multidimensional morphological array as all information about the varieties of the main and detailed features and their numerous modifications can be immediately stored in this array and marked on the variant tree.
In addition, the morphological and decision tables can be encoded analytically and numerically according to the definitions and theorems of the logic of multi-valued decision processes. This enables a variant way of identifying and classifying information in computer science terms when seeking and modifying solutions in the design process.
In such a situation it is possible to introduce CAD, e.g., for the generation of all theoretical variants of the designed system, selection for realizability, search for realizable solutions and—most importantly—realizable sub-solutions, etc. In order to ensure the stable operation of the actual system, model tests are carried out on the basis of which of the relevant parameters are selected. The phenomena occurring during the flow of a medium are quite often not precisely defined, so it is necessary to identify an analytical model when carrying out such studies.