Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » sci.math.* » sci.math

Topic: Recursion Problem
Replies: 11   Last Post: Nov 22, 2011 9:44 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
MTBrenneman@gmail.com

Posts: 983
Registered: 8/21/06
Re: Recursion Problem
Posted: Nov 17, 2011 8:32 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On Nov 17, 5:22 pm, "danhey...@yahoo.com" <danhey...@yahoo.com> wrote:

>
> Since you discard all end of year inventory, B cannot exceed A_n.



In this problem you don't discard all end of year inventory. The place
where you get extra M&Ms when you need them is like a very big
reservoir that has some fixed capacity C. In this problem, we are
essentially assuming that C is large enough that it can cover the
deficit from all the years. We will let c(i) denote the number of M&Ms
in the reservoir in the ith year. The goal is to find the maximum
value of B such that c(n) = C. You only discard M&Ms when the excess,
i.e. A_i - B) + c(i-1) > C (which is the excess that the reservoir
cannot contain).


Matt



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.