Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Another game. There are two players, A and B. At the beginning of the game, each starts with 4 coins, and there are 2 coins

Another game. There are two players, A and B. At the beginning of the game, each starts with 4 coins, and there are 2 coins in the pot. A goes first, then B, then A,. . . . During a particular player's turn, the player tosses a 6-sided die. If the player rolls a: 1, then the player does nothing. 2: then the player takes all coins in the pot. 3: then the player takes half of the coins in the pot (rounded down). 4,5,6: then the player puts a coin in the pot. A player loses (and the game is over) if they are unable to perform the task (i.e., if they have 0 coins and need to place one in the pot). We define a cycle as A and then B completing their turns. The exception is if a player goes out; that is the final cycle (but it still counts as the last cycle). We are trying to determine the expected number (and maybe even the distribution) of cycles the game will last for. I'm guessing that you can use "first-step" analysis to get the expected value. Simulation seems the easiest thing to do to get the entire distribution.

Please help to solve it and write the python code, possibly using Markov Chain Monte Carlo method. thanks

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Engineering Mathematics

Authors: Erwin Kreyszig

3rd Edition

471507288, 978-0471507284

More Books

Students also viewed these Mathematics questions

Question

Use Eq. (6) to estimate Af = f(3.53, 8.98) - f(3.5,9)

Answered: 1 week ago