## 3 Chaotic Activity Filtering Approach Based on Direct Following Relationship
### Indirect Chaotic Activity Filtering  
An alternative to the approach proposed in Algorithm 1 is to filter out certain activities in the event log to reduce the total chaos degree of the log. Define the overall chaos degree of the event log as the sum of the chaos degree of all activities in the event log, that is, \(CH_{i}(L)=\sum_{y\in ActSet(L)}CH_{i}(y)\). Algorithm 2 proposes an algorithm that iteratively filters activities from an event log that results in a significant reduction in log chaos, as opposed to Algorithm 1, which selects activities to filter based on the overall clutter of the log after deleting the activity. By calculating the relationship table among activities corresponding to logs obtained after filtering a certain activity, Algorithm 2 obtains the change degree of the overall chaos degree value of the filtered event log, and identifies the chaotic activities in the event log on the basis of this value. Firstly, the activities are deleted from the input original event log. After each activity is deleted, the relation between activities in the log is re-extracted to form a new relation table. Then, the total chaos degree of the event log after deleting activities is calculated according to the new relation table. The total chaos degree of the log is influenced by various activities in the log, and chaotic activities have a significant impact on the overall level of chaos in event logs, and the main purpose of filtering chaotic activities is to improve the quality of process models by reducing the level of chaos in event logs. Consequently, by calculating the change degree of the total log chaos degree after deleting certain activities, the influence degree of the activity on the total log chaos degree can be obtained, so as to obtain the corresponding activity set that meets the conditions, and then judge whether the activity is chaotic or not through the obtained activity set. In Algorithm 1, four conditions are used to calculate the chaos degree of activities, and in Algorithm 2, condition (4) in Algorithm 1 is deleted from the calculation of the chaos degree of activities. The total chaos degree of the event log L' for the i-th condition after deleting activity \(y\)\(\in\)\(ActSet(L)\) in log \(L\) is defined as \(CH_{i}^{L}(y)\),\(CH_{i}^{L}(y)=CH_{i}(L^{\prime})=CH_{i}(L\uparrow ActSet(L)\backslash\{y\})\). For condition (2), taking activity \(b\) as an example, after deleting activity \(b\), the event log \(L^{\prime}\) is \(L^{\prime}\) = [\(<\)_a,c,d,x,\(>\)_10\({}^{\circ}\),_a,x,c,d_20\({}^{\circ}\), \(<\)_a,c,x,d_ \(>\)_10\({}^{\circ}\)], and the relation between activities is calculated to obtain #(\(<\)_a,c_,\(>\),\(L^{\prime}\)) = 20, #(\(<\)_a,x\(>\),\(L^{\prime}\)) = 20, #(\(<\)_c,d_,\(>\),\(L^{\prime}\)) = 30, #(\(<\)_c,x\(>\),\(L^{\prime}\)) = 10, #(\(<\)_a,c\(>\),\(L^{\prime}\)) = 20, and #(\(<\)_a,c\(>\),\(L^{\prime}\)) = 10. Thus the corresponding relation tables are obtained, and using the relation tables to calculate, {\(CH_{2}(a)\) = 0,\(CH_{2}(c)\) = 1, \(CH_{2}(d)\) = 1,\(CH_{2}(x)\) = 2} is obtained, so we get \(CH_{2}^{L}(b)\) = 4. This calculation is performed for all of the activities in the original log, and the results related to each activity are obtained. The average value of all of the results is obtained. In this original log, the average value is 3.6. The calculated result of activity \(x\) is less than the average value, so it is judged that the candidate chaotic activity is \(x\). For condition (3), taking activity \(a\) as an example, after deleting activity \(a\), the event log \(L^{\prime}\) is \(L^{\prime}\) = [\(<\)_b,c,d,x_10\({}^{\circ}\)_,\(<\)b,x,c,d_30\({}^{\circ}\)_,\(<\)_x,b,c,d_30\({}^{\circ}\)_,\(<\)_b,c,x,d_30\({}^{\circ}\)_], and the relation between activities is calculated to obtain #(\(<\)_b,c,\(>\),\(L^{\prime}\)) = 30,#(\(<\)_b,x,\(>\),\(L^{\prime}\)) = 10, #(\(<\)_c,d_,\(>\),\(L^{\prime}\)) = 30, #(\(<\)_c,x\(>\),\(L^{\prime}\)) = 10, #(\(<\)_a,c_,\(>\),\(L^{\prime}\)) = 10, #(\(<\)_a,d_,\(>\),\(L^{\prime}\)) = 10.