I have a set of 5000 strings of length 4, where each character in the string can be either A, B, C, or D.
0-order Markov Chain (no dependency), makes a 4*1 array of columns A, B, C, D.
1-order Markov Chain (pos j depends on previous pos i), makes a 4*4 matrix of rows Ai, Bi, Ci, Di; and columns of Aj, Bj, Cj, Dj.
2-order Markov Chain (pos k depends on pos j and pos i), makes a 4*4*4 matrix of dimensions Ai, Bi, Ci, Di; Aj, Bj, Cj, Dj; and Ak, Bk, Ck, Dk [or this makes a 16*4 matrix of dimensions Aij, Bij, Cij, Dij; Ak, Bk, Ck, Dk].
3-order Markov Chain (pos l depends on pos k, pos j, and pos i), makes a 4*4*4*4 matrix of dimensions Ai, Bi, Ci, Di; Aj, Bj, Cj, Dj; Ak, Bk, Ck, Dk; Al, Bl, Cl, Dl [or this makes a 64*4 matrix of dimensions Aijk, Bijk, Cijk, Dijk; Al, Bl, Cl, Dl].
What are the number of parameters for the 4 orders? I have a few ideas, but want to see what others think. Thank you for any advice!!