## 4 Methodology
### Obtaining a Configuration Based on the Greedy Strategy  
The above described evolutionary strategy is able to find a good configuration (potentially an optimal one [27]) in less time than the exhaustive strategy, but it is still time consuming. In order to reduce the time even more, but at the same time to be able to find a reasonably good configuration, we present a third strategy, based on a greedy heuristic. A greedy strategy is a heuristic search that creates a feasible solution incrementally, always making the choice that looks best at the moment of making a local choice. Sometimes, these local choices lead to a global optimal solution [32]. Depending on the problem and search space, this strategy does not result in finding one of the optimal solutions; however, for many problems, they provide a close to optimal solution (even an optimal one) in a reasonable computing time. Greedy algorithms usually divide the problem into small sub-problems; each sub-problem is then solved independently and in an incremental fashion. In our case, we can take subtrees from the configurable process tree and process each of them independently, as well as make good local choices in the hope that they result in an optimal solution when we apply all these local configuration choices to the configurable process model. In a configurable process tree, two (or more) configurable nodes are dependent if one of them is under or above the other one in a tree branch or if they both have a common ancestor that is a \(\circ\) operator. If so, the configuration of one of these nodes might affect the configuration of the other one. On the other hand, a configurable node is independent if it is not dependent on any other configurable node. We can identify three scenarios in a configurable process tree depending on the dependency among its configurable nodes. The configurable process tree can have only independent configurable nodes, as shown in Figure 8a; it can have only dependent configurable nodes, as shown in Figure 8b; or it can combine both independent and dependent configurable nodes, as shown in Figure 8c. Algorithm 3 describes the proposed greedy strategy, which consists of the following steps:  
* The configurable process tree is traversed to obtain a sorted list of all configurable nodes. A hierarchical order is achieved by applying the following rules:
* Dependent configurable nodes have a higher priority than independent configurable nodes. * Among configurable nodes of the same type (dependent or independent configurable nodes), a deeper configurable node has a higher priority. * Among configurable nodes at the same level, an operator node has a higher priority than an activity node; otherwise, they are sorted from left to right. * Every configurable node is then processed according to its priority. For each configurable node, a subtree and a sub-log are obtained to compute the local conformance:
* To obtain a subtree for a configurable node, a new root has to be considered. If a configurable node is an activity node, the new root is its direct parent, so that a subtree always has an operator as a root; otherwise, if it is an operator node, and the new root is the own operator node. If the configurable node has some ancestor that is a loop operator, then the new root is the loop operator ancestor that is close to the original root. Such a new subtree might contain other pending configurable nodes; they are temporarily set to \(\tau\) in order to postpone any decision about their configuration. * To obtain a sub-log, we get the projection of the event log on the set of activities contained in the subtree. * For the selected configurable node, all possible configurators are evaluated, obtaining different derived process subtrees. The local conformance between each of those process subtrees and the event sub-log is computed. The best configurator is saved and then set in the best configuration for the original configurable process tree. * At the end, the best configuration for the whole configurable process tree is returned.