subject

In order to save money for a new stall in her barn, bessie the cow has started performing in the local circus, demonstrating her
remarkable sense of balance as she carefully walks back and forth on an elevated balance beam!
the amount of money bessie earns in her performance is related to where she manages to ultimately jump off the beam. the
beam has positions labeled 0, 1, + 1 from left to right. if bessie ever reaches 0 or n + 1 she falls off one of the ends of the
beam and sadly gets no payment.
if bessie is at a given position k, she can do either of the following:
1. flip a coin. if she sees tails, she goes to position k-1, and if she sees heads, she goes to position k + 1 (.e.
either occurrence).
probability of
2. jump off the beam and receive payment of f(k) (0 bessie realizes that she may not be able to guarantee any particular payment outcome, since her movement is governed by
random coin flips. however, based on the location where she starts, she wants to determine what her expected payment will be
if she makes an optimal sequence of decisions ("optimal" meaning that the decisions lead to the highest possible expected
payment). for example, if her strategy earns her payment of 10 with probability 1/2, 8 with probability 1/4, or 0 with probability
1/4, then her expected payment will be the weighted average 10(1/2) + 8(1/4) + 0(1/4) = 7.
input format (file balance. in):
the first line of input contains n (2 sn 310). each of the remaining n lines contain f( f(n).
output format (file balance. out):
output n lines. on linei, print out 10 times the expected value of payment if bessie starts at position i and plays optimally,
rounded down to the nearest integer.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:30
When creating a budget, log fixed expenses before income. after income. after savings. at the top.
Answers: 1
question
Computers and Technology, 22.06.2019 16:30
You have inserted new slides based on a word outline. how do you format these new slides to match the powerpoint presentation formatting? a. select all slides in the presentation and click format on the home tab. b. select the new slides and click reset on the home tab. c. select all slides in the presentation and click reset on the home tab. d. select the new slides and click format on the home tab.
Answers: 2
question
Computers and Technology, 23.06.2019 23:30
What are "open-loop" and "closed-loop" systems
Answers: 1
question
Computers and Technology, 24.06.2019 00:00
Visualizing a game of β€œtag” to remember the meaning of contagious
Answers: 3
You know the right answer?
In order to save money for a new stall in her barn, bessie the cow has started performing in the loc...
Questions
question
Mathematics, 19.04.2021 21:10
question
Biology, 19.04.2021 21:10
question
Mathematics, 19.04.2021 21:10
question
English, 19.04.2021 21:20
Questions on the website: 13722361