The Network Operator Method for Search of the Most Suitable Mathematical Equation

Bio-inspired computational algorithms are always hot research topics in artificial intelligence communities. Biology is a bewildering source of inspiration for the design of intelligent artifacts that are capable of efficient and autonomous operation in unknown and changing environments. It is difficult to resist the fascination of creating artifacts that display elements of lifelike intelligence, thus needing techniques for control, optimization, prediction, security, design, and so on. Bio-Inspired Computational Algorithms and Their Applications is a compendium that addresses this need. It integrates contrasting techniques of genetic algorithms, artificial immune systems, particle swarm optimization, and hybrid models to solve many real-world problems. The works presented in this book give insights into the creation of innovative improvements over algorithm performance, potential applications on various practical tasks, and combination of different techniques. The book provides a reference to researchers, practitioners, and students in both artificial intelligence and engineering communities, forming a foundation for the development of the field.


Introduction
For many applied and research problems it is necessary to find solution in the form of mathematical equation. These problems are the selection of function at approximation of experimental data, identification of control object model, control synthesis in the form of state space coordinates function, the inverse problem of kinetics and mathematical physics, etc. The main method to receive mathematical equations for solution of these problems consists in analytical transformations of initial statement formulas of the problem. A few problems have the exact analytical solution, therefore mathematicians use various assumptions, decomposition, and special characteristics of solutions. Usually mathematicians set the form of mathematical equation, and the optimal parameters are found using numerical methods and PC. Such methods as the least-square method have been applied to the problems of approximation for many years (Kahaner D. et al., 1989).
Recently the neural networks have been used to solve complex problems when the mathematical equation cannot be found analytically. The structure of any neural network is also given within the values of parameters or weight coefficients. In problems of function approximation and the neural network training the form of mathematical equation is set by the researcher, and the computer searches for optimum values of parameters in these equations (Callan, 1999;Demuth et al., 2008).
In 1992 a new method of genetic programming was developed. It allows to solve the problem of search of the most suitable mathematical equation. In genetic programming mathematical equations are represented in the form of symbol strings. Each symbol string corresponds to a computation graph in the form of a tree. The nodes of this graph contain operations, and the leaves contain variables or parameters ( Koza, 1992( Koza, , 1994Koza, Bennett et al., 1999& Koza, Keane et al., 2003.
Genetic programming solves the problems by applying genetic algorithm. To perform the crossover it is necessary to find symbol substrings that correspond to brunches of trees. The analysis of symbol strings increases the operating time of the algorithm. If the same parameter or variable is included in the required mathematical equation several times, then to solve the problem effectively the genetic programming needs to crossover the trees so that the leaves contain no less than the required number of parameters or variables.
Limitations of the genetic programming revealed at the solution of the problem of suitable mathematical equation search, have led to creation of the network operator.
In this work we introduce a new data structure which we called a network operator. Network operator is a directed graph that contains operations, arguments and all information for calculations of mathematical equation.

Program notations of mathematical equations
Mathematical equations consist of variables, parameters, unary and binary operations that form four constructive sets.

Set of variables
(1) Unary operations set Binary operations must be commutative and have a unit element A program notation of mathematical equation is a notation of equation with the help of constructive sets (1) -(4). www.intechopen.com

Graphic notations of mathematical equations
To present mathematical equation as a graph we use a program notation. Let us enlarge the program notation by additional unary identity operation () 1 zz ρ = and binary operation with a unit element ( ) , ii ez z χ = . These operations do not influence the result of calculation but they set a definite order of operations in the notation, so that binary operations have unary operations or unit elements as their arguments, and unary operations have only binary operations, parameters or variables as their arguments.
A graphic notation of mathematical equation is a notation of binary operation that fulfills the following conditions: а. binary operation can have unary operations or unit element of this binary operation as its arguments; b. unary operation can have binary operation, parameter or variable as its argument; c. binary operation cannot have unary operations with the same constants or variables as its arguments.
Any program notation can be transformed into a graphic notation.

Network operator of mathematical expression
To construct a graph of the mathematical expression we use a graphic notation. The graphic notation can be transformed into the graph if unary operations of mathematical expression correspond to the edges of the graph, binary operations, parameters or variables correspond to the nodes of the graph.

Properties of network operators
Network operator is a directed graph that has the following properties: a. graph has no loops; b. any nonsource node has at least one edge from the source node; c. any non sink node has at least one edge to sink node; d. every source node corresponds to the element from the set of variables X or the set of parameters Q ; e. every node corresponds to binary operation from the set of binary operations 2 O ; f. every edge corresponds to unary operation from the set of unary operations 1 O .
To calculate mathematical expression we have to follow certain rules: a. unary operation is performed only for the edge that comes out from the node with no incoming edges; b. the edge is deleted from the graph once the unary operation is performed; c. the binary operation in the node is performed right after the unary operation of the incoming edge is performed; d. the calculation is terminated when all edges are deleted from the graph.
To construct most of mathematical expressions we use the sets of unary and binary operations that are given in Table 1 and Table 2.
Consider the construction of the network operator for the following mathematical equation  As a result we obtain a program notation of mathematical equation We can see that this program notation does not meet the requirements to graphic notation. These requirements are necessary for further construction of the graph. According to the definition of the network operator binary operations correspond to the nodes of the graph, unary operations correspond to the edges, thus binary and unary operations must be arguments of each other in the graphic notation of mathematical equation.
When a binary operation has as its argument in program notation then we cannot construct the graph, because there is no edge, in other words no unary operation, between two nodes.
To meet the requirements for graphic notation let us introduce additional unary identity operations. For example in the given program notation we have a substring Here binary operation has two binary operations as its arguments. It does not satisfy condition «а» of graphic notation. If we use additional identity operation, then we have www.intechopen.com Unary identity operation () 1 z ρ does not change the value of argument and this operation is necessary for the construction of the graph by graphic notation.
Since graphic notation should contain binary operations with unary operations as their arguments then we additional unary identity operations. We get ,, qx x ρχρχρ ρ ρρ .
This notation is not a graphic one, because it does not satisfy condition «b» of graphic notation. Here unary operation has unary operation as its argument We use additional binary operation with a unit element as its second argument, for example We obtain the graphic notation of mathematical equation ,, , 0 qx x ρχρχρ ρ ρχρ .
This notation does not satisfy condition «c» of graphic notation, because it contains a substring where binary operation has two unary operations with the same variable as its arguments We add a binary operation with a unit element and a unary identity operation to the substring As a result we get the following notation of mathematical equation ,, , 0 qx x ρχρχρ ρ ρχρ .
This notation has all properties of graphic notation and we can construct the graph of equation by this notation. To construct the graph we use the rules presented on Fig. 1 -4. The graph is shown on Fig. 5. where the edges come in. Such numeration is always possible for directed graphs without loops. In the given example we use addition and multiplication. Unit element for addition is 0 and for multiplication is 1.
According to the rules of calculation, we calculate unary operation that corresponds to the edge that comes out from the node that has no incoming edges. For the edge ( ) , i j node i has no incoming edges at the moment. Unary operation k ρ corresponds to the edge ( ) , i j . Binary operation l χ corresponds to the node j . Then we perform the following calculations where j z in the right part of the equation is the value on the previous step.
After calculation of (9) we delete the edge ( ) , i j from the graph.
If we numerate the nodes so that the number of the node where the edge comes out from is less than the number of the node that it comes in, then the calculation can be done just following the numbers of the nodes.

www.intechopen.com
The Network Operator Method for Search of the Most Suitable Mathematical Equation

27
For the given example we have the following steps: When the calculations on the edge (8,9) are performed we obtain the result of initial mathematical expression.
Nodes 8 and 9 in the graph can be united since binary operations are associative and commutative. A reduced graph of mathematical equation is given on Fig. 6. The results of calculation for graphs presented on Fig. 5 and Fig. 6 are the same.
The result of calculation will not change if we unite two nodes that are linked by the edge that corresponds to unary identical operation and the edges that are linked to that nodes do not come in or out from the same node.
To construct the graph of mathematical equation we need as many nodes as the sum of parameters, variables and binary operations in its graphic notation. This number is enough for construction but not minimal.
The result of calculation will not change if to the sink node of the graph we add an edge with a unary identical operation and a node with binary operation and a unit element. An enlarged graph for given example is shown on Fig. 7.
A directed graph constructed form the graphic notation of mathematical equation is a network operator. One network operator can be associated with several mathematical equations. It depends on the numbers of sink nodes that are set by the researcher. In the given example if we numerate the sink nodes with numbers 7, 8, 9 then we will get three mathematical equations This feature of the graphic notation allows using the network operator for presentation of vector functions.

Network operator matrices
To present a network operator in the PC memory we use a network operator matrix (NOM). NOM is based on the incident matrix of the graph , where L is the number of nodes in the graph.
If we replace diagonal elements of the incident matrix with numbers of binary operations that correspond to appropriate nodes and nonzero nondiagonal elements with numbers of unary operations, we shall get NOM For the network operator shown on the Fig. 6 we have the following NOM 00011001 00001000 00000100 00000001 00000010 00000010 00000001 00000000 www.intechopen.com The Network Operator Method for Search of the Most Suitable Mathematical Equation

29
NOM for the graph on Fig. 6 is the following 00011001 2 0000100 0 0000030 0 0000000 1 0000101 0 0000006 0 0000001 1 0000000 0 is upper-triangular because of the numeration of nodes. NOM is not enough for calculation of mathematical equation since it does not contain information about parameters and variables. This information is kept in the initial values of vector of nodes Then the calculation of mathematical equation can be done by To calculate the mathematical equation by its NOM we need to look through all rows consequently, 1, 1 iL =− . In each row i we consider the elements that follow the diagonal element, 1, j iL =+ . If among them we find nonzero element then we perform calculation according equation (11).

Variations of network operators
Similar network operators are network operators that satisfy the following conditions: a. have the same source nodes; b. have the same constructive sets.
Alike network operators are similar network operators that have equal numbers of nodes.

www.intechopen.com
Network operators of alike structure are alike network operators that differ in unary and binary operations.
Variation of network operator is the change of network operator that leads to a similar network operator.
Simple variation of network operator is a variation that cannot be presented as a complex of other variations.
Simple variations of network operator are given in Table 3.  Structural variations change the incident matrix of the graph. In the Table 3 structural variations are 2 -5. Variations 0, 1 do not change the incident matrix and lead to network operators of alike structure.

Number of simple variation
A complete network operator is a network operator in which we cannot perform variation 2.
A complete network operator contains L nodes in which the number of source nodes is NP + , maximum number of edges is equal to If we apply variation 2, addition of an edge, to any network operator, then we can construct a full network operator which is alike initial network operator.
If we apply variation 3, deletion of an edge, to the complete network operator, then we can construct any alike network operator.
Any variation of network operator can be performed by a finite number of simple variations.

www.intechopen.com
The Network Operator Method for Search of the Most Suitable Mathematical Equation

31
An eigen variation of network operator is a variation that does not change the number of nodes in the network operator.
In the Table 3 eigen variations are 0 -5.
Any eigen variation of the network operator can be performed by a finite number of simple eigen variations.
To present any simple variation we use a variation vector where 1 w is the number of variation from Table 3, 234 ,, www are elements that integer values depend on the number of variation.
Values of elements of variation vector are given in Table 4. In case the values of elements are not defined they can take any values. For example when 1 1 w = element 2 w can keep the number of the node where this edge comes in 23 ww = .

Suppose we have a variation vector
. Element 1 2 w = shows that we perform addition of the edge. According to Table 3 a new edge should come out from the node 4, come in the node 6 and have unary operation 2.
As a result we have NOM 000 1 0 0 0 0001 42 0 0 000 0 2 0 0 0001021 000 0 01 50 0000005 0000001 NOM Ψ  corresponds to the following mathematical equation NOM Ψ  corresponds to www.intechopen.com . Number of variation 1 6 w = shows that we add the node with binary operation 4 0 w = and an outcoming edge with unary operation 3 7 w = . After variation we obtain the NOM 000 1 0 0 00 0001 42 0 00 000 0 2 0 00 00010017 000 0 01 500 00000050 000 0 0 0 00 000 0 0 0 00 This NOM corresponds to the graph with two sink nodes and it presents at least two mathematical equations This NOM corresponds to two mathematical equations Since we have changed the graph we obtain two mathematical equations. Network operator is presented on Fig. 8.
Performance of variations is not always possible. If variation cannot be done then it is omitted. For example we have a variation vector . The first component shows variation 0, replacement of unary operation. However there is no edge between nodes 2 4 w = and 3 6 w = , that is why this variation is not performed and NOM is not changed www.intechopen.com where x is a vector of variables, q is a vector of parameters.
The solution to the problem (14), (15) ,,, To solve the problem (14), (15) we need to define a finite set of network operators, and in this set find the best solution accoding to (14).
In Let us introduce a finite ordered set of variation vectors where l is a cardinal number of W , To construct the set of network operators we use a basic matrix 0 Ψ and all possible sets W of variation vectors.

Genetic algorithm for method of variations of basic solution
Consider genetic algorithm that searches both structure and parameters of mathematical equation.
Initially we set the basic solution 00 ij We generate the ordered sets of variation vectors where H is a number of possible solutions in the population.
We generate bit strings for parameters where P is the number of parameters, c is the number of bits for the integer part of the value, and d is the number of bits for the fractional part.
From the binary code we obtain the vector of parameters In the set we find the number of possible solutions that are better than the solution ( ) where ( ) To construct new solutions we perform genetic operations of selection, crossover and mutation.
We randomly choose two solutions ( ) where γ is a given crossover parameter, 01 < γ < .
After crossover is performed in two points p k , s k we obtain four new solutions www.intechopen.com To construct a basic network operator we need 5 nodes, but if we want to enlarge the search space we add 3 nodes with addition operations and its unit elements. We get the network operator presented on Fig. 10.
A . We obtained a Pareto set which is represented on Fig 11 and  The solution 310 is the network operator www.intechopen.com or the function ( )

Conclusion
In this work the new approach to the problem of automatic search of mathematical equations was considered. The researcher defines the sets of operations, variables and parameters. The computer program generates a number of mathematical equations that satisfy given restrictions. Then the optimization algorithm finds the structure of appropriate mathematical expression and its parameters. The approach is based on the new data structure the network operator.
If we replace the set of unary and binary operations in the network operator by the set of logic operations, then we can perform the search of the most suitable logic function (Alnovani et al. 2011).

Limitations & development
Presentation of the network operator as a matrix is limited by its dimension.
In the problems where mathematical equations have many variables and parameters, it is necessary to use big network operator matrices with many zero elements.
To exclude this limitation it is possible to divide one network operator with a considerable number of nodes into some small network operators. We receive the multilayer network operator and some matrices of smaller dimensions. Each layer of the network operator describes a part of mathematical equation.
Further development of the network operator is a creation of a special data structure for presentation of the network operator in memory of the computer. Such structure can be multilayered and provide effective parallel calculation.