A univariate method is used to solve a univariate problem. A fast method is important in optimization. Similarly like a univariate problem, a multivariate method is used solve an equivalent multivariate unconstrained optimization problem. Solving a multivariate problem often requires solving multiple

univariate problems such as line search. Many multivariate unconstrained optimization models uses a line search.

One of the simplest univariate problem is bracket search method. Consider we have a 3-point bracketing interval containing a minimum, and contains the minimum. To solve, we compute a fourth point according to interval dividing to form two overlapping sub-intervals and . The smaller sub-interval of the two which contains the new minimum is chosen. We repeat the same procedure to divide the interval until the chosen sub-interval is sufficiently small, i.e., till we have convergence. This particular algorithm is the most effective for a unimodal function in interval . A unimodal function that increases (or decreases) from until a certain point and then it decreases (or increases) towards . It contains exactly one minimum (or maximum) in the interval.

Consider a unimodal function that has a minimum in . This interval is called the range of uncertainty. With the help of four points, we can determine the minimum. A dichotomous search says that if is located in . Now there are two possibilities. Either or . Combining them gives the .

Similarly, if , we have andΒ if , we have .

A simple dichotomous search can simply divide the interval roughly into two each time. Hence the size of the intervals or sub-intervals decreases exponentially. After about 7 iterations, the interval size reduces to less than 1% of the interval. There are a total of 14 evaluations of the function as each iterations requires two computations, and .

## Fibonacci Search Method

We will first start with the analysis of the interval size. Now for simplicity and making over life easier by ridding the complexity, we will assume the left and right sub-intervals to be of same length.

We have,

For n iterations, we have the following recurrence relationship.

Β Β Β Β ….

Β From the above iterations we can see that, there are n number of equations and we will assume that is known. There areΒ variables. Now here we will impose one additional condition to generate a sequence of intervals.

The Fibonacci sequence in particular is generated if we assume that the interval in the last iteration vanishes or becomes zero. That is, .

Now solving the above set of equations, we have

Where,

Where, is the definition of the Fibonacci sequence, {1,1,23,5,8,13,β¦}.

One of the major drawback of using the Fibonacci Sequence is that it requires a prior knowledge of n.Β

## Golden Section Search

Unlike the Fibonacci Sequence search, the golden section search carries out iterations until the desired accuracy of the function is achieved. The recursive relation is the same as Fibonacci method, . The additional condition is that to keep the ratio of the two adjacent intervals

constant. Therefore we haveΒ .

Using the above two equations, we have .

This number is known as the golden ratio. The interval sequence isΒ

For example, {100, 61.8, 38.2, 23.6, 14.6, 9, …} THis can go on without a predetermined n.

We can compare the efficicanc between the Fibonacci earch method and the golden-section search method. Relation between the and K is . IN the Fibonacci search method, the region of uncertainity is . For the golden-section search, it is .Β

Hence the relation between the two can be given as ratio, .

Hence, the golden-section search method needs more iterations to achieve the same accuracy as the Fibonacci Method.The Fibonacci method is more efficient, but the golden-section search method does not require prior knowledge of n.

Β

## Brent’s Search.

The golden-section search method has a linear convergence rate. The parabolic search method has a higher convergence rate than that of the golden-section search method and the Fibonacci search method. Hence the parabolic search method is more efficient. In this method, again for each of the bracketing intervals , we choose three points . We approximate the function in this interval by using a quadratic function, i.e., a parabola.

With the three points, we can solve the coefficients of the polynomial by solving a system of three simultaneous linear equatins. The minimum of , can be easily determined by solving the first derivative with equal to zero.

By using Taylor’s expansion, will be sufficiently close to , or at the exact position if the function is quadratic. By checking , we can choose a new interval by rejecting either or and keepingΒ . We repeat teh process until all the three points are sufficiently close to .

While the parabolic search has a very good linear convergence rate, it does not always converge. For example, if the three points are collinear, the resulting parabola is degenerate and thus does not provide a new candidate point. This method is therefore, mostly used alone.

Brent’s search method combines both the parabolic search and the golden-section search method. Brent’s search method uses the parabolic search whenever applicable and when the condition for the parabolic search method fails, it then switches to the golden-section search method. Hence, Brent’s search method combines best of both the methods, simple and good convergence ratio and a guarantee of finding the minimum. Therefore, we always use the Brent’s search method as the default method for univariate optimization problems.

Β

The following code solves for the log-gamma function using the Fibonacci search, the golden-section search and the Brent’s search

` ````
```val f: LogGammaFunction = object : newLogGammaFunction() {
override fun evaluate(x: Double, y: Double): Double {
return LogGamma
}
}
// Optimizes a univariate function using Bracket Seach Minimizer
//BracketSearchMinimizer Solver1
val solver1 = new FibonacciMinimizer(
1e-8, //epsilon
15) // max number of iterations
val soln1 = solver1.solve(LogGamma)
val xmin1: Double = soln1.minimizer(0,5)
val fmin1: Double = f.evaluate(xmin1)
println(String.format("f(%f) = %f", xmin1, fmin1, LogGamma.evaluate(xmin1)))
//BracketSearchMinimizer Solver2
val solver2 = new GoldenMinimizer(
1e-8, //epsilon
15) // max number of iterations
val soln2 = solver2.solve(LogGamma)
val xmin2: Double = soln2.minimizer(0,5)
val fmin2: Double = f.evaluate(xmin2)
println(String.format("f(%f) = %f", xmin2, fmin2, LogGamma.evaluate(xmin2)))
//BracketSearchMinimizer Solver3
val solver3 = new BrentMinimizer(
1e-8, //epsilon
10) // max number of iterations
val soln3 = solver3.solve(LogGamma)
val xmin3: Double = soln3.minimizer(0,5)
val fmin3: Double = f.evaluate(xmin3)
println(String.format("f(%f) = %f", xmin3, fmin3, LogGamma.evaluate(xmin3)))

The Output is

` ````
```f(1.463682) = -0.121484
f(1.460813) = -0.121486
f(1.461632) = -0.121486