Find repeating patterns in data I have database of sequential events for multiple animals.
The events are represented by integers so it looks something like:
Animal A: [1,6,4,2,5,7,8] 
Animal B: [1,6,5,4,1,6,7]
Animal C: [5,4,2,1,6,4,3]

I can manually see that for each event 6 event 1 first happens.
And event 4 happens quickly after a 1,6 combination.
But these are easy to spot in such a small dataset, the real lists are 10000+ events per animal.
Is there a way to use an algorithm or machine learning to search for these kinds of patterns?
I think this problem could be represented as a Markov Chain.
Maybe a Markov model (or Markov Random Fields) could be used to estimate the probabilities. Normally it's easier than with the more standard Hidden Markov Model since there is no hidden state.
My suggestion would be to estimate the probabilities of the model (parameters) from the data, then it should be easier to discover the patterns based on these probabilities.