On Fibonacci search method with k-Lucas numbers

On Fibonacci search method with k-Lucas numbers

Applied Mathematics and Computation 143 (2003) 523–531 www.elsevier.com/locate/amc On Fibonacci search method with k-Lucas numbers B€ unyamin Yildiz ...

89KB Sizes 8 Downloads 185 Views

Applied Mathematics and Computation 143 (2003) 523–531 www.elsevier.com/locate/amc

On Fibonacci search method with k-Lucas numbers B€ unyamin Yildiz *, Erdal Karaduman Department of Mathematics, Faculty of Arts and Sciences, Atat€urk University, 25240 Erzurum, Turkey

Abstract In this paper, using k-Lucas numbers instead of conventional Fibonacci numbers and conventional Lucas numbers, we have made more improvements on location of the intervals containing optimal point in the classical Fibonacci search algorithm. For that aim, using a well known test function in Optimization Theory, a computer program was developed in MAPLE to examine this idea. It was shown that the our method is giving better results than the previous method in the sense that converging the optimal point more rapidly. Ó 2002 Elsevier Science Inc. All rights reserved. Keywords: One dimensional optimization; Unimodal function; Fibonacci numbers; k-Lucas numbers

1. Introduction The classical methods of optimization are useful in finding the optimum of continuous and differentiable functions. These methods are analytical and make use of the techniques of differential calculus in locating the optimum points. Since some of the practical problems raising in many scientific areas involve objective functions that are not continuous and differentiable, the classical optimization techniques have limited scope in practical applications. However, a study of the calculus methods of optimization forms a basis for

*

Corresponding author. E-mail address: [email protected] (B. Yildiz).

0096-3003/02/$ - see front matter Ó 2002 Elsevier Science Inc. All rights reserved. doi:10.1016/S0096-3003(02)00378-8

524

B. Yildiz, E. Karaduman / Appl. Math. Comput. 143 (2003) 523–531

developing most of the numerical techniques of optimization. The differential calculus method of optimization is an analytical approach and is applicable to continuous and twice-differentiable functions. In this method, the calculation of the numerical value of the objective function is virtually the last step of the process. The optimal value of the objective function is calculated after determining the optimal values of the decision variables. In the numerical methods of optimization as in Fibonacci search method, an opposite procedure is followed in that the values of the objective function are first found at various combinations of the decision variables and conclusions then drawn regarding the optimal solution [1,2]. 2. The Fibonacci search method A unimodal function is one that has only one peak (maximum or minimum) in a given interval. Thus, 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, then the one nearer the optimum gives the better functional value, i.e., the smaller value in the case on a minimization problem. Thus a unimodal function can be a nondifferentiable or even a discontinuous function. If a function is known to be unimodal in a given range, the interval in which the minimum lies can be narrowed down provided the function values are known at two different points in the range. The assumptions of unimodality are made in all the elimination techniques. If a function known to be multimodal the range of the function has to be subdivided into several parts and each part treated separately as a unimodal function. In order to apply the Fibonacci search method in a practical problem, the following criteriaÕs must be satisfied: (i) The initial interval of uncertainty, in which the optimum lies, has to be known. (ii) The function being optimized has to be unimodal in the initial interval of uncertainty. (iii) The exact optimum cannot be located in this method. Only an interval, known as the final interval of uncertainty will be known. The final interval of uncertainty can be made as small as desired by making more computations. (iv) The number of function evaluations to be used in the search or the resolution required has to be specified beforehand. Now we shortly introduce Fibonacci numbers and k-Lucas numbers. For a positive integer k P 2, the k-Fibonacci sequence fgnðkÞ g is defined as ðkÞ

ðkÞ

g1 ¼    ¼ gk2 ¼ 0;

ðkÞ

ðkÞ

gk1 ¼ gk ¼ 1

B. Yildiz, E. Karaduman / Appl. Math. Comput. 143 (2003) 523–531

525

and for n > k P 2, ðkÞ

ðkÞ

ðkÞ

