---
# System prepended metadata

title: Assignment 3

---

# Assignment 3

Group D
Participants:
- Johannes Berthold
- Ahmed Cherif
- Lukas Hoffmann


## Task 1–Quality Dimensions

![](https://i.imgur.com/22PjWMR.png)


## Task 2–Rule Checking

### a.)
cardinality rule:
- A bug description can be published \(p\) at most once.
 
precedence rule:
- Before the bug description can be checked (d), the bug must be reported \(r\).
 
exclusiveness rule:
- a reported bug either needs to be fixed (f) or it is not a bug (n).


### b.)
| rule      | <r,d,c,p,a,t> | <r,d,c,d,a,p,f,t> | <r,d,d,p,f,n> |
| -------- | -------- | -------- |-------- | 
| cardinality:|✅|✅|✅|
| precedence: |✅|✅|✅|
| exclusiveness|✅|✅|❌|


## Task 3-Token-based Replay Technique

### a) Compute the fitness for the given event log L.



| Trace    | Prod. | Cons. | Miss.| Remai.| Fitness |
| -------- | -------- | -------- |-------- |-------- |-------- | 
| $L_1 = {<r,d,c,p,a,t>}$    |8|7|2|3|0,51|
| $L_2 = {<r,d,c,d,a,p,f,t>}$|12|12|0|0|1
| $L_3 = {<r,d,d,p,f,n>}$    |10|9|3|4|0.51
| $L$ = {$L_1,L_2,L_3$} |30|28|5|7|0.60

### b)Which feedback does token-based replay technique provides on deviations between a model and a trace?

Its a measure that showes how well a given model is compatible with the trace. A perfect score of one would mean that the given model is 100% able to produce a trace like the one tested in the replay. 

## Task 4-Conformance Checking with Alignments

###  a)Assuming log moves and model moves have unit costs of one (c=1): Which of the alignments is optimal? Are there additional optimal alignments for the given model and traces? 
 
Aligment 1 and 3 are equally optimal since both of them have a cost of 2. 

When the alignments are seprated into 4 parts where there are alternatives for two of those parts we can build permutations of those alternatives. Those are the four parts and the respektive alternatives:

**Part 1**


| log trace | r | d |
| -------- | -------- | -------- |
| execution sequence     | r     | d     |

**Part 2a**

| log trace | c | 
| -------- | -------- | -------- |
| execution sequence     | >>|

**Part 2b**

| log trace | c | >>|
| -------- | -------- | -------- |
| execution sequence     | c|d|

**Part 3**

| log trace | p |a| 
| -------- | -------- | -------- |
| execution sequence     | p|a|

**Part 4a**

| log trace | >> |t
| -------- | -------- | -------- |
| execution sequence     | n|t

**Part 4b**

| log trace | >> |t
| -------- | -------- | -------- |
| execution sequence     | f|t

**Part 4c**

| log trace | t |
| -------- | -------- | -------- |
| execution sequence     | >>|



As explained above four permuations are possible. 
1. (1 -> 2a -> 3 -> 4a)
2. (1 -> 2a -> 3 -> 4b)
3. (1 -> 2a -> 3 -> 4c) 
4. (1 -> 2b -> 3 -> 4a) 
5. (1 -> 2b -> 3 -> 4b)
6. (1 -> 2b -> 3 -> 4c) 

Alignment 1 from the task descriptions is equivalent to permutation 1 and Alignment 3 is equivalent to permutation 5. If its not allowed to skip the last move 4c is not possible and therefore permutation 3 and 6 are invalid. 


### b) Consider the L = {<r,d,c,p,a,t>, <r,d,c,d,a,p,f,t>, <r,d,d,p,f,n>}. Compute the fitness of each trace using alignments with the following fitness function. Also, what feedback is provided with regards to deviations between log and model?
<r,d,c,p,a,t>:
cost(sigma, M) = 2
cost(sigma, <>) = 6
cost(<>, x) = 6

$$ fitness(sigma, M) = 1- \frac{2}{6+6} = 0.83 $$

<r,d,c,d,a,p,f,t>

cost(sigma, M) = 0
cost(sigma, <>) = 8
cost(<>, x) = 6
$$ fitness(sigma, M) = 1- \frac{0}{8+12} = 1 $$

<r,d,d,p,f,n>

cost(sigma, M) = 3
cost(sigma, <>) = 6
cost(<>, x) = 6

$$ fitness(sigma, M) = 1-\frac{3}{6+6} = 0.75 $$

### c) Import the log RequestForPayment.xes.gz into ProM and apply the Mine PetriNet with InductiveMiner plugin. Select a noise threshold of 0.4. Use the resulting Petri net and apply the Replay a Log on Petri Net for Conformance Checking plugin with its standard configuration. Open the legend and element statistics. If you click through the elements of the model, what are the three most frequent deviations of the log from the model? What is the global trace fitness?