In making markov chains, I know how to do that, but I am curious as to what the different colors, and shapes of the vertexes in the graph output mean. as example;

prob3 = {{.5, 0, .5, 0, 0}, {.25, .5, .25, 0, 0}, {.5, 0, .5, 0, 0}, {0, 0, 0, .5, .5}, {0, 0, 0, .5, .5}}

h = Graph[{"0", "1", "2", "3" , "4"}, DiscreteMarkovProcess[1, prob3], GraphStyle -> "DiagramBlue"]
ToExpression@StringReplace[ToString@FullForm@h, "Tooltip" :> ".5"]

Makes the markov chain diagram I want, but 4 of the states are circles, one is a diamond, of them 2 of the circles are orange, 2 are yellow, and the diamond is purple, and I don't know what that means. I've searched online, and basically I have only seen that I can change them if I want, but no explanation as to what exactly the different shapes/colors mean by default. Any help would be most welcome.

  • 1
    $\begingroup$ IIRC, circles same color communicating sub-chains, diamonds non-communicating, squares absorbing.... Note your example has states unreachable depending on initial state - is that intended? $\endgroup$ – ciao Feb 22 '15 at 5:48
  • $\begingroup$ yeah, that was an example I was given, and I spent awhile trying to put it into mathematica. I drew the chain out by hand, and got the same thing so I knew I entered it right, and that is what I thought, I just couldn't find anything online to say that... I searched for recurrent and transient thinking that is what it meant, cause I noticed the absorbing one was different. Thank you $\endgroup$ – Brian M. Kolins Feb 22 '15 at 6:54
  • $\begingroup$ @rasher Do you have a reference for that? Is this standard notation? $\endgroup$ – Mr.Wizard Feb 25 '15 at 23:17
  • 1
    $\begingroup$ @Mr.Wizard: Over the couple of dozen books I have re: MC, and of course coverage in a myriad of probability books, I don't think I've seen anyone pointing to a "standard" for the graph of an MC. Kind of seems at the authors' whim... $\endgroup$ – ciao Feb 25 '15 at 23:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.