Блог пользователя 314rate

Автор 314rate, история, 6 лет назад, По-английски

Hello!

For finding the minimum with Ternary Search we nead a function that respects this conditions :

for all a,b with A ≤ a < b ≤ x, we have f(a) < f(b), and

for all a,b with x ≤ a < b ≤ B, we have f(a) > f(b).

Is there an algorithm ( also running in logaritmic time ) for finding the minimum in a function like this :

for all a,b with A ≤ a < b ≤ x, we have f(a) <= f(b), and

 for all a,b with x ≤ a < b ≤ B, we have f(a) >= f(b).

Thank You!

Полный текст и комментарии »

  • Проголосовать: нравится
  • +9
  • Проголосовать: не нравится