subject

Consider the following 2-player game played with a 6-sided die. on your turn, you can decide either to roll the die or to pass. if you roll the die and get a 1, your turn immediately ends and you get 1 point. if you instead get some other number, it gets added to a running total and your turn continues (i. e. you can again decide whether to roll or pass). if you pass, then you get either 1 point or the running total number of points, whichever is larger, and it becomes your opponent’s turn. for example, if you roll 3, 4, 1 you get only 1 point, but if you roll 3, 4, 2 and then decide to pass you get 9 points. the first player to get to n points wins, for some positive n. alice and bob are playing the above game. let w(x, y, z) be the probability that alice wins given that it is currently alice’s turn, alice’s score (in the bank) is x, bob’s score is y and alice’s running total is z. a) give a recursive formula for the winning probability w(x, y, z).b) based on the recursive formula you gave in the previous part, design an o(n3 ) dynamic programming algorithm to compute w(x, y, z). briefly describe your algorithm, prove its correctness and runtime.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 06:00
Which statistical function in a spreadsheet you to see how far each number varies, on average, from the average value of the list?
Answers: 2
question
Computers and Technology, 23.06.2019 09:10
Effective character encoding requires standardized code. compatible browsers. common languages. identical operating systems.
Answers: 1
question
Computers and Technology, 24.06.2019 14:40
Create a function (prob3_6) that will do the following: input a positive scalar integer x. if x is odd, multiply it by 3 and add 1. if the given x is even, divide it by 2. repeat this rule on the new value until you get 1, if ever. your program will output how many operations it had to perform to get to 1 and the largest number along the way. for example, start with the number 3: because 3 is odd, we multiply by 3 and add 1 giving us 10. 10 is even so we divide it by 2, giving us 5. 5 is odd so we multiply by 3 and add one, giving us 16. we divide 16 (even) by two giving 8. we divide 8 (even) by two giving 4. we divide 4 (even) by two giving 2. we divide 2 (even) by 2 to give us 1. once we have one, we stop. this example took seven operations to get to one. the largest number we had along the way was 16. every value of n that anyone has ever checked eventually leads to 1, but it is an open mathematical problem (known as the collatz conjectureopens in new tab) whether every value of n eventually leads to 1. your program should include a while loop and an if-statement.
Answers: 3
question
Computers and Technology, 24.06.2019 17:00
Following are uses of spreadsheets. for each use, choose whether the use is a business use, consumer use, or student use. family budget: sales data: recording research data for science class:
Answers: 2
You know the right answer?
Consider the following 2-player game played with a 6-sided die. on your turn, you can decide either...
Questions
question
English, 21.02.2020 22:02
question
Physics, 21.02.2020 22:02
Questions on the website: 13722361