Alternating retries and terminating outcomes
Alternating retries and terminating outcomes
Player I starts; the two players alternate independent trials with unchanged rules. At each turn q is the probability of continuing and r is the probability of the designated immediate stopping outcome; all other outcomes also stop play. Find the final designated-outcome probabilities for I and II.
- 131 bytes
- COMP mode
Worked examples
Example 1
Original exercise 1. Player I starts; the two players alternate independent trials with unchanged rules. At each turn q is the probability of continuing and r is the probability of the designated immediate stopping outcome; all other outcomes also stop play. Find the final designated-outcome probabilities for I and II. Data: A=q₁, I continue probability = 0.5; B=q₂, II continue probability = 0.5; C=r₁, I target probability = 0.25; D=r₂, II target probability = 0.25.
- (a)Calculate all requested quantities in the stated order. Output order: P(I); P(II).
Answer
Standard solution (without a calculator)
- Build the mathematical model and substitute the data. P(I)=r₁+q₁q₂P(I).
- Written solution: q₁q₂=(1/2)(1/2)=1/4; 1−q₁q₂=3/4.
- P(I)=1/4+(1/4)P(I) ⇒ P(I)=(1/4)/(3/4)=1/3.
- P(II)=(1/2)(1/4)+(1/4)P(II) ⇒ P(II)=1/6.
- Retain exact fractions in written work; round only the final answer.
Example 2
Original exercise 2. Player I starts; the two players alternate independent trials with unchanged rules. At each turn q is the probability of continuing and r is the probability of the designated immediate stopping outcome; all other outcomes also stop play. Find the final designated-outcome probabilities for I and II. Data: A=q₁, I continue probability = 0.25; B=q₂, II continue probability = 0.25; C=r₁, I target probability = 0.5; D=r₂, II target probability = 0.5.
- (a)Calculate all requested quantities in the stated order. Output order: P(I); P(II).
Answer
Standard solution (without a calculator)
- Build the mathematical model and substitute the data. P(I)=r₁+q₁q₂P(I).
- Written solution: q₁q₂=(1/4)(1/4)=1/16; 1−q₁q₂=15/16.
- P(I)=1/2+(1/16)P(I) ⇒ P(I)=(1/2)/(15/16)=8/15.
- P(II)=(1/4)(1/2)+(1/16)P(II) ⇒ P(II)=2/15.
- Retain exact fractions in written work; round only the final answer.
Example 3
Original exercise 3. Player I starts; the two players alternate independent trials with unchanged rules. At each turn q is the probability of continuing and r is the probability of the designated immediate stopping outcome; all other outcomes also stop play. Find the final designated-outcome probabilities for I and II. Data: A=q₁, I continue probability = 0.6; B=q₂, II continue probability = 0.25; C=r₁, I target probability = 0.4; D=r₂, II target probability = 0.75.
- (a)Calculate all requested quantities in the stated order. Output order: P(I); P(II).
Answer
Standard solution (without a calculator)
- Build the mathematical model and substitute the data. P(I)=r₁+q₁q₂P(I).
- Written solution: q₁q₂=(3/5)(1/4)=3/20; 1−q₁q₂=17/20.
- P(I)=2/5+(3/20)P(I) ⇒ P(I)=(2/5)/(17/20)=8/17.
- P(II)=(3/5)(3/4)+(3/20)P(II) ⇒ P(II)=9/17.
- Retain exact fractions in written work; round only the final answer.
When to use it
Player I starts; the two players alternate independent trials with unchanged rules. At each turn q is the probability of continuing and r is the probability of the designated immediate stopping outcome; all other outcomes also stop play. Find the final designated-outcome probabilities for I and II.
Input order
- A=q₁, I continue probability
- B=q₂, II continue probability
- C=r₁, I target probability
- D=r₂, II target probability
- At B? a blank copies the current A; at D? a blank copies the current C. Entering 0 instead sets a genuine zero probability. If both target probabilities are zero, both results are zero even if play never ends. Otherwise require 1−q₁q₂≥10⁻¹⁰; invalid data cause Math ERROR. The two target probabilities need not sum to 1 because other stopping outcomes may exist.
Output order
- P(I)
- P(II)
- Record the value and press EXE.
- The program has ended. Press AC to leave; EXE runs it again.
Conditions and limitations
- 0≤q₁,q₂,r₁,r₂≤1; q₁+r₁≤1; q₂+r₂≤1.
- r₁=r₂=0 ⇒ P(I)=P(II)=0.
- r₁+r₂>0 ⇒ 1−q₁q₂≥10⁻¹⁰.
- At B? a blank copies the current A; at D? a blank copies the current C. Entering 0 instead sets a genuine zero probability. If both target probabilities are zero, both results are zero even if play never ends. Otherwise require 1−q₁q₂≥10⁻¹⁰; invalid data cause Math ERROR. The two target probabilities need not sum to 1 because other stopping outcomes may exist.
- Use consistent units throughout.
- Finite precision can lose small differences between large numbers or probabilities extremely near 0 or 1. An error marker is never a valid answer.
Checking access…