In the fall term of 2015. Nick^2 took COMP 2804. Nick was always sitting in the
ID: 3790990 • Letter: I
Question
In the fall term of 2015. Nick^2 took COMP 2804. Nick was always sitting in the back of the classroom and spent most of his tune eating bananas. Nick uses the following banana-buying-scheme: At the start of week 0, there are 2 bananas in Nick's fridge. For any integer n greaterthanorequalto 0. Nick does the following during week n: At the start of week n, Nick determines the number of bananas in his fridge and stores this number in a variable x. Nick goes to Jim's Banana Empire, buys x bananas, and puts them in his fridge. Nick takes n + 1 bananas out of his fridge and eats them during week n. For any integer n greaterthanorequalto 0, let B(n) be the number of bananas in Nick's fridge at the start of week n. Determine the value of B(n).Explanation / Answer
The equation can be formulated as under:-
For Week No 0 or initial conditions Balance B(0) = 2 or B(n) = 2 for n=0
For Week 1 onwards Balance at Beginning of Next Week = Balance at Beginning of Previous week + Same number of Bananas bought from Jim's Banana Empire - (Week No +1)
OR
B(n+1) =B(n) +x- (n+1) where x= B(n)
Therefore B(n+1) = B(n) + B(n) - (n+1)
or B(n+1) = 2X B(n) -n + 1 -------- For n>=1
We have tabulated the results of tis equation and the solution terminates in the 2nd week beyond which no real world solution exists.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.