<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">JAMP</journal-id><journal-title-group><journal-title>Journal of Applied Mathematics and Physics</journal-title></journal-title-group><issn pub-type="epub">2327-4352</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/jamp.2015.37100</article-id><article-id pub-id-type="publisher-id">JAMP-57661</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Physics&amp;Mathematics</subject></subj-group></article-categories><title-group><article-title>
 
 
  Sniffer Technique for Numerical Solution of Korteweg-de Vries Equation Using Genetic Algorithm
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Dilip</surname><given-names>P. Ahalpara</given-names></name><xref ref-type="aff" rid="aff1"><sub>1</sub></xref></contrib></contrib-group><aff id="aff1"><label>1</label><addr-line>Department of Master of Computer Applications, D.D. University, Nadiad, India</addr-line></aff><author-notes><corresp id="cor1">* E-mail:</corresp></author-notes><pub-date pub-type="epub"><day>30</day><month>06</month><year>2015</year></pub-date><volume>03</volume><issue>07</issue><fpage>814</fpage><lpage>820</lpage><history><date date-type="received"><day>6</day>	<month>May</month>	<year>2015</year></date><date date-type="rev-recd"><day>accepted</day>	<month>23</month>	<year>June</year>	</date><date date-type="accepted"><day>30</day>	<month>June</month>	<year>2015</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
   A novel heuristic technique has been developed for solving Ordinary Differential Equation (ODE) numerically under the framework of Genetic Algorithm (GA). The method incorporates a sniffer procedure that helps carry out a memetic search within the solution domain in the vicinity of the currently found best chromosome. The technique has been successfully applied to the Korteweg- de Vries (KdV) equation, a well-known nonlinear Partial Differential Equation (PDE). In the present study we consider its solution in the regime of solitary waves, or solitons that is first used to convert the PDE into an ODE. It is then shown that using the sniffer technique assisted GA procedure, numerical solution has successfully been generated quite efficiently for the one-dimensional ODE version of the KdV equation in space variable (x). The technique is quite promising for its applications to systems involving ODE equations where analytical solutions are not directly available. 
 
