fwiw, your explanation really made markov chains click for me (unlike other markov chain explanations)
i have to admit, that the part where you went from the idea over hashmaps to the matrix representation was a bit dense, but rereading it twice made me under it
so thanks for your explanation!