## 4 TKIFRPM Approach
### Computational Complexity  
The frequent pattern mining approach is comprised of candidate set generation and the support for finding of candidates. The more candidate set generation is performed, the more time is consumed for their support calculation. For the support finding operation of the candidate itemsets, the TKIFRPM performs TIDs intersection of two sets of TIDs. The TKIFRPM completes one TID intersection in \(nlogn\) time. As it performs a binary search to find whether the TID exist in another set or not, this operation requires \(nlogn\) time for finding one TID. If the total number of transactions received are \(m\) (maximum TIDs received), then the total number of operations required to complete one support calculation operation is \(m(nlogn)\). The TKIFRPM will create maximum \(2^{n}\) nodes in the worst case (i.e., to find all frequent itemsets in K) scenario, where \(n+1\) nodes will not be needed in the support calculation operations. Therefore, the total number of nodes to be created will be \(2^{n}-(n+1)\). Thus, the total number of operations required for frequent regular pattern mining in the worst case will be \(((2^{n}-(n+1))^{\star}m\) (\(nlogn\))), and it will be the same for every case of mining when the mining operation \"Gen_top_KIFRs\" is performed on the data received from the ISI-tables. In every case, \(m\) transaction will be received in transaction buffer \(T_{b}\), and if every transaction contains \(n\) items, four constant time operations will be required to be completed. Thus, the time required to complete all operations in updating ISI-tables will be \(4 mn\). The binary search or merge-sort is performed for enforcing order on the items and will require \(nlogn\) time. Thus, the total time required to update the ISI-tables will be \(4 mn+nlogn\), and the time required for selecting K itemsets for mining will be \(n\). Therefore, the total time taken or the computational complexity of the TKIFRPM is shown in Equation (5), as follows:  
\[Computational\ Complexity=\{((2^{n}-(n+1))*m(nlogn))+4 mn+nlogn+n\} \tag{5}\]  
\begin{tabular}{l l} \hline \hline Input & \\ K: & Topmost-K regular frequent itemsets \\ \(F_{l+1}\): & New frequent pattern extended with highest support item from \(C_{l}\) \\ \(C_{l+1}\): & Set of candidate items found frequent with the frequent pattern \(F_{l+1}\) \\ \(F_{l}\): & Frequent pattern or head portion of the parent node \\ \(C_{l}\): & Candidate itemset list of parent node \\ \(\theta_{r}\): & User-given regularity threshold \\ \(\theta_{s}\): & Support threshold \\ \(P\): Possible candidate set \\ (1) Foreach \(x\in C_{l}\) \\ (2) \(F_{l+1}=F_{l}\ U\ \left\{\ x\right\}\) \\ (3) \(TK_{-}IFRs=TK_{-}IFRs\ U\ F_{l+1}\) \\ (4) \(\theta_{s}=\min\_support(TK_{-}IFRs\ )\) \\ (5) \(P=\left\{\ i\ :\ i\in C_{l}\ and\ support(i)\leq support(x)\right\}\) \\ (6) \(C_{l+1}=\varnothing\) \\ (7) Foreach \(y\in P\) \\ (8) & If \((support\ (F_{l+1}\ U\ y)\geq\theta_{s}\ and\ \mathrm{Periodicity}\ (F_{l+1}\ U\ y)\leq\theta_{r}\ )\) \\ (9) & \(C_{l+1}=C_{l+1}U\ y\) \\ (10) Gen\_Top-k\_IFRs (\(F_{l+1}\), \(C_{l+1}\), \(l\), \(\theta_{r}\), \(\theta_{s}\), \(TK_{-}IFRs\)) \\ \hline \hline \end{tabular}