</p></abstract><kwd-group><kwd>Sniffer Technique</kwd><kwd> Genetic Algorithm</kwd><kwd> Numerical Solution of ODE</kwd><kwd> Evolutionary Computation</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>Dynamical systems involving Ordinary Differential Equations (ODEs) occur in many branches of science, including Physics, Chemistry, Biology, Econometrics etc. More often, when the system is fairly complex, involving nonlinear and non integrable system equations, analytical/symbolic solutions are not directly amenable and in this context obtaining the solution numerically helps understand the dynamics of the system. Considerable work has been reported in the literature for obtaining numerical solution for ODE equations. Seaton et al. [<xref ref-type="bibr" rid="scirp.57661-ref1">1</xref>] have used Cartesian Genetic Programming for solving differential equations. John Butcher [<xref ref-type="bibr" rid="scirp.57661-ref2">2</xref>] describes a variety of numerical methods for solving differential equations. Tsoulos and Lagaris [<xref ref-type="bibr" rid="scirp.57661-ref3">3</xref>] have used grammatical evolution method for solving ODE equations. A variety of numerical techniques have been used in the past for solving ODEs, including use of Runge Kutta method, Predictor Corrector based method by Lambert [<xref ref-type="bibr" rid="scirp.57661-ref4">4</xref>], meshless Radial Basis functions by Fasshauer [<xref ref-type="bibr" rid="scirp.57661-ref5">5</xref>], Artificial Neural Network with a regression based algorithm by Lagaris et al. [<xref ref-type="bibr" rid="scirp.57661-ref6">6</xref>]. Also, inference of pertinent system equations of ODE type have been tried out by using the experimental data by Cao et al. [<xref ref-type="bibr" rid="scirp.57661-ref7">7</xref>] and Iba et al. [<xref ref-type="bibr" rid="scirp.57661-ref8">8</xref>].</p><p>In the present paper, we first consider the well known Korteweg-de Vries (KdV) equation which is a nonlinear PDE involving two independent variables in space x and time t, and is highly studied in literature since the discovery of its soliton solution by Zabusky and Kruskal [<xref ref-type="bibr" rid="scirp.57661-ref9">9</xref>],</p><disp-formula id="scirp.57661-formula458"><label>(1)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/57661x3.png"  xlink:type="simple"/></disp-formula><p>It is known that considering a traveling wave given by<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x4.png" xlink:type="simple"/></inline-formula>, where c is phase velocity, the PDE can be converted to an ODE using a new independent variable <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x5.png" xlink:type="simple"/></inline-formula></p><disp-formula id="scirp.57661-formula459"><label>(2)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/57661x6.png"  xlink:type="simple"/></disp-formula><p>and integrating with respect to<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x7.png" xlink:type="simple"/></inline-formula>, the ODE assumes a simpler form with which we will work henceforth.,</p><disp-formula id="scirp.57661-formula460"><label>(3)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/57661x8.png"  xlink:type="simple"/></disp-formula><p>where A is an arbitrary constant of integration. Here, when <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x9.png" xlink:type="simple"/></inline-formula> it is required that <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x10.png" xlink:type="simple"/></inline-formula> and</p><p><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x11.png" xlink:type="simple"/></inline-formula>.</p><p>The KdV equation is known to have an analytical solution of the form</p><disp-formula id="scirp.57661-formula461"><label>(4)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/57661x12.png"  xlink:type="simple"/></disp-formula><p>Setting a = 0, c = 1.2 and t = 0 now onwards, the true solution of KdV equation in one dimension is shown in <xref ref-type="fig" rid="fig1">Figure 1</xref>, where we have chosen even-spaced discrete x-values in the range [−4.0, 4.0] and even-spaced discrete y-values in the range [0.0, 0.7] incorporating N grid points both in the x and y axes within the solution domain, where N is chosen as51.The chromosome representation therefore is having a linear structure of a list having N elements, and each element is a whole number bounded within the range [1, N], as will be exemplified in Section 1.2 later.</p><p>Next we consider GA algorithm to get the solution sketched in <xref ref-type="fig" rid="fig1">Figure 1</xref> numerically, without having apriori knowledge of its analytical solution. For this, we first define a fitness function as,</p><disp-formula id="scirp.57661-formula462"><label>(5)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/57661x13.png"  xlink:type="simple"/></disp-formula><fig id="fig1"  position="float"><label><xref ref-type="fig" rid="fig1">Figure 1</xref></label><caption><title> Solution of KdV equation in 1-dimension as given by its analytical solution of Equation (4), where we have chosen a = 0, c = 1.2 and t = 0</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/57661x14.png"/></fig><p>where, N is the number of grid points considered, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x15.png" xlink:type="simple"/></inline-formula>and A is a constant of integration to be described shortly. In order to calculate numerical values for the 2<sup>nd</sup> derivative in equation (5), we use the standard five-point formula based on central difference that gives very good approximations to the numerical derivatives.</p><p>The fitness value for the true solution as given by Equation (5) is 0.4802-A, where the departure from -A is due to the discretized solution domain considered (resulting in chromosome representation by whole numbers in range [1, N]), as well as due to the numerical inaccuracy in calculating the derivative values. We then set A = 0.4802 so as to offset the fitness measure such that it assumes the ideal value 0 for the true solution. Thus any solution that has departure from the true solution is expected to give fitness measure &gt; 0. It may be emphasized that any other choice of value for A does not affect the GA search procedure.</p><sec id="s1_1"><title>1.1. Heuristic Methods for Solving One-Dimensional KdV Equation</title><p>We now consider one-dimensional KdV Equation (3) and proceed to solve it numerically. Combinatorially the search space is quite complex, due to the fact that a given linear chromosome, having a list of 51 integers, can have 51 independent possible values for each element. The standard GA is found to be quite slow in making progress for converging towards the ideal value of 0. In this scenario, it is envisaged to apply a heuristic search in the local surrounding area of the currently found best solution during GP iteration. The sniffing around the best solution is aimed at making the GA search procedure more effective. In order to define a numerical measure for the locality of search, a sniffer radius denoted by <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x16.png" xlink:type="simple"/></inline-formula> is considered, which forms a maximum bound within which local search is carried out. It is emphasized here that the sniffer technique considered is purely as an aid to the standard GA procedure and it certainly can not replace it. Hand in hand, they both work together to improve the overall search efficiency. On one hand GA iterations bring about a variety of candidate solutions (as is required for not getting trapped in a local minima), and on top of this basic search procedure, the sniffer technique helps carry out a stochastic (and not an exhaustive) local search in the vicinity of the best solution achieved so far by the GP procedure. This is explained by a schematic diagram in <xref ref-type="fig" rid="fig2">Figure 2</xref>. It may be noted that we have earlier applied the sniffer technique [<xref ref-type="bibr" rid="scirp.57661-ref10">10</xref>] for solving the inverse problem, namely inference of dynamical system equations (ODE and PDE) in their symbolic form, where data is used in the form of its solution defined either numerically or in a symbolic form.</p><p><xref ref-type="fig" rid="fig2">Figure 2</xref> shows a hypothetical search space in which the true solution is shown by an isolated thick circle. The remaining thick circles surrounded by small circles represent the best solution found by GA at various instances during the search iteration. Tiny dots spread randomly within these small circles represent the search carried out by the heuristic sniffer method. The radius of these small circles denote the sniffer radius<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x17.png" xlink:type="simple"/></inline-formula>. It is seen that the sniffer technique thus tries out searching in the vicinity of the best solution within a small region governed by sniffer radius. When the GA search procedure locates a solution close enough within the reach of sniffer radius to the true solution, the local search is quite likely to find the true solution through the sniffer technique. Different heuristic sniffer methods implemented in this technique are described below.</p><p>It may be noted that during the heuristic search the boundary values <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x18.png" xlink:type="simple"/></inline-formula> and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x19.png" xlink:type="simple"/></inline-formula> are kept fixed at given constant values and only the rest of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x19.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x20.png" xlink:type="simple"/></inline-formula> values for i = 2 to N − 1 are varied during heuristic as well as</p><fig id="fig2"  position="float"><label><xref ref-type="fig" rid="fig2">Figure 2</xref></label><caption><title> Schematic figure showing the usefulness of Sniffer technique (described in the text)</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/57661x21.png"/></fig><p>GA search. In the present GA experiments these boundary values are kept at 2 within the possible range of [1, N]. Sniff1 and Sniff2 methods descried below vary <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x22.png" xlink:type="simple"/></inline-formula> values within the bounds of sniffer radius to check whether the best solution can be improved in its locality. WhereasSniff1 varies all the <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x22.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x23.png" xlink:type="simple"/></inline-formula> values, Sniff2 varies a group of contiguous <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x22.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x23.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x24.png" xlink:type="simple"/></inline-formula> values. Sniff3 and Sniff4are their refined variants.</p><p>o Sniff1: Each of the <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x25.png" xlink:type="simple"/></inline-formula> value is added and subtracted separately by a random number bounded by sniffer radius, to get modified chromosomes <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x25.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x26.png" xlink:type="simple"/></inline-formula> and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x25.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x26.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x27.png" xlink:type="simple"/></inline-formula> respectively; whichever of these two chromosomes gives improved fitness is selected.</p><p>o Sniff2: A contiguous range, specified by x<sub>1</sub> to x<sub>2</sub>(selected randomly) and the corresponding <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x28.png" xlink:type="simple"/></inline-formula> values are added and subtracted separately by a random number, bounded by sniffer radius, to get modified chromosomes <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x28.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x29.png" xlink:type="simple"/></inline-formula> and<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x28.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x29.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x30.png" xlink:type="simple"/></inline-formula>; whichever of these two solutions gives improved fitness is selected.</p><p>o Sniff3: A contiguous range, specified by x<sub>1</sub> to x<sub>2</sub> (selected randomly) and corresponding <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x31.png" xlink:type="simple"/></inline-formula> values are added and subtracted separately by a random number bounded by sniffer radius. The modified list of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x31.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x32.png" xlink:type="simple"/></inline-formula> values is then fitted by using a polynomial function up to n<sup>th</sup> degree to obtain a smooth function passing through the perturbed <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x31.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x32.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x33.png" xlink:type="simple"/></inline-formula> values. We have chosen n = 4. The interpolated function values at successive x<sub>i</sub> values are then taken as the modified chromosomes <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x31.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x32.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x33.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x34.png" xlink:type="simple"/></inline-formula> and<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x31.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x32.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x33.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x34.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x35.png" xlink:type="simple"/></inline-formula>; whichever of these two chromosomes gives improved fitness is selected.</p><p>o Sniff4: A list of good points within the chromosome list are identified corresponding to individual fitness components (right side of Equation (5) at given value i) by checking that it is less than a pre-specified fraction of fitness value. Once the list of these good points is obtained, a polynomial function P<sub>n</sub>(x) (i.e. up to order x<sup>n</sup>, where n is set to 4), is then passed through these points. The chromosome values are then replaced by interpolated values as given by P<sub>n</sub>(x).</p></sec><sec id="s1_2"><title>1.2. Genetic Algorithm Framework</title><p>Based on the pioneering work by David Goldberg [<xref ref-type="bibr" rid="scirp.57661-ref11">11</xref>], the basic framework of Genetic Algorithm is considered as an engine to discover various solution regimes stochastically and by natural selection principle. Considering the fitness measure as given by equation (5), GA based iterative search is carried out using a code developed indigenously in Mathematica. As shown in <xref ref-type="fig" rid="fig1">Figure 1</xref>, the solution domain [{−4, 4}, {0.0, 0.7}] for [x, y] range is mapped on to a corresponding grid [{1, N}, {1, N}], where we have chosen N = 51. Each chromosome is thus an integer list of length N representing successive grid point numbers in the range [1, N] corresponding to the <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x36.png" xlink:type="simple"/></inline-formula> values rounded to nearest grid point. The true solution for example, as given by equation (4), with a = 0, c = 1.2 and t = 0, corresponds to the chromosome {2, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 15, 17, 20, 23, 26, 29, 32, 36, 39, 42, 45, 48, 49, 51, 51, 51, 49, 48, 45, 42, 39, 36, 32, 29, 26, 23, 20, 17, 15, 13, 11, 9, 8, 7, 6, 5, 4, 3, 2, 2} having the fitness measure as 0.</p><p>The search procedure for finding the best chromosome having smallest fitness value is carried out as follows,</p><p>1. A pool of chromosomes is created having individuals that are stochastically generated representing candidate solutions</p><p>2. Iterations are carried out till an acceptable solution is obtained (having fitness value smaller then a specified small value, or maximum number of iterations have been achieved)</p><p>o The fitness values for the candidate chromosomes are calculated</p><p>o Standard genetic operators (copy, crossover and mutation) are applied on the pool of chromosomes to evolve the given population to anew population, hopefully containing a better pool of candidate chromosomes. Few (at least 1) elite solutions are preserved (without any change) so as not to loose the best chromosomes discovered so far during the iterative search.</p><p>o Sniffer functions (Sniff1 to Sniff4) are activated intermittently after the GA iterations relax for a specified number of n iterations (we have chosen n = 10)</p><p>3. The best solution obtained represents the solution of the problem</p><p>The parameters used for the GA experiments are shown in <xref ref-type="table" rid="table1">Table 1</xref>, using which the KdV Equation (3) is solved numerically in the next section.</p></sec></sec><sec id="s2"><title>2. Results of GA Experiments</title><p>A useful feature of the GA program is to feed template curves that would be included in the pool of chromosomes. Using various forms for the template curves, different regimes of solutions are obtained by the GA pro-</p><table-wrap id="table1" ><label><xref ref-type="table" rid="table1">Table 1</xref></label><caption><title> Parameters used for the GA search procedure</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Parameter</th><th align="center" valign="middle" >Values</th></tr></thead><tr><td align="center" valign="middle" >Function set</td><td align="center" valign="middle" >+, −, /and <sup>*</sup></td></tr><tr><td align="center" valign="middle" >Termianl Set</td><td align="center" valign="middle" ><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x37.png" xlink:type="simple"/></inline-formula>values (for i = 2 to N) at each x<sub>i</sub>. Values are kept fixed at boundary points, namely i = 1 and i = N.</td></tr><tr><td align="center" valign="middle" >Crossover</td><td align="center" valign="middle" >Crossing at one point</td></tr><tr><td align="center" valign="middle" >Selection</td><td align="center" valign="middle" >Tournament selection</td></tr><tr><td align="center" valign="middle" >Probability</td><td align="center" valign="middle" >0.9 for crossover, 0.1 for mutation</td></tr><tr><td align="center" valign="middle" >Fitness</td><td align="center" valign="middle" >As definedin equation (5)</td></tr><tr><td align="center" valign="middle" >Sniffer Radius</td><td align="center" valign="middle" >5 (as guided by 10% of the totalspan in the range [1, 51])</td></tr></tbody></table></table-wrap><p>cedure aided by the sniffer technique. The GA solutions along with the templates used are shown below. Thus the inclusion of various template curves as one of the chromosomes is aimed at trying out different useful chromosome structures as potential candidates during the GA solutions.</p><sec id="s2_1"><title>2.1. Single Bump Symmetric Templates</title><p>As shown in <xref ref-type="fig" rid="fig3">Figure 3</xref>, two symmetric template curves (triangular (a) and a square like bump (b)) are used that generate an exact solution (c) with fitness value as 0.Here the GA iterations were monitored to find the effectiveness of sniffer technique. This analysis indicated that the percentage of iterations in which sniffer methods were successful in improving the fitness value as compared to GA iterations were 74% in case of GA experiment using the profile of <xref ref-type="fig" rid="fig3">Figure 3</xref>(a), and it was 83% in case of profile of <xref ref-type="fig" rid="fig3">Figure 3</xref>(b).</p></sec><sec id="s2_2"><title>2.2. Single Bump Asymmetric Templates</title><p>As shown in <xref ref-type="fig" rid="fig4">Figure 4</xref>, two asymmetric template curves (triangular curves leaning forward (a) and leaning backward (b)) are used and in both cases the exact solution (c) is generated.</p></sec><sec id="s2_3"><title>2.3. Randomly Generated Templates</title><p>As shown in <xref ref-type="fig" rid="fig5">Figure 5</xref>, totally random templates (a) and (b) are used, and in both cases the exact solution (c) is generated.</p><p>It is interesting to note that in all above GA experiments, the best solution generated by sniffer assisted GA algorithm matches exactly with the true solution having fitness measure as 0.</p></sec><sec id="s2_4"><title>2.4. Sensitivity on Fitness Measure</title><p>In order to check the sensitivity of the best solution obtained by GA, we next test the sensitivity of fitness measure as a result of applying small perturbations in the best chromosome structure. We consider following two scenarios and calculate fitness measure 1000 times and then taking the average,</p><p>1. Perturbing <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x38.png" xlink:type="simple"/></inline-formula> values corresponding to two randomly selected x<sub>i</sub> values except at the end points.</p><p>2. Perturbing <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/57661x39.png" xlink:type="simple"/></inline-formula> values corresponding to all x<sub>i</sub> values except at the end points.</p><p>In the first scenario, the average variation in fitness measure is found to be 0.172, 0.203 and 0.526 for perturbation values as 1, 2 and 5 respectively. In the second scenario, the average variation in fitness measure is found to be 1.195, 2.284 and 5.675 for perturbation values 1, 2 and 5 respectively.</p><p>It may be noted that the fitness values for the temple curves used <xref ref-type="fig" rid="fig3">Figure 3</xref>(a), <xref ref-type="fig" rid="fig3">Figure 3</xref>(b), <xref ref-type="fig" rid="fig4">Figure 4</xref>(a), <xref ref-type="fig" rid="fig4">Figure 4</xref>(b), <xref ref-type="fig" rid="fig5">Figure 5</xref>(a) and <xref ref-type="fig" rid="fig5">Figure 5</xref>(b) are 0.185, 3.181, 0.235, 0.365, 28.016 and 29.560 respectively. Thus it is seen that the value for sniffer radius used during the GA experiments, i.e. 5, is good enough to bring out relevant changes in fitness measure for the templates corresponding to <xref ref-type="fig" rid="fig3">Figure 3</xref> and <xref ref-type="fig" rid="fig4">Figure 4</xref>. However for totally random templates of <xref ref-type="fig" rid="fig5">Figure 5</xref>, the sniffer technique would also heavily depend on the GA procedure to bring the variety in the chromosome structures and eventually hit upon best value close enough to the true solution as highlighted in schematic diagram of <xref ref-type="fig" rid="fig2">Figure 2</xref> earlier.</p><fig-group id="fig3"><label><xref ref-type="fig" rid="fig3">Figure 3</xref></label><caption><title> GA solution (c) obtained using the triangular (a) and square bump (b) symmetric templates.</title></caption><fig id ="fig3_1"><label> (b)</label><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/57661x40.png"/></fig><fig id ="fig3_2"><label> (c)</label><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/57661x41.png"/></fig><fig id ="fig3_3"><label></label><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/57661x42.png"/></fig><fig id ="fig3_4"><label></label><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/57661x43.png"/></fig></fig-group><fig-group id="fig4"><label><xref ref-type="fig" rid="fig4">Figure 4</xref></label><caption><title> GA solution (c) obtained using the triangular asymmetric templates (a) and (b) respectively.</title></caption><fig id ="fig4_1"><label> (b)</label><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/57661x44.png"/></fig><fig id ="fig4_2"><label> (c)</label><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/57661x45.png"/></fig><fig id ="fig4_3"><label></label><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/57661x46.png"/></fig><fig id ="fig4_4"><label></label><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/57661x47.png"/></fig></fig-group><fig-group id="fig5"><label><xref ref-type="fig" rid="fig5">Figure 5</xref></label><caption><title> GA solution (c) obtained using the randomly generated templates (a) and (b).</title></caption><fig id ="fig5_1"><label> (b)</label><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/57661x48.png"/></fig><fig id ="fig5_2"><label> (c)</label><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/57661x49.png"/></fig><fig id ="fig5_3"><label></label><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/57661x50.png"/></fig><fig id ="fig5_4"><label></label><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/57661x51.png"/></fig></fig-group></sec></sec><sec id="s3"><title>3. Conclusion and Outlook</title><p>It has been shown that the sniffer technique assisted Genetic Algorithm approach is quite useful in solving one- dimensional KdV equation. In the present paper the numerical solutions have successfully been obtained for the well-known KdV differential equation in one dimension. The search method implements several useful variants of a novel heuristic method, called sniffer technique that helps make a detailed search in the vicinity of the best solution achieved by GA at a given instance during its iterations. The method would especially be useful for solving stiff as well as complex differential equations for which no analytical solutions exist. Work is in progress for generating numerical solution for the ODE equations in two dimensions (involving space and time), of the type in Equation (1), using which it would be interesting to generate time evolution of 1-soliton as well as 2-soliton profiles fed at time t = 0.</p></sec><sec id="s4"><title>Cite this paper</title><p>Dilip P. Ahalpara, (2015) Sniffer Technique for Numerical Solution of Korteweg-de Vries Equation Using Genetic Algorithm. Journal of Applied Mathematics and Physics,03,814-820. doi: 10.4236/jamp.2015.37100</p></sec></body><back><ref-list><title>References</title><ref id="scirp.57661-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Seaton, T., Brown, G. and Miller, J.F. (2010) Analytical Solution to Differential Equations under Graph-Based Genetic Programming. Lecture Notes in Computer Science, 6021, 232-243. http://dx.doi.org/10.1007/978-3-642-12148-7_20</mixed-citation></ref><ref id="scirp.57661-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Butcher, J.C. (2008) Numerical Methods for Ordinary Differential Equations. 2nd Edition, John Wiley Publication.  
http://dx.doi.org/10.1002/9780470753767</mixed-citation></ref><ref id="scirp.57661-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Tsoulos, I.G. and Lagaris, I.E. (2006) Solving Differential Equations with Genetic Programming. Generic Programming and Evolvable Machines, 7, 33-54. http://dx.doi.org/10.1007/s10710-006-7009-y</mixed-citation></ref><ref id="scirp.57661-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Lambert, J.D. (1991) Numerical Methods for Ordinary Differential Systems: The Initial Value Problem, John Wiley and Sons, Chichester, England.</mixed-citation></ref><ref id="scirp.57661-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Fasshauer, G.E. (1999) Solving Differential Equations with Radial Basis Functions: Multilevel Methods and Smoothing. Advances in Computational Mathematics, 11, 139-159. http://dx.doi.org/10.1023/A:1018919824891</mixed-citation></ref><ref id="scirp.57661-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Lagaris, I., Likas A., and Fotiadis D.I. (1998) Artificial Neural Networks for Solving Ordinary and Partial Differential Equations. IEEE Transactions on Neural Networks, 9, 987-1000. http://dx.doi.org/10.1109/72.712178</mixed-citation></ref><ref id="scirp.57661-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Cao, H., Kang, L., Chen, Y. and Yu, J. (2000) Evolutionary Modeling of Systems of Ordinary Differential Equations with Genetic Programming. Genetic Programming and Evolvable Machines, 1, 309-337.  
http://dx.doi.org/10.1023/A:1010013106294</mixed-citation></ref><ref id="scirp.57661-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Iba, H. and Sakamoto, E. (2002) Inference of Differential Models by Genetic Programming. Proceedings of the Genetic and Evolutionary Computation Conference (GECCO), 788-795.</mixed-citation></ref><ref id="scirp.57661-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Zabusky, N.J. and Kruskal, M.D. (1965) Interaction of Solitons in a Collisionless Plasma and the Recurrence of Initial States. Physical Review Letters, 15, 240-243. http://dx.doi.org/10.1103/PhysRevLett.15.240</mixed-citation></ref><ref id="scirp.57661-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">Ahalpara, D.P. and Sen, A. (2011) A Sniffer Technique for an Efficient Deduction of Model Dynamcal Equations using Genetic Programming. Proceedings of the 14th European Conference on Genetic Programming, EuroGP, Torino. Lecture Notes in Computer Science (LNCS), 6621, 1-12. http://dx.doi.org/10.1007/978-3-642-20407-4_1</mixed-citation></ref><ref id="scirp.57661-ref11"><label>11</label><mixed-citation publication-type="other" xlink:type="simple">Goldberg, D. (1989) Genetic Algorithms in Search, Optimization and Machine Learning. Addison-Wesley Professional, Reading.</mixed-citation></ref></ref-list></back></article>