Analysis and Application of Transition Systems Based on Petri Nets and Relation Matrices to Business Process Management

In order to improve the eﬃciency of conformance checking in business process management, a business alignment approach is presented based on transition systems between relation matrices and Petri nets. Firstly, a log-based relation matrix of the events is obtained according to the event log. Then, the events in the relation matrix are observed and the transitions in the model are ﬁring, and the activities in the log and in the model are compared. Next, the states of the log and the model are recorded until no new state can be generated, so a transition system can be obtained which includes optimal alignments between the event log and the process model. Finally, two detailed algorithms are presented to obtain an optimal alignment and all optimal alignments between the trace and the model based on the given cost function, respectively. The availability and eﬀectiveness of the proposed approach are proved theoretically.


Introduction
Business process management (BPM) aims to provide a unified modeling, running, and monitoring environment for business processes from information technology and management technology. As an important branch of BPM, process mining is to discover, monitor, and enhance the actual business processes by extracting valuable information from event logs [1]. e research on process mining is significant for the implementation, analysis, and improvement of business processes, so it is a hot topic in the related fields [2,3]. Process mining mainly includes process discovery, conformance checking, and process enhancement [4][5][6]. Conformance checking is to compare the events in the event logs with the activities in the process models, and it can find the similarities and differences between the observed behaviors and the modeled behaviors [7][8][9][10].
Among many conformance checking approaches, aligning observed and modeled behaviors becomes an important means to measure the compliance of event logs and process models [11][12][13]. e alignment approaches aim at finding the deviations between process models and event logs. Usually, the alignments with the least deviation are considered as the optimal alignments. e search algorithms of all the optimal alignments are NP-hard problems, whose time complexity and space complexity are very high. In the research field of process mining, alignment approaches have been deeply studied and widely applied [14][15][16][17][18][19]. ere are a large amount of literatures on alignment approaches to introduce their ideas, motivations, and problems resolved. rough the analysis and conclusion of various alignment approaches [20][21][22][23][24], we find the existing problems of the current ones, mainly including high complexity of the search algorithms, unable to find the required and accurate optimal alignments, and unable to find all the optimal alignments. To solve the abovementioned problems, we propose an alignment approach based on relation matrices and Petri nets. e proposed approach is completely different from the existing alignment approaches in which it does not deal with one trace but all the traces in the event log at once. In this approach, the relation matrix reflects all the partial order relations between events in the event log. A transition system can be obtained by comparing the events in the relation matrix with the activities in the Petri net, which includes all the alignments between all the traces and the process model.
Our approach includes two steps: one is to generate the search space; the other is to search the optimal alignments in the space. Compared with other alignment approaches, this approach has two advantages: one is that it can calculate the accurate alignment results but not approximate solutions; the other is that it can obtain all the optimal alignments based on the given cost functions. However, the approach presented in this paper can embody the alignment results between all traces in the event log and the process model in a transition system; thus, it can save time and space to calculate the search space. e rest of this paper is organized as follows. Section 2 discusses the related work. Section 3 recalls some basic concepts. e generation algorithm of the alignment transition system is presented in Section 4. Section 5 presents the approaches of searching for an optimal alignment and all optimal alignments in the alignment transition system, respectively. Section 6 describes the scalability of our approach. Case studies are given to illustrate the superiority of our approach in Section 7. Section 8 draws the conclusion and the future work.

