## 5 Constructing Partition of the Set of Terms  
The problem is formulated as the following. It is necessary to find the partition \(\Pi_{F}\) with \(K\) blocks such that relations (26) and (27) take places. The value of \(K\) is determined by (21). In this article, we propose a simple sequential algorithm for solution of this problem. We characterize each term \(F_{h}\in F\) by two sets. The set \(Y(F_{h})\subseteq Y\) includes output functions written in the h-th row of STT. The set \(A(F_{h})\subset A\) includes a state of transition \(a_{s}\in A\) from the h-th row of STT. If \(F_{h}\in F^{k}\), then \(y_{n}\in Y^{k}\) and \(a_{s}\in A^{k}\). Of course, the set \(\Phi^{k}\) is determined by the codes \(K(a_{s})\) of states \(a_{s}\in A^{k}\). We use two evaluations in this algorithm. The evaluation \(N(F_{h},Y^{k})\) determines how many new output functions will be added to \(Y^{k}\) due to including \(F_{h}\) into \(F^{k}\). We determine these evaluations as the following:  
\[N(F_{h},Y^{k})=|Y(F_{h})\setminus Y^{k}|. \tag{39}\]  
\[N(F_{h},A^{k})=|A(F_{h})\cap A^{k}|. \tag{40}\]  
There are \(\Delta_{Z}\) insignificant assignments of variables \(z_{r}\in Z\):  
\[\Delta_{Z}=2^{S_{L}}\cdot K-H. \tag{41}\]  
They could be used for minimizing function (34) and (35). We propose to distribute terms evenly among \(K\) groups. It corresponds to the vector \(\Delta=\langle\Delta_{1},\Delta_{2},\ldots,\Delta_{K}\rangle\). Therefore, each class \(F^{k}\in\Pi_{F}\) includes \(H_{k}\) elements, where:  
\[H_{k}=2^{S_{L}}-\Delta_{k}\quad(k\in\{1,\ldots,K\}). \tag{42}\]There are two stages in generating each block \(F^{k}\in\Pi_{F}\). Let \(k-1\) blocks be constructed. At the first stage, we should choose the basic element (BE) \(F_{h}\in F^{*}\), where there is \(F^{*}=F\setminus\{F^{1}\cup,\ldots,\cup F^{k-1}\}\). The term \(F_{h}\) is a BE of \(F^{k}\) if it satisfies to the following relation:  
\[|Y(F_{h})|=max|Y(F_{j})|,\quad F_{j}\in F^{*}\setminus\{F_{h}\}. \tag{43}\]  
If the condition (43) is true for terms \(F_{i}\) and \(F_{j}\), the we choose the term \(F_{j}\) where \(i<j\). The second stage has \(H_{k}-1\) steps. At each step, we should choose the next element of \(F^{k}\). To do it, we use the following approach. Let us form a set \(P(F^{k})\) including terms \(F_{h}\in F^{*}\) such that \(Y(F_{h})\cap Y^{k}\
eq\emptyset\). Let us select a term \(F_{h}\in P(F^{k})\) such that  
\[N(F_{h},F^{k})=max(|Y(F^{k})\cup Y(F_{h})|-N(F_{h},Y^{k})). \tag{44}\]  
If more than a single term satisfies to (44), then we should choose the term with the following property:  
\[N(F_{h},A^{k})=1,\quad F_{h}\in P(F^{k}). \tag{45}\]  
If there are several terms with the property (45), we choose a term with the less value of \(h\). Next, we should make \(P(F^{k})=\emptyset\) and eliminate the term \(F_{h}\) from \(F^{*}\). The constructing \(F^{k}\) is terminated if: (1) all terms are already distributed \((F^{*}=\emptyset)\) or (2) there are \(H_{k}\) elements in \(F^{k}\in\Pi_{F}\). Let us discuss an example of creating the partition \(\Pi_{F}\) for Mealy FSM \(S_{1}\). Let it be \(S_{L}=3\). Using (21) gives \(K=3\). Using (41) gives \(\Delta_{Z}=24-20=4\). Let us form the vector \(\Delta=\langle 2,1,1\rangle\). It gives \(H_{1}=6\), \(H_{2}=H_{3}=7\). The process is shown in Table 3.  
Let us explain columns of Table 3. There are terms \(F_{h}\) in the column \(h\). The column \(N(F_{h})\) contains the numbers of output functions in terms \(F_{h}\). There are basic elements of \(F^{1}\) and \(F^{2}\) shown in columns BE1 and BE2, respectively. The symbol \(I\) stands for (39), the symbol \(II\) for (40). The sign \(\oplus\) means that a particular term is chosen as a basic element. The sign \"\(-\)\" means than \(F_{h}\
otin F^{*}\). The sign \"\(+\)\" means that the corresponding term is included into the class \(F^{k}\). There are terms \(F_{h}\in F^{k}\) in the row \(F^{k}\). They are shown in the order of their selection.