About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
August 2014
<<July August September>>
If the costs were equal, the best way to solve this problem would be a binary search. However, since erring on one side costs more, we should skew the search.
Using the following dynamic programming:
f(1) = 0
f(n) = min_{0<i<n} [i/n*(f(i)+10) + (n-i)/n*(f(n-i)+1)]
f(100) = ?
we can find the best strategy, which costs, on average, 26.5 cents.
If you have any problems you think we might enjoy, please send them in. All replies should be sent to: ponder@il.ibm.com