with Artificial Bee Colony Algorithm - CiteSeerX

2 downloads 0 Views 342KB Size Report
equations .we search for approximations to the roots (or zeroes) of a real-valued hard ... x-intercept of this tangent line (which is easily done with elementary ...
World Academy of Science, Engineering and Technology 59 2011

A Novel Iteration Method for solve Hard Problems (Nonlinear Equations) with Artificial Bee Colony Algorithm P. Mansouri, B. Asady, N. Gupta elementary algebra).This x-intercept will typically be a better approximation to the function’s root than the original guess, and the method can be iterated. Also, we solve system of two equations with two parameters (See example2).In this paper, we study a novel iteration method by using ABC algorithm for find real roots of hard Function f ( x ) = 0 , where f : D ⊆ R → R without compute derivative function f ′( x ). We focus to real roots of the non-linear equation | f ( x ) |= 0 .

Abstract—in this study, a novel iteration root-finding method for solving nonlinear equations is proposed. In numerical analysis, Newton–Raphson method is a method for finding successively better approximations to the simple real roots (or zeroes) of a real-valued function f ( x ) = 0 ,but for start requires two things: 1)an suitable value close to the location of a root,2) compute derivative of the function( for hard problem maybe to be difficult) .We are using Artificial Bee Colony Algorithm(ABC).In this way ,we don't need to compute derivative of the function and suitable initial value of root. We add some limitation to ABC algorithm for solving nonlinear equations .we search for approximations to the roots (or zeroes) of a real-valued hard nonlinear equations. Some numerical examples are solved by using the proposed method and compared with results obtained by the Newton–Raphson method. We show our method is converges and good approximation.

Keywords—Iterative method, root-finding problems, Artificial Bee Colony Algorithm

method,

II. ARTIFICIAL BEE COLONY ALGORITHM Artificial Bee Colony Algorithm (ABC) is an algorithm based on the intelligent foraging behavior of honey bee swarm, purposed by Karaboga in 2005 [2]. In ABC model, the colony consists of three groups of bees: employed bees, onlookers and scouts. In the ABC algorithm, the number of employed bees is equal to the number of food sources which is also equal to the number of onlooker bees. There is only one employed bee for each food source whose first position is randomly generated. In the each iteration of the algorithm, each employed bee determines a new neighboring food source of its currently associated food source and computes the nectar amount of this new food source by Equation :

Hard

I.INTRODUCTION

S

OLVING non-linear equations is one of the most important problems in engineering and science. In this paper, we consider iterative methods by using ABC algorithm to find a simple root of a non-linear equation f ( x ) = 0 , where

vij = zij + θij ( zij − zkj ),

f : D ⊆ R → R ,for an open interval D is a real function. The case of multiple roots is not treated. The Newton-Raphson method [1] in one variable: Given a function f ( x ) and its

Where θ ij

(3)

is a random number between [0, 1]. If the

nectar amount of this new food source is higher than that of its currently associated food source, then this employed bee moves to this new food source, otherwise it continues with the old one. After all employed bees complete the search process; they share the information about their food sources with onlooker bees. An onlooker bee evaluates the nectar information taken from all employed bees and chooses a food source with a probability related to its nectar amount by Equation:

derivative algorithm is started with a first guess x 0 for a root of the function. Provided the function is reasonably Wellbehaved a better approximation x1 is x = x − f ( x ) / f ′( x ) , (1) Geometrically, x1 is the intersection with the x-axis of a line tangent to f f at f ( x 0 ) . The process is repeated until a sufficiently accurate value is reached: x n +1 = x n − f ( x n ) / f ′ ( x n ) , ( 2)

n

p i = fit i / ∑ fit k ,

(4)

k =1

