Jack has three coins C1, C2, and C3 with p1, p2, and p3 as their corresponding probabilitiesof landing heads. Jack flips coin C1
twice and then decides, based on the outcome, whetherto flip coin C2 or C3 next. In particular, if the two C1 flips come out the same, Jack flips coinC2 three times next. However, if the C1 flips come out different, he flips coin C3 three timesnext. Given the outcome of Jack’s last three flips, we want to know whether his first two flipscame out the same. Describe a Bayesian network and a corresponding query that solves thisproblem. What is the solution to this problem assuming that p1 = .4, p2 = .6, and p3 = .1and the last three flips came out as follows:(a) tails, heads, tails(b) tails, tails, tails