gnðkÞ ¼ gn1 þ gn2 þ    þ gnk : We call gnðkÞ the nth k-Fibonacci number. The well-known Fibonacci sequence is defined as F1 ¼ F2 ¼ 1

and

for n > 2;

Fn ¼ Fn1 þ Fn2 : ðkÞ

ðkÞ

Moreover, the k-Lucas sequence is defined as lðkÞ n ¼ gn1 þ gnþkþ1 for n P 1. ðkÞ We call lðkÞ the nth k-Lucas number. Then we have lj ¼ 2j1 , j ¼ 1; 2; . . . ; n ðkÞ k1 k  1, and lj ¼ 2 þ 1. For example, if k ¼ 5, then the 5-Lucas sequence is 1; 2; 4; 8; 17; 32; 63; 124; 244; 480; 943; 1854; 3645; 7166; . . . :

3. Improved Fibonacci search algorithm Now, we investigate the solution of the f ðxÞ ! min x2½a;b

minimization problem, where the function f ðxÞ is unimodal on the interval. Let the number of iteration, the interval that involving optimal point and the objective function be given. Let lðkÞ m denote mth k-Lucas number. Then our algorithm proceeds as follows: Step Step Step Step

1. 2. 3. 4.

Initialize a, b, f ðxÞ From m ¼ 1 to n do Choose as ½a1 ; b1 ¼ ½a; b and take m ¼ 1 Calculate the points ðkÞ

xm ¼ am þ ðbm  am Þ

lnmþ1 ðkÞ

lnmþ3

ðkÞ

;

x0m ¼ a1 þ ðb1  a1 Þ

lnmþ2 ðkÞ

lnmþ3

