Machine Learning.
Chains in general. Consider that a person only eats mango, banana or an apple, one fruit each day. These are the rules of the game : She eats either mango or a grape with a probability of 0.4 and 0.6 respectively after eating a banana on a given day. She eats grape or a banana after eating mango