Solving the Mdbcs Problem Using the Metaheuric– Genetic Algorithm Genetic Algorithm for the Mdbcs Problem

— The problems degree-limited graph of nodes considering the weight of the vertex or weight of the edges, with the aim to find the optimal weighted graph in terms of certain restrictions on the degree of the vertices in the subgraph. This class of combinatorial problems was extensively studied because of the implementation and application in network design, connection of networks and routing algorithms. It is likely that solution of MDBCS problem will find its place and application in these areas. The paper is given an ILP model to solve the problem MDBCS, as well as the genetic algorithm, which calculates a good enough solution for the input graph with a greater number of nodes. An important feature of the heuristic algorithms is that can approximate, but still good enough to solve the problems of exponential complexity. However, it should solve the problem heuristic algorithms may not lead to a satisfactory solution, and that for some of the problems, heuristic algorithms give relatively poor results. This is particularly true of problems for which no exact polynomial algorithm complexity. Also, heuristic algorithms are not the same, because some parts of heuristic algorithms differ depending on the situation and problems in which they are used. These parts are usually the objective function (transformation), and their definition significantly affects the efficiency of the algorithm. By mode of action, genetic algorithms are among the methods directed random search space solutions are looking for a global optimum.


INTRODUCTION
General problems of degree-constraind graphs, consider the nodes of weight or weight on the vertices, where the goal is to find the optimal weighted graph, with set limits for levels of subgraph nodes.This class of combinatorial problems has been extensively studied for use in designing networks.If the input graph is bipartite, ie, if the set of its nodes can be broken down into two nonempty disjoint subsets so that each vertices has one end in each of the two subsets, then these problems are equivalent to the classical transportation problem in terms of operational research.The reason for this extensive study and research issues listed above, lies in their wide application in the areas of networks and routing algorithms.
In the Theory of complexity, NP (nondeterministic polynomial time) is a set of decision problems that can be solved by nondeterministic Turing machine.The importance of this class of decision problems is that it contains many interesting problems of search and optimization, where we want to determine whether there is some solution to the problem, but whether this is the optimal solution.Therefore, the challenge with NP problem is to find the answer in an efficient manner, as an effective way to verify the response, ie.solution already exists.Since many important problems in this class, intensive efforts were invested to find in polynomial time algorithms for solving problems in class NP.However, a large number of NP problems has resisted these efforts, and apparently, they require time polynomial is not even close!Are these problems really are not solvable in polynomial time is one of the biggest open questions in computer science.
The easiest way to prove that an problem a NP-complete problem is to first prove that the NP and then to an already known NP-complete problem down to him.It is therefore useful to know the various NP-complete problems.
The problems of class NP-complete are classified into the following groups:

