Fibonacci Method
Fibonacci Method
Another class of methods of unidimensional minimization locates a point x near x*, the value of
the independent variable corresponding to the minimum of f(x), by extrapolation and
interpolation using polynomial approximations as models off (x). Both quadratic and cubic
approximation have been proposed using function values only and using both function and
derivative values. In functions where f '(x) is continuous, these methods are much more
efficient than other methods and are now widely used to do line searches within multivariable
optimizers.
a) Quadratic Interpolation
We start with three points x1, x2, and x3 in increasing order that might be equally spaced, but the
extreme points must bracket the minimum. We know that a quadratic function, f(x) = a+bx + cx2
can be passed exactly through the three points, and that the function can be differentiated and the
derivative set equal to 0 to yield the minimum of the approximating function:
(1)
Suppose that f(x) is evaluated at x1, x2 and x3 to yield f(x1) ≡ f1, f(x2) ≡f2, f(x2)≡ f3. The
coefficients b and c can be evaluated from the solution of the three linear equations:
(2)
(3)
(4)
via determinants or matrix algebra. Introduction of b and c expressed in terms of x1, x2, x3,, fl, f2,
and f3, into Equation (1) gives :
(5)
To illustrate the first stage in the search procedure, examine the four points in Figure 1 for stage
1.
Figure 1: Two stages of quadratic interpolation.
We want to reduce the initial interval [x1, x3]. By examining the values of f(x) [with the
assumptions that f(x) is unimodal and has a minimum], we can discard the interval from x1 to x2
and use the region (x2, x3) as the new interval. The new interval contains three points, (x1,, , x3)
that can be introduced into Equation (5) to estimate a x*, and so on. In general, you evaluate
f(x*) and discard from the set {x1, x2, x3} the point that corresponds to the greatest value of f(x),
unless a bracket on the minimum of f(x) is lost by so doing, in which case you discard the x so as
to maintain the bracket. The specific tests and choices of xi to maintain the bracket are illustrated
in Figure 2
Figure 2: How to maintain a bracket on the minimum in quadratic interpolation
Example 1
Solution.
x1 = 2; x2 = 4; and x3 = 6
=3
x1 = 2; x2 = 3; and x3 = 4
And f(x1) = 3; f(x2) = 2 and f(x3) = 3
=3
Example 2
Solution.
x1 = -2; x2 = 1; and x3 = 5
Recall
= 1.25
2.125
Eliminate x3 since f(x3) has the least value. Hence stage 2 three points are:
x1 = -2 ; x2 = 1; x3 = 1.25
= 1.25
b) Cubic Interpolation
Cubic interpolation to find the minimum of f(x) is based on approximating the objective function
by a third-degree polynomial within the interval of interest and then determining the associated
stationary point of the polynomial:
Four points must be computed (that bracket the minimum) to estimate the minimum, either four
values of f(x), or the values of f(x) and the derivative of f(x), each at two points.
In the former case four linear equations are obtained with the four unknowns being the desired
coefficients. Let the matrix X be:
F = X*A
Then the extremum of f(x) is obtained by setting the derivative of f(x) equal to zero and solving
for .
The sign to use before the square root is governed by the sign of the second derivative of f( ),
that is, whether a minimum or maximum is sought. The vector A can be computed from XA = F
or
A = X-1F
After the optimum point i is predicted, it is used as a new point in the next iteration and the point
with the highest [lowest value of f(x) for maximization] value of f(x) is discarded.
If the first derivatives of f(x) are available, only two points are needed, and the cubic function
can be fitted to the two pairs of the slope and function values. These four pieces of information
can be uniquely related to the four coefficients in the cubic equation, which can be optimized for
predicting the new, nearly optimal data point. If (x1,f1, f’1)and (x2,f2, f’2) are available, then the
optimum is :
In a minimization problem, you require x1 < x2, f’1 < 0, and f’2> 0 (x1 and x, bracket the
minimum). For the new point ( ), calculate f’( ) to determine which of the previous two points
to replace.
Given a normalized interval where should two points be chosen such that:
0 x1 x2 1
x2 – 0 = 1- x1 or x1 = 1 – x2 (1)
and by condition 2 :
(2) [constant ratio]
(3a)
(3b)
r = 0.61803
(1-r) = 0.38197
In the figure below, the search was started within an interval [ao, bo]
ao x1 x2 bo
We have to evaluate the function, f at two intermediate points. We choose the intermediate
points in such a way that the reduction in the range is symmetric.
The interval is broken up in the way that we will be able to limit ourselves to one single
calculation our new position, xi and one of the evaluation per iteration
NOTE
Example
The function f(x) = ex+2-Cos(x) has a minimum value within [-3,1] .Use the golden section
elimination method to find the minimum to within 0.004
In the golden search method a constant ratio is used at each iterative step, but in the Fibonacci
method the ratio for the reduction of interval at each iteration is varied . Just as it in the golden
section search technique, two function evaluations are made at the first iteration, thereafter only
one function evaluation is made for subsequent iterations. The number of iterations is
predetermined and based on the specified tolerance.
Fibonacci Number
The Fibonacci search is based on the sequence of Fibonacci numbers which are defined by the
equations:
F0 = 1, F1 = 1
1 , 1, 2, 3, 5, 8, 13, 21, 34 respectively for F0, F1, F2, F3, F4, F5, F6, F7, F8, ...
Fibonacci Search
Recall that we need two intermediate points at each stage, one comes from a previous iteration
and the other is a new evaluation point. However, with rN = ½ the two intermediate points
coincide in the middle of the uncertainty interval, and thus we cannot further reduce the
uncertainty range.
To get around this problem, we perform the new evaluation for the last iteration using rN =
½ - εo
The new evaluation point is just to the left or right of the midpoint of the uncertainty interval.
As a result of the modification, the reduction in the uncertainty range at the last iteration may be
either rN = 1/2
a0| a1 b1 b0
Note also that the value of the ratio varies with the iteration number
Example
Consider the function f(x) = x4-14x3+60x2-70x.. Use the Fibonacci search method to find the
value of x that minimizes the function over the range [0,2]. Locate this value to within the range
or tolerance of 0.3
Solution
Hence N= 4 will do
0 ¾ 5/4 2
a0 a1 b1 b0
Since f(b1) > f(a1), we eliminate b0, so that the range is now reduced to [a0, b1] = [0, 5/4]
Note that as the upper boundary moved to b1, a1 is now retained as the new b1, hence we
are left with determining ONLY the new a1
0 ½ ¾ 5/4
a0 a1 b1 b0
Since f(a1) > f(b1), we eliminate a0, so that the range is now reduced to [a1, b0] = [1/2, 5/4]
Note that as the lower boundary moved to a1, b1 is now retained as the new a1, hence we are
left with determining ONLY the new b1
1/2 ¾ 1 5/4
a0 a1 b1 b0
Since f(b1) > f(a1), we eliminate b0, so that the range is now reduced to [a1, b0] = [1/2, 1]
Note that as the upper boundary moved to b1, a1 is now retained as the new b1, hence we
are left with determining ONLY the new a1
a0 a1 b1 b0
Since f(a1) > f(b1), we eliminate a0, so that the range is now reduced to [a1, b0] = [0.725 1]
The final boundary is [0.725,1] thus giving a range of .275 which is less than 0.3
Summary of iteration
a0 b0 a1 b1 f(a1) f(b1)
0 2 ¾ 5.4 -24.34 -18.65
0 5/4 ½ ¾ -21.69 -24.34
½ 5/4 ¾ 1 -24.34 -23
½ 1 0.725 3/4 -24.27 -24.34