Question 8
Tina stumbles upon a lottery chart dropped by a time traveler from the future, which lists winning lottery numbers and positive integer cash payouts for the next days. Tina wants to use this information to make money, but is worried if she plays winning numbers every day, lottery organizers will get suspicious. As such, she decides to play the lottery infrequently: at most twice in any seven day period.
In this problem, we will build up towards an -time algorithm to determine the maximum amount of lottery winnings Tina can win in the next days by playing the lottery infrequently.
Based on the above data, answer the given subquestions.
Let be the cash payout of playing the lottery on day . We need to keep track of most recent two plays (or equivalently, restrictions on future plays). Let be maximum lottery winnings playing on suffix of days from to , assuming play on day and next allowable play is on day for and . What is the final answer?