1) Covering and Partitioning 2) Subgraphs and Supergraphs 3) Vertex Ordering 4) Iso-and Other Morphisms 5) Miscellaneous
From the group Subgraph and supergrafs distinguishes the following NP-problems: The constants in the ILP model are: -denote arrays of sets, and values of functions in them.
Variables for the ILP model are: where , and is a spanning tree for the subgraph , { .
ILP formulation of the model for finding the maximum degree of a connected subgraph constraints is given below, part of the paper [4].

∑
(1) with conditions: Graph is not oriented.In the ILP model, the formula (5), indicates the starting node of the vertice , while in formula (6), indicates an incoming (final) node of the vertice .
The objective function, given by (1), maximizes the sum of the total weight.Condition (2) ensures that the subgraph each node has the most vertices leading from the .
The condition given by (3), ensures that the subgraph is a superset of and if as a spanning tree is connected, it follows that the subgraph also connected.Conditions (4), ( 5) and (6), provided that the candidate for the spanning tree has as many nodes in the subgraph a vertices, minus 1.Finally, condition (7) guarantees that the candidate for the spanning tree has no cycle.Therefore, the conditions (4), ( 5), ( 6) and ( 7) together ensure that is the spanning tree for the subgraph .
The following theorem proves the correctness of the above ILP model.Theorem 1. [4] The MDBCS problem can be solved if and only if the following conditions (2) -( 7) holds or their equivalent set of conditions.

II. METAHEURISTIC GENETIC ALGORITHM FOR SOLVING
THE MDBCS PROBLEM Genetic algorithms (GA) are a family of algorithms, which use some of the genetic principles that are present in nature, in order to solve certain computational problems.These natural principles are: inheritance, crossover, mutation, survival of the best custom (survival of the fittest), migration and so on.These algorithms can be used for solving various classes of problems because they are fairly general nature.In this case, they are used in the optimization problem -finding the optimal parameters of a system ( [5]).
In a narrow sense, the notion of a genetic algorithm applies only to the model introduced by John Holland in his book "Adaption in natural and artificial systems", 1975.( [10]).Holland is considered the creator of this metaheuristic and basic settings of his earliest works are valid even today.In a broader sense, genetic algorithm is any algorithm that is based on a population and operators of selection, crossover and mutation, which are used to obtain new points in the search space.
Genetic algorithm is applied to the final set of individuals called the population.Each individual in the population is represented by a series of characters (genetic code) and corresponds to a solution in search space.Coding can be binary www.ijacsa.thesai.orgor a transliteration of higher cardinality.Encoding solutions is an important step of genetic algorithm because, inadequate choice of code can lead to poor results regardless of the rest of the structure of the algorithm.
The diversity of genetic material is provided by generating the initial population randomly.It can be used and some heuristics to generate initial population, or part thereof, of course, if the heuristics perform relatively quickly and significantly if not reduce the diversity of genetic material.Individuals assigned to each function adaptation (fitness function) that evaluates the quality of given individuals, as well as individual solutions in the search space.The task of genetic algorithms is to provide a constant, from generation to generation, improving the adaptability of the absolute population.This is realized by applying successive genetic operators selection, crossover and mutation, thus gaining a better solution given a particular problem.
Mechanism of selection favoring above average fitted individuals and their above-average custom parts (genes), which receive a higher chance of their own reproduction in the formation of a new generation.In this way, less fitted individuals and genes get less chances to play, and gradually dying out.Contribution to diversity of genetic material from your operator crosses that controls recombination genes of individuals.As a result of the crossing structure is obtained, although non-deterministic, the exchange of genetic material between individuals, with the possibility that well-adjusted individuals generate better individuals.The mechanism of crossing operators and relatively less fitted individuals, with some well-adapted genes, gets his chance to recombination of good genes produce well-adjusted individuals.However, using multiple selection and crossbreeding can result in loss of genetic material, ie, some regions of space results become available.The operator performs a random mutation of a particular gene, given the small probability , which can restore the lost genetic material in the population.This is the basic mechanism for preventing premature convergence of genetic algorithm to a local extreme, (see [3]).
Operators are applied until a stopping criterion is met, for example.reached the maximum number of generations, the same quality of solutions in a number of generations, finding the optimal solution, the best individual was repeated a maximum number of times, limited the time of executing the genetic algorithm, the termination by the user and so on.
As the most important aspects of a genetic algorithm, there are coding and fitness function, which is very important to be well adapted to the nature of a particular problem.It has been said that the usual binary encoding or over a large alphabet cardinality.The most convenient is that the relationship between the genetic codes and solutions to the problem is bijectiv mapping.Then it is possible that the application of genetic operators in a certain age to get called incorrect specimen, ie.individuals whose genetic code does not correspond to any solution.Overcoming this problem is possible in several ways.One possibility is to assign any such individuals as the fitness function value is zero, so that the operator applying for selection to eliminate these individuals.This approach has proven to be suitable only if the ratio of the number of incorrect and correct individuals in the population is too large, which in practice often not the case.It is possible, however, incorrect inclusion of individuals in the population by the individuals assigned to each incorrect value penalty function.The aim is unfair to individuals and get a chance to participate in the crossing, but to be discriminated against on the correct individual.Care should be taken on how to balance the value of penalty function, because too small values can lead to a genetic algorithm that some of the incorrect code for a declaration of the solution, while, on the other hand, excessive punishment can cause loss of useful information from the incorrect individuals.There is another way to solve this problem -which is to improve specimen be unfair to make them correct or incorrect that each individual is replaced correctly.
Calculating the fitness function is possible in several ways.Some of these methods are direct download, linear scaling, interval scaling, sigma truncation, etc.. Since the selection is directly related to the fitness function, the basic way to implement this genetic operator is the simple roulette selection.This method uses a distribution where the probability of selection proportional to its adaptation to the individual.Individuals involved with the chances of roulette in accordance with them, pass or not pass the process of creating a new generation.The lack of a simple roulette selection is the possibility of premature convergence due to the gradual prevalence of highly adapted individuals in the population that do not correspond to the global optimum.
To avoid this problem can be used ranking selection based on genetic codes, according to their adaptability.Fitness function is equal to the individual a range of pre-specified number of ranks, and only depend on the position of individuals in the population.It can be used linearly, as well as other forms of ranking.
Another form of selection is the tournament selection.When tournament selection is randomly generated subsets of the individuals ( is the pre-set number), then in each subset, the principle of the tournament, selects the best individual that participates in the creation of a new generation.Usually the problem is the choice of so as to reduce the adverse effects of stochastic, so that better and more diverse genetic material passed to the next generation.In cases where the size is perfect tournament is not an integer, has proved successful fine-graded tournament selection (FGTS).A detailed description of these and other types of selection and its theoretical aspects can be found in [6].Application of finegraded tournament selection and comparison with other practices in the selection of operators are given in [7], [8], [9].
The process of exchange of genetic material between individuals of the parents, in order to form new offspring individuals, is performed by the crossover operator.The most common operators are one-point crossover, two-point crossover, multi-point and a uniform crossover, and can also be used for crossover mixing, reduced surrogate crossover, crossover with the mother, intermediate crossover, as well as the linear intersection.www.ijacsa.thesai.orgIntersection operator, which is implemented in a simple genetic algorithm, the one-point crossover.In one-point crossover, so determined crossing position.All genes from the predetermined position, change position so that each parental pair created two offspring.In two-point crossover two positions are set and is the exchange of genetic material between the parents and two positions.
As for the uniform crossover, it should be noted that for each parental pair determines a binary string of length the same as the genetic parents.This range is called the mask.Sharing genes is performed only on those positions where the mask is 0, while in positions where there is one, the parents retain their genes.
Mutation operator is considered one of the most important and as such it can decisively influence the operation of genetic algorithm.If a genetic algorithm using binary encoding and the population of individuals not incorrect, it is usually implemented by a simple mutation operator that runs through the individual genes and the genetic code for each check whether or not mutated.The probability of mutation is pre-set small size, usually taken from the interval [0.001,0.01].Simple mutation is sometimes possible to apply over a binary number -the mask, which is randomly generated for each individual, and carries information about the position in which the genetic code results in a change of genes.
When the gene encoding algorithm used whole or real numbers (floating point), it was necessary to develop other concepts of mutation, which was done.These are the replacement of genes randomly selected number (random replacement), add or subtract a small value (creep), multiply the number close to one (geometric creep) and so on.For both creep mutation operator required values are random and can have a uniform, exponential, Gaussian or binomial distribution (see [1], [2]).
In some cases it is useful to genes, depending on the position in the genetic code, have different levels of mutation.In this regard it is particularly important concept of frozen gene.Namely, if in a position of the genetic code in all or most of the population, the same gene, it is useful that the gene mutation has a higher level than the rest of the genetic code.This concept is used to restore lost diversity of genetic material, and these genes are called frozen.
Will the application of genetic algorithms have a success depends largely on the choice of replacement policy generation.Some of the most important policy of the replacement generation: generational genetic algorithm, genetic algorithm stationary and elitist strategy.Of course, it is possible to combine these principles.
Where the generational genetic algorithm, then apply to all individuals all the genetic operators, ie.there are no privileged individuals are going into the next generation, or individuals who go directly to the selection process.
On the contrary, stationary genetic algorithm favors the best individuals in the population so as to them shall not apply operator selection, but they go directly to the next stage, while the other applies the selection of individuals and they come to the remaining places.
Elitist strategy provides a direct passage into the next generation of one of the best individuals.These individuals do not apply to operators of selection, crossover and mutation.By applying genetic operators to the individuals of the population remaining seats are filled by the next generation.This approach leaves room for another possible improvement of the genetic algorithm, which is caching.As an elite individuals pass from generation to generation unchanged, it and its value remains unchanged.Therefore, it would be useful to individuals elitinih value is remembered, rather than constantly calculated, saving the time required for their computation.This process is called caching, and more detail is in [12] and [11].
Namely, the calculated value of the objective function of individuals are stored in so-called.Hess-row table, which uses CRC codes that are assigned to individuals in population.If, during operation of the genetic algorithm, obtained through the same genetic code, then the objective function value is taken from a hash-table, through the CRC code.
Input for the algorithm for slving the MDBCS problem is undirected graph , weight function (weighting function) and integer .Each vertices of the graph encode the zero (0), if the condition (2) does not satisfy, and one (1), otherwise (we use that is, a binary encoding of individuals).If we find the node that has more than vertices, then vertices of the node does not count, that is.set value 0.
In order to get connected components (or component connection), we apply a search in width.If the graph is only one component connection, then this is the end, that is, the graph is connected and calculate the sum of all vertices of the weight of the component.But if more than one connected components, then we take them in order, first and second, second and third, and so on, and look for the largest vertice of the weight (or cycle if it exists) that connects the two components.Then take all the vertices of the shortest path from the original graph, and the count only those with a degree .The process continues until they connect all components of relationship.Finally, we add all of this and get ∑ .
Genetic operators, which are used here, are fine-graded tournament selection, a one-point crossover, a simple mutations with the frozen gene and caching techniques.Genetic algorithm is coded in the programming language C. For checking the results of the implemented genetic algorithm based on mathematical models (1) -( 7), we used the software package CPLEX.Genetic algorithm is tested on the test-examples reached the same values as the CPLEX program, and that the execution time was short in both cases, data on execution times not are presented.
As there are no standard instances of MDBCS problem, and the instance for KCT problem ( -cardinality tree problem), containing the nodes and weights that are appropriate for the considered problem, the necessary adjustments in accordance with the input of a genetic algorithm, are used in testing of the genetic algorithm for graphs with a large number of vertices and nodes.www.ijacsa.thesai.orgStopping criterion of the algorithm is the maximum number of generations 5000 or up to 2000 generations without improving the objective function value.

III. TEST EXAMPLES
Here are a few tables where the columns of labels, respectively, represent:  instance name that contains the dimension of the input graph, an Instance name;  cardinality of the set of nodes, ;  cardinality of the set of vertices, ;  integer ;  best solution obtained by genetic algorithm, ;  average time (in seconds) to calculate the best value;  total time (in seconds) to complete a genetic algorithm;  total number of generation, gen;  average value of using caching, cache.The Tables 1 -5 shows the results obtained by testing the genetic algorithm for instances with a large number of vertices and nodes, for different values of

IV. CONCLUSION
The problem of finding the maximum degree of limitation associated subgraph is very interesting, and then proposed a genetic algorithm can be the basis for further research and improvement.In addition, this class of combinatorial problems has been studied extensively and due to the application in the design of networks of networks and routing algorithms.Some of the directions of further enlargement and improvement of the results could be:

1) the development of exact methods based on integer programming;
2) modification of metaheuristic described -genetic algorithm for solving similar problems on graphs; 3) obtaining new results from graph theory developed using the implementation.