Using Ternary search to find the maximum value of a function with 3 variables

Revision en1, by TimberLee, 2016-05-31 18:26:00

I am trying to solve this problem using ternary search.

It asks to find the maximum of the function x^a·y^b·z^c. Where, x+y+z <= S.

I understood the concept of ternary search but I am unable to apply it to this particular problem.

Can somebody help ?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English TimberLee 2016-06-07 23:18:53 313
en1 English TimberLee 2016-05-31 18:26:00 387 Initial revision (published)