Suppose I have a discrete Markov process with states called 'Alice', 'Bob', 'Charlie', 'Daryl', 'Edith', and 'Fiona' and a given transition matrix. How can I get Mathematica to generate a finite Markov chain of given length, say 8, that ends with a given state, say 'Daryl'?
I would like the output formatted simply like this:
Bob, Daryl, Charlie, Alice, Alice, Fiona, Bob, Daryl.
Edit: of course there's a trivial solution: generate any Markov chain of length 7 and then append Daryl. But that's not what I mean. The chain has to arise genuinely from the probabilities.