The idea of the method is as follows: one starts with an initial guess which is reasonably close to the true root, then the function is approximated by its tangent line (which can be computed using the tools of calculus), and one computes the x-intercept of this tangent line (which is easily done with

Where fiti is the fitness value of the solution i which is proportional to the nectar amount of the food source in the position i and n is the number of food sources which is equal to the number of employed bees. This method, known as roulette wheel selection method, provides better candidates to

P. Mansouri is with the Islamic Azad University, Branch Arak,Iran (phone: 0098861-3660173; fax0098861-3660173; e-mail: pmansouri393@ yahoo.com, [email protected]). B. Asady, is with the Islamic Azad University, Branch Arak,Iran (phone: 0098861-3660173;fax0098861-3660173;e-mail: [email protected], [email protected]). N. Gupta is with the Computer Science Department, University of Delhi, Delhi - 110007.; India (e-mail:ngupta @cs.du.ac.in).

594

World Academy of Science, Engineering and Technology 59 2011

sources with the onlookers on the dance area. Each onlooker evaluates the nectar information taken from all employed bees and then chooses a food source depending on the nectar amounts of sources. As in the case of the employed bee, she produces a modification on the source position in her memory and checks its nectar amount. Providing that its nectar is higher than that of the previous one, the bee memorizes the new position and forgets the old one. The sources abandoned are determined and new sources are randomly produced to be replaced with the abandoned ones by artificial scouts.

have a greater chance of being selected. Once all onlookers have selected their food sources, each of them determines a new neighboring food source of its selected food source and computes it’s nectar amount. Providing that this amount is higher than that of the previous one, and then the bee memorizes the new position and forgets the old one. The employed bee becomes a scout bee when the food source which is exhausted by the employed and onlooker bees is assigned as abandoned. In other words, if any solution cannot be improved further through a predetermined number of cycles which is called limit parameter, the food source is assigned as an abandoned source and employed bee of that source becomes a scout bee. In that position, scout generates randomly a new solution by Equation: j j j z i j = z min + rand ( 0 ,1)( z max − z min ), (5)

III. A NOVEL ITERATION METHOD FOR SOLVE HARD PROBLEMS (NONLINEAR EQUATIONS) WITH ABC ALGORITHM Our goal is to find a root α ∈ D of given hard Problem f ( x ) = 0 , where f : D ⊆ R → R . We are using ABC algorithm with extra limitations. We can say that, if α is a root of the problem f ( x ) = 0 , then α is a root of the problem |f(x)| = 0 or f 2 ( x ) = 0 (which is easily done with elementary algebra). In this algorithm:

Where j is determined randomly which is different from i is the abandoned source and and assume that zi j ∈ {1, 2 ,..., D } , where D is the solution vector, the scout discovers a new food source which will be replaced with zi

1) We don’t need to compute derivative of the function f ( x) ,

. The employed bee whose food source has been abandoned becomes a scout and starts to search for finding a new food source. Onlookers watch the dances of employed bees and choose food sources depending on dances. The main steps of the algorithm are given below: 1. Initial food sources are produced for all employed bees. 2. Repeat 3. Each employed bee goes to a food source in her memory and determines a neighbor source, then evaluates its nectar amount and dances in the hive. 4. Each onlooker watches the dance of employed bees and chooses one of their sources depending on the dances, and then goes to that source. After choosing a neighbor around that, she evaluates its nectar amount. 5. Abandoned food sources are determined and are replaced with the new food sources discovered by scouts. 6. The best food source found so far is registered. 7. UNTIL (requirements are met) In ABC which is a population based algorithm, the position of a food source represents a possible solution to the optimization problem and the nectar amount of a food source corresponds to the quality (fitness) of the associated solution. The number of the employed bees is equal to the number of solutions in the population. At the first step, a randomly distributed initial population (food source positions) is generated. After initialization, the population is subjected to repeat the cycles of the search processes of the employed, onlooker, and scout bees, respectively. An employed bee produces a modification on the source position in her memory and discovers a new food source position. Provided that the nectar amount of the new one is higher than that of the previous source, the bee memorizes the new source position and forgets the old one. Otherwise she keeps the position of the one in her memory. After all employed bees complete the search process; they share the position information of the

2) We don’t need to select initial value which is reasonably close to the true root. The process of algorithm was done as follows: 1. In first step, the bee's algorithm starts with the scout bees (n) being placed randomly in the search space (randomly we chose start value for root from domain D ⊆ R ) and find new solution as below form: Range = ([ u − l ]) n ×1 , Lower = ([ l ]) n ×1 , x = ( rand ( 0 ,1)) n ×1 × Range + Lower ,

2. In step 2, the fitness’s of the sites visited by the Scout bees are evaluated. 3. In step 3, calculating the minimum value of function | f ( x ) |,