Step 5. Calculate the values f ðxm Þ and f ðx0m Þ. Step 6. If ðxm Þ 6 f ðx0m Þ then ½amþ1 ; bmþ1 ¼ ½amþ1 ; x0m . Otherwise (if f ðxm Þ > f ðx0m ÞÞ ½amþ1 ; bmþ1 ¼ ½xm ; bmþ1 : Step 7. If m þ 1 6¼ n then go to Step 4, otherwise stop the iteration.

526

B. Yildiz, E. Karaduman / Appl. Math. Comput. 143 (2003) 523–531

Throughout the steps above, the points xm and x0m will be symmetrical according to the middle point of the interval ½am ; bm and the minimum point x will be the element of the interval ½am ; bm for m ¼ 1; . . . ; n. In each iteration (for 2 6 m 6 nÞ, length of the interval is given by ðkÞ

bm  am ¼ ðb  aÞ

lnmþ3 ðkÞ

lnþ2

and the last interval is located as ðkÞ

xn ¼ an þ ðbn  an Þ

l1

ðkÞ l3

ðkÞ

;

x0n ¼ an ðbn  an Þ

l2

ðkÞ

l3

and the value of the objective function at optimal point x^ is calculated by  ðbn  an Þ f ð^ x Þ ¼ f an þ : 2 

The error of the improved method is given by the following estimate j^ x  x j 6

1 1 ðbn  an Þ ¼ ðb  aÞ ðkÞ : 2 lnþ2

4. Test problem to compare the improved method with classical Fibonacci search method In order to compare the classical Fibonacci search method with our method on a well known test problem, A MAPLE procedure of which the source code was given in Appendix A, was developed [3]. The code was developed in MAPLE V Release 4.0a. Example 1. Let us consider the function [4]    ðx  1Þ ðx  1Þ þ1 þ sin p 1 þ f ðxÞ ¼ 4 4 on the interval ½3; 3 . Minimum point for this function is x ¼ 1:0. Minimum value of this function is f ðx Þ ¼ 1:0000 (see Fig. 1).

B. Yildiz, E. Karaduman / Appl. Math. Comput. 143 (2003) 523–531

527

Fig. 1. Graphical demonstration of the objective function given in Example 1.

Results of both the improved and classical Fibonacci search method for a number of iterations and a number of k-Lucas numbers are as shown. Table 1 Results of the improved method for the test objective function given in Example 1 for various number of iteration of n ¼ 4; 8; 16, for 3-Lucas numbers k¼3

Last interval determined

Minimal value of the objective function

Num. ite.

Classical method

k-Lucas improved method

Classical method

Improved method

n¼4 n¼8 n ¼ 16

½0; 1:50000 ½0:92727; 1:45454 ½0:99845; 1:00309

½0:142851; 1:92857 ½0:82126; 1:09303 ½0:99596; 1:00304

1.50768 1.07527 1.00160

1.036972 1.04436 1.00051

Table 2 Results of the improved method for the test objective function given in Example 1 for various number of iteration of n ¼ 5; 10; 20, and 4-Lucas numbers k¼4

Last interval determined

Minimal value of the objective function

Num. ite.

Classical method

k-Lucas improved method

Classical method

Improved method

n¼5 n ¼ 10 n ¼ 20

½0:69230; 1:61538 ½0:95833; 1:04166 ½0:99954; 1:00022

½0:267774; 1:63387 ½0:94417; 1:14077 ½0:99921; 1:00137

1.31624 1.04313 1.00023

1.05092 1.04396 1.00030

528

B. Yildiz, E. Karaduman / Appl. Math. Comput. 143 (2003) 523–531

Table 3 Results of the improved method for the test objective function given in Example 1 for various number of iteration of n ¼ 6; 12; 24, for 5-Lucas numbers k¼5

Last interval determined

Minimal value of the objective function

Num. ite.

Classical method

k-Lucas improved method

Classical method

Improved method

n¼6 n ¼ 12 n ¼ 24

½0:71428; 1:28571 ½0:97877; 1:01061 ½0:99996; 1:00006

½0:48603; 1:47638 ½0:96650; 1:01811 ½0:99981; 1:00009

1.29394 1.01098 1.00003

1.01946 1.00796 1.0004

5. Results and discussion In one-dimensional optimization, one of the best algorithms is Fibonacci methodÕs algorithm. In this study, we have made improvements on Fibonacci search method, which gives better results than classical Fibonacci search method for small iteration numbers. Furthermore, when locating involved optimal point by k-Lucas numbers instead of conventional Fibonacci numbers and conventional Lucas numbers in classical Fibonacci search algorithm, the our method gives better results. It was shown by a well known optimization test problem and the results were given in Tables 1–3. As it can be seen form the tables, length of the last intervals computed by our method for each number of iteration and k-Lucas numbers are smaller than classical Fibonacci search method. Moreover, the optimal values of the objective functions are more sensitive in the our method. Some of the optimization methods for multivariate functions, such as PowellÕs method, consist of one dimensional search algorithms in order to converge to the optimum points. Since the improved method converges to the optimal points more fast and outputs more accurate value of the objective function at that point, it is considered that the our method will make crucial contribution to such methods especially when applied large scaled optimization problems in terms of computation times and accurateness of the objective function value at optimal points. Appendix A. MAPLE source code to find optimal points of a given unimodal function using Fibonacci search method and the improved method [Improved: ¼ proc (f ::procedure, Lucas ::procedure, n, a0, b0)] # n: number of iteration # a0: beginning point of the starting interval # b0: end point of the starting interval # f(x): The objective function

B. Yildiz, E. Karaduman / Appl. Math. Comput. 143 (2003) 523–531

529

# minFib1: Minimum value of the function at starting point of the last interval computed by Fibonacci Search Method # minFib2: Minimum value of the function at ending point of the last interval computed by Fibonacci Search Method # minLucas: Minimum value of the function computed by The Improved Method # k: k-Lucas Numbers local a, b, x, m, minFib1, minFib2, minLucas; # Loading MAPLEÕs combinat package to Generate Fibonacci numbers with (combinat, Fibonacci): a: ¼ array(1..n+1):b: ¼ array(1..n+1): x: ¼ array(1..n+1, 1..2): a[1]: ¼ a0:b[1]: ¼ b0: > > > > > >

Improved: ¼ proc(f::procedure, Lucas::procedure, n, m, a0, b0) local a, b, x, m, minFib1, minFib2, minLucas; with(combinat, Fibonacci): a :¼ arrayð1::n þ 1Þ: b :¼ arrayð1::n þ 1Þ: x :¼ arrayð1::n þ 1; 1::2Þ: a½1 :¼ a0: b½1 :¼ b0:

> > > > > > > > > > > > > >

#- - - - - - - - Fibonacci search method- - - - - - - for m from 1 to n do  x½m; 1 :¼ a½m þ ðb½m  a½m Þ Fibonacciðn  m þ 1Þ=Fibonacciðn  m þ 3Þ:  x½m; 2 :¼ a½m þ ðb½m  a½m Þ Fibonacciðn  m þ 2Þ=Fibonacciðn  m þ 3Þ: if evalfðf ðx½m; 1 ÞÞ <¼ evalfðf ðx½m; 2 ÞÞ then a½m þ 1 :¼ a½m : b½m þ 1 :¼ x½m; 2 : else a½m þ 1 :¼ x½m; 1 : b½m þ 1 :¼ b½m : fi: od: minFib1: ¼ evalfðf ðb½m  1 ÞÞ: minFib2: ¼ evalfðf ða½m  1 ÞÞ: lprintðevalfða½m  1 Þ; evalfðb½m  1 ÞÞ;

> > > >

>#- - - - - - - - The improved method- - - - - - - for m from 1 to n do  x½m; 1 :¼ a½m þ ðb½m  a½m Þ Lucasðn  m þ 1; kÞ=Lucasðn  m þ 3; kÞ:  x½m; 2 :¼ a½m þ ðb½m  a½m Þ Lucasðn  m þ 2; kÞ=Lucasðn  m þ 3; kÞ: if evalfðf ðx½m; 1 ÞÞ <¼ evalfðf ðx½m; 2 ÞÞ then

530

B. Yildiz, E. Karaduman / Appl. Math. Comput. 143 (2003) 523–531

> > > > > > > > > > > > > > > >

a½m þ 1 :¼ a½m : b½m þ 1 :¼ x½m; 2 : else a½m þ 1 :¼ x½m; 1 : b½m þ 1 :¼ b½m : fi: od: lprintðevalfða½m  1 Þ; evalfðb½m  1 ÞÞ; if minFib 1 < minFib2 then lprint(minFib1): else lprint(minFib2); fi: minLucas: ¼ evalfðf ða½m  1 þ ðb½m  1  a½m  1 Þ=2:ÞÞ: lprint(minLucas); end:

> > > > > > > > > > > > > > > > >

>#- - - - - - - - k-Lucas numbers generator procedure - - - - - - - Lucas: ¼ procðn; kÞ local i, j, l: for i from 1 to k  1 do Lucasði; kÞ :¼ 2^ ði  1Þ: od: Lucasðk; kÞ :¼ 1 þ 2^ ðk  1Þ: for i from k þ 1 to n do Lucasði; kÞ :¼ 0: for j from 1 to k do Lucasði; kÞ :¼ Lucasði  j; kÞ þ Lucasði; kÞ: od: od: for i from 1 to n do lprintðLucasði; kÞÞ: od: end: f :¼ procðxÞf :¼ ðabsððx  1Þ=4Þ þ absðsinð3:14159  ð1 þ ðx  1Þ=4ÞÞÞ þ 1Þ; end;

References [1] P.E. Gill, W. Murray, M.H. Wright, Practical Optimization, Academic Press, London, 1981. [2] B.D. Sivazlian, L.E. Stanfel, Optimization Techniques in Operations Research, Prentice-Hall Inc., New Jersey, 1975.

B. Yildiz, E. Karaduman / Appl. Math. Comput. 143 (2003) 523–531

531

[3] R. Nicolaides, N. Walkington, MAPLE: A Comprehensive Introduction, Cambridge University Press, New York, 1996. [4] D. Ratz, A nonsmooth global optimization technique using slopes: the one-dimensional case, J. Global Optim. 14 (4) (1999) 365–393.