Sie sind auf Seite 1von 5

Numerical Techniques (Single Variable)

Unimodal Function
A function of one variable is said to be unimodal if, given that two values of
the variable are on the same side of the optimum, the one nearer to the
optimum gives the better functional value (i.e., smaller value in case of
minimization problem). Mathematically, a function f ( x ) is unimodal if ( i )

x1 < x2 < x implies that f ( x2 ) < f ( x1 ) and ( ii ) x2 > x1 > x implies that
f ( x2 ) > f ( x1 ) , where x is the minimum point.

Bracketing Methods
Exhaustive Search Method
The optimum of a function is bracketed by calculating the function values at
a number of equally spaced points. The search begins from lower bound on
the variable and three consecutive function values are compared at a time
based on the assumption of unimodality. Based on the outcome of the
comparison the search either terminated or continued by replacing one of the
three points by a new point. The search continues until the minimum is
bracketed.

a x1 x2 x3

Numerical Techniques (Single Variable)

Algorithm:
Step 1: Set x1 = a , x = ( b a ) / n ( n is the number of intermediate points),

x2 = x1 + x , x3 = x2 + x .
Step 2: If f ( x1 ) f ( x2 ) f ( x3 ) , the minimum point lies in

( x1, x3 ) ,

Terminate.

Else,

x1 = x2 , x2 = x3 , x3 = x2 + x , and GOTO Step 3.


Step 3: Is x3 b ? If YES GOTO Step 2.
Else,
No minimum exists in ( a, b ) or a boundary point ( a or b ) is the
minimum point.

Problem:
Minimize f ( x ) = x 2 + 54 / x in the interval ( 0, 5 ) .
Solution:
Number of intermediate points n = 10 , a = 0, b = 5 .
Step1: Set x1 = a = 0 ,

x = ( b a ) / n = ( 5 0 ) /10 = 0.5 ,

x2 = x1 + x = 0 + 0.5 = 0.5 ,

x3 = x2 + x = 0.5 + 0.5 = 1.0 .

Step 2: Computing functions at various points,


f ( 0 ) = , f ( 0.5 ) = 108.25, f (1.0 ) = 55.00 .
Comparing these functions, it is seen that f ( x1 ) > f ( x2 ) > f ( x3 ) ,
i.e., the minimum point does not lie in ( 0,1) .
So, set x1 = x2 = 0.5, x2 = x3 = 1.0,

x3 = x2 + x = 1.0 + 0.5 = 1.5 ,

and GOTO Step 3.

Numerical Techniques (Single Variable)

Step 3: At this step, it is observed that ( x3 5 ) x3 b , so GOTO Step 2.


This completes one iteration.
With n = 10 , the accuracy of the solution is 2 ( b a ) / n = 2 ( 5 0 ) /10 = 1.0 .
n = 10000 , the obtained interval is

In the above problem, with

( 2.9995,

3.0005 ) .

Bounding Phase Method

Algorithm:
Step 1: Choose an initial guess x( ) and an increment . Set k = 0 .
0

Define the search direction

Step 2: If f x ( )
0

f x(

( ) ) f ( x( ) + ) , then is positive;

f x(

Else,

If f x ( )
0

( ) ) f ( x( ) + ) , then is negative;
0

Else,
GOTO Step 1.
Exponential search strategy

Step 3: Set x(

k +1)

Step 4: If f x (

= x ( ) + 2k .

k +1)

( ) ) , set k = k + 1 and GOTO Step 3;

< f x(

Else,

The minimum lies in the interval x (

k 1)

, x(

k +1)

) and Terminate.

If the chosen is large, the bracketing accuracy of the minimum point is


poor but the bracketing of the minimum is faster.

Numerical Techniques (Single Variable)

Region-Elimination Methods
The fundamental rule for region-elimination methods is as follows:
Let us consider two points x1 and x2 which lie in the interval ( a, b ) and
satisfy x1 < x2 . For unimodal functions for minimization, it can be concluded
that:
If f ( x1 ) > f ( x2 ) then the minimum does not lie in ( a, x1 ) .
If f ( x1 ) < f ( x2 ) then the minimum does not lie in ( x2 , b ) .
If f ( x1 ) = f ( x2 ) then the minimum does not lie in ( a, x1 ) and ( x2 , b ) .
f ( x)

x1

x2

Interval Halving Method

f ( x)

x1

xm

x2

Numerical Techniques (Single Variable)

Algorithm:
Step 1: Choose lower bound a and upper bound b . Choose also a small
number . Let xm = ( a + b ) / 2, L0 = L = b a . Compute f ( xm ) .
Interval is divided into four equal segments

Step 2: Set x1 = a + L / 4, x2 = b L / 4 . Compute f ( x1 ) and f ( x2 ) .


Step 3: If f ( x1 ) < f ( xm ) set b = xm ; xm = x1 ; GOTO Step 5.
Else,
GOTO Step 4.
Step 4: If f ( x2 ) < f ( xm ) set a = xm ; xm = x2 ; GOTO Step 5.
Else,
set a = x1 ; b = x2 ; GOTO Step 5.
Step 5: Calculate L = b a . If L < , Terminate.
Else,
GOTO Step 2.
At each iteration two new function evaluations are performed and the
interval reduces to half of that at the previous iteration. Thus the interval

( 0.5)

reduces to about

L0 after n iterations. The iteration required to

achieve a desired accuracy can be computed by solving the following


equation:

( 0.5) ( b a ) =
n

Das könnte Ihnen auch gefallen