Related Work
e computation of the optimal alignments is NP-hard, which has very high time and space complexity. Now, the existing alignment approach can only deal with one trace once. If we want to compute all the optimal alignments for the whole event log, we must do the same work for several times. As related work, the following approaches are introduced in this paper.
An approach is presented by Cook and Wolf, which compares the traces with process models in order to quantitatively measure their similarity [19]. However, the approach is analyzed using the state-space technology, and it does partially support the invisible transitions and duplicate transitions. In addition, a heuristics estimation function is used to deal with the high computational complexity in this approach. e function simplifies the search space. However, the application of the function may lead to the approximate optimal solutions. An approach to align observed and modeled behaviors is proposed by Adriansyah [13]. e approach is a very classical one in the related work because it can obtain all the exact optimal alignments between the given trace and the process model. Its main idea is as follows: ① an event net is constructed based on the trace; ② the product of the event net and the process net is generated, which is also a Petri net; ③ part of the reachable graph of the product model is constructed while searching for the shortest path using A * algorithm, which is also conformed to the definition of the transition system; ④ an optimal alignment can be obtained when arriving at the final state. e time and space complexity is very high in order to obtain the solutions.
An approach of conformance checking based on partially ordered event data is proposed by Lu et al. [20,21]. e main idea of the approach is as follows: ① the partially ordered traces are extracted from the existing logs; ② the partially ordered alignments are obtained through dealing with the partially ordered traces; ③ a quantitative-based quality metric is introduced to objectively compare the eventual results of conformance checking. Although the alignment procedure is simplified to some extent using the technology of partially ordered alignments, only the approximate solution of the optimal alignment can be obtained in some cases.
A workflow decomposition approach to align observed and modeled behaviors is proposed by Wang et al. [22]. e approach can divide the large process models and the relevant event logs into several separate parts that can be analyzed and aligned independently. However, the approach can only deal with the block workflow models which can be divided into several segments. Generally, it can only obtain some alignments, rather than all the optimal alignments.
An efficient alignment approach between event logs and process models is presented by Song et al. [23]. e approach leverages effective heuristics and trace replaying to significantly reduce the overall search space for seeking the optimal alignment. e approach improves the efficiency of computing the search space, including the time aspect and space aspect. However, there are still some redundant nodes in the search space, which are not on the paths to the optimal alignments. In addition, only part of the optimal alignments can be obtained due to the limitation of the preprocess, even in some cases only approximate optimal alignments can be obtained.
A reduced alignment approach between event logs and process models is presented by Tian et al., which is named as OAT approach [24]. An optimal alignment tree is generated through this approach. In the optimal alignment tree, the optimal alignments can be easily found by adding the final marks to the leaf nodes which is related to the optimal alignments. e approach largely reduces the time complexity when searching for the optimal alignments in the search space. However, there are some fatal problems, for instance, all the information is placed on the nodes, the duplicate nodes are not shared, and the invalid nodes are not pruned. Hence, the size of the optimal alignment tree is too large and even the search space will explode. e approach proposed in this paper can obtain the logbased relation matrix according to the given event log. e relation matrix can illustrate all the precursor and successor relations between the events in the log. en, an alignment transition system can be acquired through comparing the events in the log with the activities in the model and predicting the next move. e alignment transition system includes all the optimal alignments between all traces and the model. Two algorithms are presented to calculate an optimal alignment and all the optimal alignments based on the cost function, respectively.
Compared with other approaches, the approach in this paper has two advantages. One is that it can obtain the accurate alignment results rather than the approximate solutions. e other is that it can obtain all optimal alignments between traces and process models based on the given cost function. Especially, the search space of our approach includes the alignment results for all traces in the log, but not only one.
Definition 1 (trace and event log). Let A be a set of activities. A trace σ ∈ A * is a sequence of activities. An event log L ∈ B(A * ) is a multiple set of traces on A.
Definition 2 (labeled Petri net system). Let A be a set of activities. A labeled Petri net system over A is a tuple N � (P, is an arc set between transitions and places, i.e., a flow relation (4) α: T ⟶ A τ is a function that maps transitions to labels, and τ denotes the invisible transition, For convenience, in the remainder of this paper, the labeled Petri net system is abbreviated as Petri net.
Definition 3 (perset and postset). Let N � (P, T; F, α, m i , m f ) be a Petri net. For ∀x ∈ P ∪ T, where · x represents the preset of x and x · represents the postset of x. We describe the transition firing rules by using the multisets of places. For any reachable state m ∈ B(P), the transition firing rules of Petri net N � (P, T; F, α, m i , m f ) are as follows: e set of all reachable states from state m is denoted as R(m), and m ∈ R(m). In Petri net N � (P, T; F, α, m i , m f ), m i means the initial state of the system, and then R(m i ) represents the set of all reachable states in the running process of the system. Definition 4 (transition system). Let A be a set of activities. A transition system is a triplet TS � (S, A, T), where S is the set of states, and T ⊆ S × A × S is the set of transitions. S start ⊆ S is the set of initial states, and S end ⊆ S is the set of final states.
Definition 5 (alignment). Let A be a set of activities. σ ∈ A * is a trace over A and N � (P, T; F, α, m i , m f ) is a Petri net over A. An alignment c ∈ (A ≫ × T ≫ ) * between σ and N is a legal movement sequence such that (1) π 1 (c) ↓A � σ, i.e., its sequence of movements in the trace (ignoring >>) yields the trace (2) m i ⟶ π 2 (c) ↓T m f , i.e., its sequence of movements in the model (ignoring >>) yields a complete firing sequence of N For all tuples (a, t) ∈ c in an alignment, (a, t) is one of the following movements: (1) log move if a ∈ A and t � >> (2) model move if a � >> and t ∈ T (3) synchronous move if either a ∈ A and t ∈ T or a � >> and α(t) � τ (4) illegal move otherwise We consider all of the log moves, model moves, and synchronous moves as legal ones. An alignment is legal if it only contains legal moves.
Γ σ,N is the set of all alignments between trace σ and model N.
ere may be several different alignments between the trace and model. To get the most suitable alignments, a cost function c((a, t)) is used to assign a certain value to each move. According to the given cost function, the alignments with the least total cost are called optimal alignments.
Likelihood cost function c() determines the optimal alignment set between the given trace and model directly. In this paper, the standard likelihood cost function lc() is used to assign the cost to the moves, i.e., the cost value of the synchronous move, log move, and model move is 0, 1, and 1, respectively.
Γ o σ,N,lc is the set of all optimal alignments between trace σ and model N based on the function lc().

Generation of Transition Systems
When measuring the fitness between the event log and the process model, the main work is to align the events in the trace with the activities in the model. In the current alignment procedure, assuming that the observed event in the log is x, the fired transition in the model is t i , and t i 's mapping activity is y. In the next procedure, one of the following three scenarios may occur: ① we can observe activity x in the log but x cannot be modeled by firing the transition in the model, then a log move (x, >>) is generated; ② when activity y is modeled by firing the transition t i in the model but cannot be observed in the log, a move (>>, t i ) is generated; if y is equal to τ, (>>, t i ) is a synchronous move; else, (>>, t i ) is a model move; ③ if x is equal to y, a synchronous move (x, t i ) can be generated when the activity Mathematical Problems in Engineering 3 observed in the log is the same as the one modeled in the model. e proposed approach is derived from the abovementioned idea. It aims to observe the event log, run the process model, and compare the event in the log with the activity in the model. We record the states of the log and model, and then we can get an optimal alignment graph. e graph includes all the optimal alignments.
Next, we take the given event log and process model as an example to introduce the basic principles of the proposed approach.

Log-Based Relation Matrices. Consider for instance
For this event log, the following log-based order relations can be found, as in (2)-(5): Relation > L 1 contains all pairs of activities with a directly following relation. a > L 1 b because b directly follows a in trace σ 1 � <a, b>. However, b > L 1 a because a never directly follows b in any trace in the log. ⟶ L 1 contains all pairs of activities in a causal relation, e.g., a ⟶ L 1 b because sometimes b directly follows a and never the other way around (a > L 1 b and b > L 1 a). a# L 1 d because a > L 1 d and d > L 1 a. a|| L 1 a because a > L 1 a, i.e., a follows itself.
We can conclude the footprint of the log L 1 , as in (6). e subscripts have been removed in According to the footprint in (6), we can get all the relations of the activities in the event log, but not only a trace. Although the footprint embodies the relations between the activities in the log, it cannot describe the current states of the log, especially the start and end of the traces. To illustrate all the information needed in the alignment process, we convert the traces in the log into the transition systems, as shown in Figure 2.
A trace in the log is corresponding with a transition system, which is called as trace-based transition system. Firstly, we create an initial state, denoted as s 0 , which means the start of the trace. en, each activity in the trace is mapped into a state, e.g., a and b in trace σ 1 are mapped to s a and s b , respectively. And the state mapped by the last activity is the final state, e.g., b in trace σ 1 is the last activity so that s b is the final state of transition system TS 1 . e states are changed in the transition system when the activities are observed in the trace. Hence, adding the edge between the adjacent states, which is labeled by the observed activity.
Definition 6 (trace-based transition system). Let A be a set of activities. σ ∈ A * is a trace of length n over A. e tracebased transition system of σ is a transition system TS � (S, { } converts a sequence into a set.
In Figure 2, the state with an arrow line is the initial state, and the one with two circles is the final state.
Transition system TS 1 depicted in Figure 2(a) can be formalized as follows: Transition system TS 2 depicted in Figure 2(b) can be formalized as follows:  Figure 1: Process model N 1 .
Transition system TS 3 depicted in Figure 2(c) can be formalized as follows: Transition system TS 4 depicted in Figure 2(d) can be formalized as follows: rough the analysis of the footprint in (6) and the transition systems in Figure 2, we can infer a relation matrix between states.
is an inverse operation of z set (σ) and converts a set into a sequence. π i (x) refers to the ith element of x. e symbol # represents that the two states have no direct causal relation. According Definition 7, the log-based relation matrix LRM 1 of log L 1 can be constructed, as in (7). e states labeled by the star in (7) are the final states: According to Definition 7, the log-based relation matrix can present the sequences of activities. We read the state in the relation matrix, beginning at the initial state, and ending at the final state. A complete sequence consists of all the activities between states. e set including all the sequences is denoted as Because there is the sequence <a, a, a, a, b>, where <a, a, a, a, b> ∈ LRM * 1 but <a, a, a, a, b> ∉ L 1 .

Alignment Transition Systems. Given the process model
is derived from the log firstly. We can measure the fitness between the log and model based on the relation matrix and Petri net.
From now on, we replace the event log as the relation matrix and use the matrix to embody the current state, observed activity, and next state of the log.
rough the comparison between the relation matrix and Petri net, we can get an alignment transition system.

the final states
We observe the log and run the process model. Meanwhile, we record the current state of the log and the current reachable marking of the model. en, according to their current information, we infer that the activity can be observed in the matrix, the transition can be fired in the Petri net, and their relation can be compared. On the basis of the compared result, we can predict the next state of the matrix and the next reachable marking of the net.
For arbitrary Petri nets, their structures may be very complicated and diverse. Here, we discuss a special structure for the Petri net and its influence on the alignment transition system. e Petri net contains cycles in which the cost of the transitions is 0. As a result, the alignment transition system may contain cycles with cost 0. In the context of practical application of our paper, the transitions with cost 0 are the invisible transitions in the Petri nets. e invisible transitions represent the activities that can never be observed, so the cycles containing only the invisible transitions have little meanings to the alignment results. In order to reach the final node from the initial node in a limited number of steps, we delete this kind of cycles from the alignment transition system. e abovementioned idea is translated into the concrete algorithm to realize the alignment transition system, as shown in Algorithm 1.
e computational complexity of the alignment transition systems based Petri nets and relation matrices is related to the number of the reachable states of the Petri nets and the length of the traces, which is a NP-hard problem. Its complexity is also very high just like the reachable marking graph of the Petri nets. Especially, when there are many transitions with the concurrent relations in Petri nets, the number of the reachable states increases exponentially and even causes state space to explode.
According to Algorithm 1, taking relation matrix LRM 1 in (7) and process model N 1 in Figure 1 as an example, we can get an alignment transition system, as shown in Figure 3.
Given the event log and the process model, the alignment between them is translated into the calculation of the move sequence in the alignment transition system. e moves are the weights of the edges in the system, so we can calculate the move sequence when traversing the branch of the system. Hence, the problem of the optimal alignment between the log and the model is translated into that of the minimum cost move sequence in the alignment transition system. However, the alignment transition system includes all the information of the event log, so the sequence consisted of the projection of the moving sequence onto the first column must be the given trace when calculating the optimal alignments between the trace and the model.
When visiting the states in alignment transition system ATS 1 in Figure 3, we can get some shortest paths, as shown in Figure 4, and their corresponding optimal alignments, as shown in Figure 5.

Properties of Alignment Transition Systems.
In this section, we present the properties of the alignment transition system and theoretically demonstrate that it includes the alignments between all traces in the event log and the process model.
∀(m j , s a k ) ∈ R(m i ) × LRM row , we examine whether a path can be established from (m i , s 0 ) to (m j , s a k ) according to Algorithm 1. m j ∈ R(m i ), we suppose that a firing transition sequence en, there is a transition sequence in ATS which makes (m j , In conclusion, S A � R(m i ) × LRM row . eorem 1 shows that the state set of the alignment transition system is the Cartesian product of the reachable state set of the Petri net and the state set of the relation matrix. According to eorem 1, no matter what states we use, they must be in alignment transition system.
For example, R(m i,1 ) of N 1 in Figure 1  Proof. ∀c � c [1], c [2], . . . , c[q] > ∈ Γ L,N , ignoring >>, σ � π 1 (c) ∈ L and λ � π 2 (c) ∈ T * N . We prove the theorem by induction on |c|, where |c| � q: (2) When i � q − 1, it is supposed that <c [1], c [2], . . ., c[q − 1]> is also the prefix of some sequences in ATS * . We suppose the last state in ATS is (m j , s a k ). (a k+1 , >>). a k+1 is the last activity of trace σ and m j � m f . So, (1) S ⟵ S start ; n ⟵ 1; //judge the current state to be the final state; (7) FOR (all s y ∈ z set (LRM row )) DO (8) IF END IF (13) END FOR //the following log moves, related new states, and transitions that may be generated; END IF (22) END FOR (23) END IF //the following model moves, related new states, and transitions that may be generated; (24) FOR((all s y ∈ z set (LRM row )) AND (all t k ∈ T 1 )) DO (25) IF    Figure 4: Paths from the initial state to the final states mapping to the optimal alignments of traces in L 1 : (a) a shortest path for the optimal alignment of σ 1 ; (b) a shortest path for the optimal alignment of σ 2 ; (c) a shortest path for the optimal alignment of σ 3 ; (d) a shortest path for the optimal alignment of σ 4   In conclusion, c ∈ ATS * . en, Γ L,N ⊆ ATS * . eorem 2 shows that all the alignments between the traces in the log and the model can be found in the alignment transition system. is corollary provides the theoretical foundation for the search of the optimal alignments in the alignment transition system.

Calculation of Optimal Alignments
We can get an alignment transition system between the event log and the process model by Algorithm 1. e optimal alignments between the trace and model based on the standard likelihood cost function can be calculated through finding the shortest path from the initial state to the final state in the system. is section presents two algorithms to realize the calculations of an optimal alignment and all optimal alignments, respectively.
Since most of the states in the alignment transition system have more than one parent and even some states have self-cycles, it is possible to reach the same state from different branches in the process of finding the optimal alignment. In the search process, we should record not only the current state and cost but also the prefix alignment. e unit that stores the related information is referred to as the search node.

Computing an Optimal Alignment.
Because there are more than one trace in the event log, a path between the initial state and the final state in the alignment transition system may not be the alignment of the given trace, let alone its optimal alignment. In other words, the shortest path may not be mapping to the optimal alignment for the specified trace. So, not only the length of the path but also the specified trace must be considered when computing the optimal alignment between the trace and the model.
In order to get the optimal alignment of the given trace, not only the short path should be searched as far as possible but also it should be guaranteed that the sequence consisted of the projection onto the first column of the moves on the path is equal to the prefix of the trace. Algorithm 2 is presented to compute an optimal alignment between all traces in the event log and the process model based on the standard likelihood cost function. e complexity of Algorithm 2 is related to that of the alignment transition system and the given trace, which is a NP-hard problem. In Algorithm 2, each node stores the prefix alignment. When calculating the optimal alignment, it must meet the two following criteria: one is that the last visited state of the alignment transition system must be the final state; the other is that the projection of the eventual prefix alignment onto the first column is the given trace. Most of the nodes generated in the search process can be discarded, only the current node needs to be stored, so the storage space of this algorithm is greatly saved.
According to Algorithm 2, taking alignment transition system ATS 1 in Figure 3 and event log L 1 in Table 1 as an example, we can get an optimal alignment for each trace in log L 1 . When visiting the states in alignment transition system ATS 1 in Figure 3, the key nodes generated, as shown in Table 2. e prefix alignment of the last node for each trace is its optimal alignment. e search results of each step in Algorithm 2 can ensure that the prefix alignment is with the least cost at the current cost, and it is suitable for the given trace. e eventual results are certain to be the optimal alignments of the given traces due to the current costs and the prefix alignments.

Computing all Optimal Alignments.
e alignment transition system includes all the alignments between all the traces and the model. When calculating the optimal alignments based on the system, we can get more alignments besides the optimal ones if ignoring the constraint of the least cost. In fact, when having found the optimal alignment for the first time, its cost is the minimum value between the given trace and the model based on the standard likelihood cost function. e cost of any other optimal alignments cannot be greater than this value.
In addition, all the nodes whose cost is less than or equal to the cost of the optimal alignment are checked, which can determine whether we get all optimal alignment. However, if the cost of the node is greater than the optimal cost, it will never arrive at the final node which stands for the optimal alignment. e main idea to compute all optimal alignment is similar to that of Algorithm 2. e successor of the current node can be entered into the queue when it meets the two criteria: one is that the current cost is not greater than the optimal cost; the other is that the projection of the current alignment onto the first column conforms to the prefix of the given trace.
Algorithm 3 is presented to achieve all optimal alignments between all traces in the event log and the process model based on standard likelihood cost function.
is algorithm can be further optimized. For instance, if the successor is equal to the existing node, we can abort to add the successor and share the existing one. After optimizing the algorithm, the number of the nodes in the queue will be reduced, so the efficiency of the algorithm can be improved. e execution of Algorithm 3 mentions to the traverse of the alignment transition system, and some states in the system will be visited for several times. Hence, its time complexity is very high. e complexity of Algorithm 3 is still a NP-hard problem.
According to Algorithm 3, taking alignment transition system ATS 1 in Figure 3 and event log L 1 in Table 1 as an example, we can get all optimal alignments for each trace in log L 1 . σ 1 , σ 2 , and σ 4 have just only one optimal alignment. However, trace σ 3 has two optimal alignments, as shown in Figure 6.

Scalability of Our Approach
In most of the cases, the existing approaches can only compute the alignment between one trace and the model each time. When computing the optimal alignments between a new trace and the model, we must completely execute the alignment approach again and get a different search space. However, the proposed approach in this paper has certain scalability. We just adjust and modify the alignment transition system, and then it can be used for the new trace. Next, we introduce the possible changes for the alignment transition system when aligning a new trace with the model.

Remaining Unchanged.
When the relations of the activities in the new trace conform to that of the original logbased relation matrix and the last activity is identical to that of some existing traces, the alignment transition system remains unchanged. Input: event log L 1 � [σ 1 , σ 2 , σ 3 , . . ., σ n ], and alignment transition system TS 2 � (S 2 , M 2 , T 2 ) between L 1 and N 1 � (P 1 , T 1 ; F 1 , α 1 , m i,1 , m f,1 ). Output: OA_one[n](OA_one[i] stores an optimal alignment c i between the ith trace and the model, where 1 ≤ i ≤ n).
Taking process model N 1 in Figure 1, event log L 1 in Table 1, and alignment transition system ATS 1 in Figure 3 as an example, the log-based relation matrix of L 1 is LRM 1 in (7). We suppose that the new trace is σ 5 � <a, a, a, b>, which is different from any trace in L 1 . And its trace-based transition system is shown in Figure 7.
Transition system TS 5 depicted in Figure 7 can be formalized as follows: (s 0 , a, s a ), (s a , a, s a ), (s a , b, a  We can get an optimal alignment between trace σ 5 and model N 1 by Algorithm 2 from transition system ATS 1 and all the optimal alignments by Algorithm 3. e optimal alignments are corresponding to the paths from the initial node to the final nodes in ATS 1 , as shown in Table 3.

Setting Another New Final State.
When the relations of the activities in the new trace conform to that of the original log-based relation matrix, but the last activity is different from that of any existing trace, the alignment transition system needs to set another new final state. Supposing that the last activity is x, we must set the state (m f , s * x ) to be another new final state in the alignment transition system.
We suppose the new trace is σ 6 � <a, a>, which is different from any trace in L 1 . And its trace-based transition system is shown in Figure 8.
Transition system TS 6 depicted in Figure 8 can be formalized as follows: S 6 � {s 0 , s a }, S start 6 � {s 0 }, S end 6 � {s a }, z set (σ 6 ) � {a}, and T 6 � {(s 0 , a, s a ), (s a , a, s Accordingly, we set the state ([p 4 ], s * a ) to be another new final state in the alignment transition system. Supposing that the modified system is named as ATS 1 1 , we can align trace σ 6 with model N 1 by system ATS 1 1 . We can get an optimal alignment between trace σ 6 and model N 1 by Algorithm 2 from transition system ATS 1 1 and all the optimal alignments by Algorithm 3. e optimal alignments are corresponding to the paths from the initial node to the final nodes in ATS 1 1 , as shown in Table 4.

Adding New Transitions.
When the relations of the activities in the new trace cannot be found in the original log-based relation matrix, the alignment transition system needs to add new transitions. We suppose that the new relation is x ⟶ L y, then we must add new transitions to the alignment transition system. e new transitions include We suppose the new trace is σ 7 � <b, a, b>, which is different from any trace in L 1 . And its trace-based transition system is shown in Figure 9.
We can get an optimal alignment between trace σ 7 and model N 1 by Algorithm 2 from transition system ATS 1 2 and all the optimal alignments by Algorithm 3. e optimal alignments are corresponding to the paths from the initial node to the final nodes in ATS 2 1 , as shown in Table 5.

Adding New States and Transitions.
When the activities in the new trace cannot be found in the event log, the alignment transition system needs to add new states and transitions. Supposing that the activity is x, we must add several new states and transitions to the alignment transition system. e new states are as follows: e pattern that the new transitions are added is similar to the example in Section 6.3. We suppose the new trace is σ 8 � <a, c, b>, which is different from any trace in L 1 . And its trace-based transition system is shown in Figure 11.
Transition system TS 8 depicted in Figure 11 can be formalized as follows:  . We suppose that the modified system is named as ATS 1 3 , and the adding states and transitions to ATS 1 are shown in Figure 12.
We can align trace σ 8 with model N 1 by system ATS 3 1 . We can get an optimal alignment between trace σ 8 and model N 1 by Algorithm 2 from transition system ATS 3 1 and all the optimal alignments by Algorithm 3. e optimal alignments are corresponding to the paths from the initial node to the final nodes in ATS 3 1 , as shown in Table 6. No matter what activities the new trace contains and how the relations between them are, it can be decomposed into one of the four cases mentioned above. en, we can deal with the alignment transition system according to the relation between the new trace and the log-based relation matrix. Eventually, the new system includes the alignments between the new trace and the model.
When a new trace not in the original event log is aligned with the process model, our approach does not need to generate a new search space completely but only needs to expand the existing search space appropriately. Hence, our approach has better scalability and applicability.

Case Studies
e greatest advantage of our approach is to deal with all traces in the event log at a time. It is more efficient than the approaches that can only deal with one trace every time. We integrate the following relations between events via the logbased relation matrix, so we can obtain all the alignments between batch traces and the model by an alignment transition system. In order to express the superiority of our approach, we compare it with Alignment-One approach. Alignment-One approach considers that the event log just has a trace and computes the alignments between a trace and the model via Algorithms 1-3. Taking a relatively complex process model for an example, this section provides some analysis results of our promoted approach. Compared with the results of Alignment-One approach, the superiority of our approach can be illustrated.
Both Alignment-One approach and our approach can be divided two steps: one is the generation of the search space; the other is the search for the optimal alignments. e scale of the search space determines the complexity of the search work to a certain extent. So, the complexity of the search space is critical for the performance of the alignment approaches. In this paper, it is deeply studied that the number and the size of the search spaces are generated during the execution of the alignment approaches, which indirectly illustrate their complexity. Hence, the case studies focus on the number and size of the search spaces. rough the research, the superiority of our approach is verified.  In order to enhance the safety of the transportation of the coal mine, a distributed control system for the inclined shaft of the coal mine is introduced [32]. Petri nets are adopted to build the model for this system, as shown in Figure 13. e model has a place named as p 1 that represents the start of the workflow and a place named as p 14 that represents the end. Any place or transition in the model is on a path from p 1 to p 14 . Moreover, the model has the properties, such as security, option to complete, proper completion, and no dead transitions. Hence, the model is considered to be a sound Petri net. e actual meanings of places and transitions in Figure 13 are shown in Tables 7 and 8, respectively. In addition, each transition is mapped to an activity, as shown in Table 8. e name of each activity is a character, which is suitable for the representation of the control flow, i.e., trace.
Each event log is composed of some activity sequences generated randomly from the process model, and then we make several man-made noises for these sequences. e event logs are shown in Table 9.
e process model generates completely fit traces with different lengths, each of which contains about 6 to 15 activities. Noises are created by randomly deleting the activities from or adding them to the traces. However, when adding an activity, no activity beyond the given activity set appears. In this example, each activity in the traces is an element of the set A � {a, b, c, d, e, f, g, h, i, j, k}. en, based on the standard likelihood cost function, the optimal alignments between all traces and the model are calculated. e number and the size of the search space are counted to compare Alignment-One approach with our approach. is instance contains four event logs, and each one contains five different traces. e average lengths of five traces in the four event logs are 6, 9, 12, and 15, respectively. e comparison results between Alignment-One approach and our approach are shown in Table 10.
According to Table 10, when an event log has five different traces, five alignment transition systems need to be established to get the optimal alignments between the traces in the log and the process model. However, the proposed approach in this paper needs only to establish an alignment transition system.
In Alignment-One approach, the number of states of the alignment transition system is related to not only the average length of the trace but also the number of the reachable states of the model. ere is only one model in this instance, so the number of the reachable states is unchanged. When the average lengths of the traces in the log increase, the number of states of alignment transition systems obtained by Alignment-One approach increase linearly, which are proportional to the average lengths of the traces.
In our approach, the number of states of an alignment transition system is determined by that of different activities in the event log and that of reachable states of the process model. When the average lengths of the traces in the log are short, the number of states of the alignment transition systems in our approach is greater than that of Alignment-One approach. However, when the average lengths of the traces are greater than |A| (A is the set of activities, and |A| is the length of A.), the number of states of the alignment transition systems in our approach is a constant and its value is much less than that of Alignment-One approach. As shown in Table 10, when the average lengths of the traces are 12 and 15, the number of states of the alignment transition systems in our approach is fixed at 144. Even if the average lengths of the traces continue to increase, the number of states will remain 144 as long as each activity in the traces is the member of set A.
According to the abovementioned analysis, when there are m different traces in the event log, our approach only needs to compute an alignment transition system, while Alignment-One approach needs to compute m ones. Generally, our approach yields much fewer states than Alignment-One approach.
e comparison results show that our approach generates much smaller search spaces than Alignment-One approach. Hence, our approach outperforms Alignment-One approach.

Conclusions
As more and more event logs are recorded in enterprise organizations, conformance checking between event logs and process models plays an increasingly important role in process mining. At present, as a significant technique of conformance checking, alignment is widely used in process discovery, precision checking, and process enhancement. Alignment can accurately locate the deviations and measure the fitness between the observed and modeled behaviors. Most of the existing alignment approaches can only compute an optimal alignment between the trace and the model, or even just a suboptimal alignment.
In order to solve the problems that the state space only includes the alignments between one trace and the model, this paper proposes a business alignment approach based on the transition system between relation matrices and Petri nets. is approach can generate an alignment transition system, which includes the alignments between all traces in the log and the model. No matter how many traces are involved in the log, this approach only needs to generate one alignment transition system. According to the search results of prefix alignments in the system, two algorithms are proposed to find an optimal alignment and all optimal alignments between all traces in the log and the model based on the given cost function, respectively. e proposed approach in this paper effectively solves problems such as low efficiency and high memory occupancy. It improves the efficiency of calculating optimal alignments. e alignments between all traces in the log and the model are embodied in the alignment transition system. Our approach simplifies the search space which includes all the optimal alignments. In the future work, we will further study the relations between activities in the log so that the more reasonable relation matrices will be established. On  <a, b, c, d, e, f, d, g, h, i, j, k>, <a, b, c, d, e, f, g, h, i, j, k>, <a, b, c, d, d, e, f, d, g, h, i, j, k>, <a,  b, c, d, e, f, d, e, g, h, i, j, k>, <a, b, c, d, f, e, d, g, h, <a, b, c, d, e, f, d, e, f, d, g, h, i, j, k>, <a, b, c, d, e, f, d, e, f, d, e, g, h, i, j, k>, <a, b, c, d, e, f, d, e,  f, d, g, h, j, i>, <a, b, c, d, e, f, d, e, f, g, h, i, j, k>, <a, b, c, d, e, f, d, e, f, d, g, h, i, j, j, k>]

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this paper.