I am not sure about how to formalise a solution that I found to a software engineering application that I wrote. In a few words I have a set of events $(E_1,...,E_N)$ and a library of actions AL which contains K actions $AL = (a_1, a_2, ..., a_K)$. Each event is made of a ordered sequence of actions from AL, for instance $E_1 = (a_2, a_3, a_7)$, $ E_2 = (a_5, a_4)$, $E_3 = (a_9)$, and so on.
My question is: How would you write the generic i-th event?
I came up with something like $E_i = (a_{i1}, a_{i2}, a_{i3})$ but this comes with two issues:
- How would I link the element $a_{ij}$ to the action $a_k \in AL$?
- How would I state that $a_{ij}$ can be the same as $a_{pq}$ with $(i,j) \neq (p,q)$ if they point to the same $a_k$?