4. In step 4, bees that have the highest fitnesses are chosen as selected bees and, sites visited by them are chosen for neighborhood search. 5. Then, in steps 5 and 6, the algorithm conducts searches in the neighborhood of the selected sites, assigning more bees to search near to the best sites. The bees can be chosen directly according to the fitnesses associated with the sites they are visiting. Alternatively, the fitness values are used to determine the probability of the bees being selected (new approximate value of searches in the neighborhood of the best sites which represent more promising solutions are made more detailed by recruiting more bees to follow them than the other selected

595

World Academy of Science, Engineering and Technology 59 2011

bees. Together with scouting, this differential recruitment is a key operation of the Bees Algorithm. However, in step 6, for each patch only the bee with the highest fitness will be selected to form the next bee population. In nature, there is no such a restriction. This restriction is introduced here to reduce the number of points to be explored. In next section we illustrate this method with some examples.

J ( x, y ) and det( J ( x , y )), will be difficult, but with ABC algorithm, we don't need to compute J ( x , y ) and directly we solve system and after 200 iterations, we get an approximation of the solution ( x 200 , y 200 ) = ( − 0 . 009 , − 1 . 000 ) . We compare algorithms in table II. TABLE II COMPRATIVE RESULTS OF EXAMPLE2

IV. NUMERICAL EXAMPLES In this section, some examples are proposed to illustrate our method and compared with Newton–Raphson method.

METHOD

(α , β )  f (α , β ) = 0   g (α , β ) = 0

A. Example1. Consider the problem f ( x ) = 0, where f ( x ) = x 3 − 2 x + 2 , x ∈ [ − 10 ,10 ]. This problem has one real root, − 1 .76929 ∈ [ − 10 ,10 ]

iterations:

By using ABC algorithm, we search to find min | f ( x ) |, where x ∈ [ − 10 ,10 ]. Result of performance MABC algorithm on this optimization problem: TABLE I COMPRATIVE RESULTS OF EXAMPLE1

α

-1.76929

f (α )

1.71442e-005

2x

−2

1

− 2y

− −

 f (α , β ) = 0 . 000081   g (α , β ) = − 0 . 0090

f i ( x1 ,..., x n ) = 0 , i = 2 ,3,..., n

n >= 2 ,

PROPOSED METHOD

if in iteration k , J (α k ,..., α k ) = 0 or not available, then Newton method cannot get an approximation of the solution, but in our algorithm, just we should know system has solution , then directly with ABC algorithm ,we reach to solution of system without compute J in each iteration (see example 2).

-1.76929

1

1.71442e -005

n

REFERENCES

B. Example2. Consider the following system of two nonlinear equations:  f ( x, y ) = x 2 − 2 y − 2 = 0  2  g ( x, y ) = x + y − 1 = 0

J ( x, y ) =

( − 0 .009 , − 1 .000 )

V. CONCLUSION In this paper we study a novel iteration root-finding method for solving nonlinear equations. If equation f ( x ) = 0 to be hard , sometimes, it is difficult to determine suitable initial value close to the location of a root of given equation and compute derivative of the given function . We solve these problems by using ABC algorithm, without need to choose initial close value to root and without compute derivative of the given function f ( x ) = 0 . Hence, for nonlinear systems

f ( x 9 ) = 1 . 71442 e − 005

NEWTON-REPHSON

(1, − 0 .500 )

As we show for this example with given initial guess of solution, Newton algorithm cannot solve problem with accuracy ε = 10 −2 .

x ( 0 ) = − 10 , f ′( x ) = 3 x 2 − 2 , f ′( − 10 ) = 298 , After9

METHOD

PROPOSED METHOD

- Newton method cannot get an approximation of the solution.

By using Newton-Rephson method, with initial value

x 9 = 1 . 76929 ,

NEWTON-REPHSON

[1] [2]

[3]

[4]

Solution of system is (α , β ) = ( 0, − 1) . By using Newton method, starting from initial estimate ( x 0 , y 0 ) = ( 0 , 0 ), J ( 0 , 0 ) = − 2 , we get an approximation of

[5]

the solution ( x 2 , y 2 ) = (1 .0000 , − 0 .5000 ) after two iteration, but in third iteration J(1.0000,-0.5000)=0 and, the Newton algorithm cannot continue to find better approximation of the solution and should be change initial value of solution. If order of system will be increase computing of

[6]

596

J. H. Mathews, “Numerical Methods for Mathematics, Science, and Engineering,” New Jersey: Prentice-Hall, 1987, ch. 2. D. Karaboga,” An Idea Based On Honey Bee Swarm for Numerical Optimization,” Technical Report-TR06, Erciyes University, Engineering Faculty, Computer Engineering Department, 2005. D. Karaboga, B. Basturk, ”Artificial Bee Colony (ABC) Optimization Algorithm for Solving Constrained Optimization Problems”, 12th Foundations of fuzzy logic and soft computing, Cancun, Mexico, pp.789-798, 2007. D. Karaboga, B. Basturk, ”A powerful and efficient algorithm for Numerical function optimization: Artificial Bee Colony (ABC) algorithm,” Journal of Global Optimization, vol. 39, no. 3, pp. 459–471, February. 2007. D. Karaboga, B. Basturk,” On the performance of Artificial Bee Colony (ABC) algorithm,” 3rd ed , Applied Soft Computing, vol. 8, pp. 687-697, January 2008. D. Karaboga. ”Artificial Bee Colony Algorithm,”www. Scholarpedia .org/article/Artificial bee colony algorithm, Scholarpedia. vol. 5, no 3, 2010.