Stick or roll is a game involving two players, A and B, and a die with four faces (numbered 1, 2, 3, 4). The faces are equally likely to occur when the die is rolled. Player A rolls the die once and sticks with that number as the score or rolls it again and scores the sum of the two numbers. • If A's score is greater than 4 then A loses. • If A's score is 4 then A wins. If A's score is less than 4, then B rolls the die once and sticks with that number as the score or rolls it again and scores the sum of the two numbers. • If B's score is greater than 4 then B loses. • If B's score is 4 or less and equal to A's or less, then B loses. • If B's score is 4 or less and greater than A's, then B wins. Player B sticks on the first roll if that number wins and rolls again if it doesn't win and it is possible to win with a second roll. Some example games might be: • A rolls a 2, chooses to roll again and rolls a 3. A's score is then 5 so A loses and B wins. * A rolls a 2 and chooses not to roll again. B rolls a 2, so rolls again and rolls another 2. B's score is then 4, so B wins. • A rolls a 1, chooses to roll again and rolls a 2. B rolls a 2, rolls again and rolls a 3. B's score is then 5 so B loses and A wins. In solutions to the following questions express all probabilities exactly. a If A's score is 3, describe the ways in which B could win. b If A's score is 3, what is the probability that B wins? e IF A's score is 2, what is the probability that B wins? a Player A decides to stick if the first roll is 3 or 4, otherwise rolls again. What is the probability that A wins the game using this strategy?

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter6: Looping
Section: Chapter Questions
Problem 5GZ
icon
Related questions
icon
Concept explainers
Question

Stick or roll is a game involving two players, A and B, and a die with four faces (numbered 1, 2, 3, 4). The faces are equally likely to occur when the die is rolled. Player A rolls the die once and sticks with that number as the score or rolls it again and scores the sum of the two numbers. • If A's score is greater than 4 then A loses. • If A's score is 4 then A wins. If A's score is less than 4, then B rolls the die once and sticks with that number as the score or rolls it again and scores the sum of the two numbers. • If B's score is greater than 4 then B loses. • If B's score is 4 or less and equal to A's or less, then B loses. • If B's score is 4 or less and greater than A's, then B wins. Player B sticks on the first roll if that number wins and rolls again if it doesn't win and it is possible to win with a second roll. Some example games might be: • A rolls a 2, chooses to roll again and rolls a 3. A's score is then 5 so A loses and B wins. * A rolls a 2 and chooses not to roll again. B rolls a 2, so rolls again and rolls another 2. B's score is then 4, so B wins. • A rolls a 1, chooses to roll again and rolls a 2. B rolls a 2, rolls again and rolls a 3. B's score is then 5 so B loses and A wins. In solutions to the following questions express all probabilities exactly. a If A's score is 3, describe the ways in which B could win. b If A's score is 3, what is the probability that B wins? e IF A's score is 2, what is the probability that B wins? a Player A decides to stick if the first roll is 3 or 4, otherwise rolls again. What is the probability that A wins the game using this strategy?

Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Control Structure
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Operations Research : Applications and Algorithms
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole