Ternary search
Ternary search
Introduction
A function is given, which is unimodal on the interval .
A unimodal function is understood as one of two behaviors:
- the function first strictly decreases, reaches a minimum, and then strictly increases;
- the function first strictly increases, reaches a maximum, and then strictly decreases.
Assume that the function has the second property, and it is required to find the maximum value
for .
