Start by clarifying the problem constraints (convexity, black-box, no gradients) and then propose a derivative-free method like golden-section search or ternary search. Explain the algorithm's steps, stopping criteria, complexity, and edge cases, then provide clean Python code with tests. Emphasize why this method is suitable for convex functions and how it balances efficiency and simplicity.
Pro tip: Mention that for convex functions, golden-section search achieves linear convergence with a rate of ~0.618 per iteration, and that ternary search can be simpler but less efficient. Also, highlight the importance of handling floating-point precision and interval boundaries.
Confirm that the function is convex, evaluations are expensive, and no gradients are available. Discuss the need for a robust, derivative-free optimization method.
Select golden-section search (or ternary search) due to its guaranteed convergence for unimodal functions. Explain the trade-offs: golden-section is more efficient than ternary search.
Use interval width or function value change below a tolerance. State that each iteration reduces the interval by a constant factor, leading to O(log(1/ε)) evaluations.
Write Python code for golden-section search. Handle cases where the minimum is at boundaries, function is flat, or tolerance is too small. Include input validation.
Test on simple convex functions (e.g., quadratic) and compare with known minima. Check convergence, boundary conditions, and performance with different tolerances.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.