Genetic Algorithm Solution of the Knapsack Problem Used in Finding Full Issues in the Holy Quran Based on the Number (19)

,


Introduction
The religion of Islam motivates the principles of thinking and scientific research; since it considers these principles as a presentation of Muslims full faith in Allah almighty, angels, the Holy Quran and other divine books, the prophet Mohammad, peace be upon him, and all of the previous prophets, doomsday, and fate.Moreover, the Holy Quran is not only considered to be the holy book of the Islamic religion, but it is also considered to be the miracle of the prophet Mohammad, peace be upon him.In fact, the Holy Quran is considered an immortal miracle since it speaks to the minds at every time and place (Al-Kaheel, 2010).Therefore, reading and understanding the hidden meanings in verses of the Holy Quran is one of the most valuable acts of worship.In addition, the understanding of the Holy Quran meanings is one of the significant keys for the discovery of the hidden miracles of the Holy Quran.Moreover, discovering new miracles will lead to an increase in the faith of the Islamic religion.In addition, it provides new proof of the truth of the Holy Quran and the truth of the Islamic religion based on it (Al-Refae'i, 2006).Al-Refae'i (2006) has studied the Holy Quran from a semantic perspective in order to get as much understanding as possible of the hidden meaning of the Holy Quran.This perspective of Al-Refae'i has arisen from the fact of the miracle in the formulation of the words and verses in the Holy Quran in addition to the miracle of the arrangement of the words and verses within this miracle book (Al-Refae'i, 2006).The Holy Quran is considered to be a miraculous book.Therefore, the Holy Quran has a huge number of miracles, including the arrangement of the words in the verses, their numbers, and the Ottoman writing of the words (Jarrar, 2001;Al-Kabbani, 2004).From this perspective, Al-Refae'i has focused on the Ottoman writing of the words, since it appears that the same word can be written in different shapes according to its place and meaning (Al-Refae'i, 2006).

Number 19 in the Holy Quran
The Holy Quran has a lot of miracles that are still undiscovered until this day.Surely, there is no doubt that the miracles of Holy Quran will stay mysterious until the last day of worldly life, since the Holy Quran is considered as a miracle for every place and at every time (Al-Refae'i, 2006;Jarrar, 2001).This does not mean that the miracles of the Holy Quran are non-detectable, but it means that each time and place will help researchers in the field of the Holy Quran discovering and identifying new miracles in this holy book.Therefore, in this era of technological developments that change everything in human life, one of the newly discovered miracles is the numeric secrets in the Holy Quran, especially the secrets of the number 19.The Holy Quran contains many verses, which insures that there is a numeric miracle in this great book; consider the following verse: The number ( 19) is considered as a key secret code to discover new miracles from the Holy Quran since it has been agreed that the secret numeric code of the Holy Quran is built on the basis of the number (19).This miracle insures that the Holy Quran has a special arrangement that protects the whole Quran from the attempt to change any letter in this great book as the following verse says: There are many verses that indicate the existence of a miracle involving the number (19) in the Holy Quran; for example, the first verse in the Holy Quran consists of 19 letters exactly, as all can see in the following verse (Al-Kaheel, 2012): However, Al-Refae'i showed that giving numeric values for each word in the Holy Quran according to the frequency of each Arabic letter within is a very helpful step in analyzing the secret code behind the number (19) as shown in Table 1.The most repeated letter in the Holy Quran is found to be the ‫)اﻻﻟﻒ(‬ so it gains the weight of 1, the Arabic letter ( ‫اﻟ‬ ‫ﻼم‬ ) gains the second level since it is repeated so many times that it has the weight of 2, and so on (Al-Refae'i, 2006;Hassan, 2011).Therefore, the weight of each word is calculated as the sum of the weights of the letters in that word.For instance, the word ‫)اﷲ(‬ consists of ‫,)ا+ل+ل+ﻩ(‬ so the weight of the word ‫)اﷲ(‬ is 12, which comes from replacing each letter by its weight as follows: For another instance, the word ‫)ﻣﺤﻤﺪ(‬ consists of ‫;)م+ح+م+د(‬ therefore, the weight of the word ‫)ﻣﺤﻤﺪ(‬ will be 42, which comes from replacing each letter by its weight as follows: For a more complex example of the secret code in this miracle, the word ‫)ﻣﺤﻤﺪ(‬ has the same weight as the word ( ‫رﺳ‬ ‫اﷲ‬ ‫ﻮل‬ ) which can be considered as a sub-miracle that has been discovered from the miracle of the number 19 in the Holy Quran.However, calculating the weight of each verse requires the calculating of the weight of each word in the verse then summing them to calculate the weight of the verse (Al-Refae'i, 2006).
According to Al-Refae'i (2006), the miracle of 19 in the Holy Quran appears when calculating the weights of whole included verses that share the same topic in the Holy Quran.It appears that the total weight of a set of verses on the same topic has to be divisible by the number 19 to consider this set as a full issue.Surprisingly, it appears that the result of the division represents the weight of a related word or phrase.This can be very helpful, especially in finding suitable solutions in the explanation of the disputed issues in Al-Tafseer of the vague verses in the Holy Quran.

Some Full Issues
Al-Refae'i (2006) discovered many full issues that have appeared during his research such as the full issue of the word Mohammad ‫)ﻣﺤﻤﺪ(‬ and the full issue of the word Quran ‫.)ﻗﺮان(‬ 3.1 The Full Issue of the Word Mohammad ‫)ﻣﺤﻤﺪ(‬ According to Figure 1, the total weight of these verses is (798) which is divisible by the number 19 and gives the dividend of 42.It appears that these verses concern the prophet Mohammad, peace be upon him.From another point, the weight of the word Mohammad ‫)ﻣﺤﻤﺪ(‬ is equal to the sum of the weights of the included letters (4+18+4+16=42).Multiplying 19 by the weight of the word Mohammad ‫,)ﻣﺤﻤﺪ(‬ which is 42, gives the result 798.Finally, multiplying 19 by the weight of Mohammad ‫)ﻣﺤﻤﺪ(‬ is equal to the total weight of the verses in the class.Therefore, this full issue is about the prophet Mohammad although the word Mohammad ‫)ﻣﺤﻤﺪ(‬ is not mentioned in the verses exactly (Al-Refae'i, 2006).2, the total weight of these verses is (494) which is divisible by the number 19 and gives the result of 26.It appears that these verses are concerned with the Holy Quran.From another perspective, the weight of the word Quran ‫)ﻗﺮان(‬ is equal to the sum of the weights of the included letters (14+8+1+3=26).By multiplying 19 by the weight of the word Quran ‫,)ﻗﺮان(‬ which is 26, the result will be 494.Finally, multiplying 19 by the weight of ‫)ﻗﺮان(‬ is equal to the total weight of the verses in the class; therefore, this full issue is about the Holy Quran although the word Quran ‫)ﻗﺮان(‬ is not mentioned in the verses exactly (Al-Refae'i, 2006).There are many more examples of full issues throughout Al-Refae'i's book since this miracle explains many issues in the Holy Quran.Moreover, many vague issues have appeared through the research, such as the issue of Isra and Al Maraj that appeared to be an incomplete issue in regard to the miracle of ( 19) in the Holy Quran.Therefore, the process of search for the secrets of the Holy Quran does not stop with Al-Refae'i's research.Instead every Muslim researcher has an obligation to continue this important research (Al-Refae'i, 2006).

Genetic Algorithms
Genetic algorithms are considered to be an artificial intelligence application, since the science of artificial intelligence tries to simulate human behaviours using algorithms to create intelligent machines (El-Mihoub et al., 2006).A genetic algorithm is an algorithm that simulates the evolution of living organisms in a manner to contribute to the enhancement of computerized systems (Sudhakaran & Raj, 2010).Therefore, genetic algorithms are considered to be "Bio-Inspired" applications (Stein et al., 2004).Genetic algorithms were developed by a professor of computer science from the University of Michigan named John Holland.Actually, John Holland got the idea of genetic algorithms from Darwin's theory of "origin of species".In the year 1970, the first genetic algorithm was presented officially by John Holland in the United States of America.Since then, genetic algorithms have been used to solve many programming problems in the science of artificial intelligence in many different types of computerized systems (Thierens, 1999).
Genetic algorithms follow Darwin's theory of "the origin of species" in order to simulate the evolution of living organisms in an intelligent computerized system.The theory of the origin of species explains the evolution of living organisms in terms of their genetic evolution; in other words, Darwin's theory of the origin of species concentrates on comparing the genetic characteristics of the parents and grandparents with the genetic characteristics of their descendants in order to discover the evolution in their genes (Kuilekov et al., 2003).A genetic algorithm simulates the principles of Darwin's theory in order to find an optimum solution from a huge number of solutions in a computerized system (Nemati, 1994).A genetic algorithm also can be defined as a search algorithm that operates in a heuristic manner based on ideas about the evolution and selection of living organisms (Kosorukoff, 2012).From another perspective, genetic algorithms can be defined as a branch of computerized evolution, which is considered as an area of artificial intelligence that uses the concepts of Darwin's theory in order to find the fittest solution for a specific problem (Sandurkar & Chen, 1998).
In order to gain a full understanding of genetic algorithms, the biological side has to be explained briefly.Each living being consists of a set of cells in accordance with the biological perspective.In addition, each cell contains chromosomes which consist of genes.The genes are strings of Deoxyribonucleic acid (DNA); and so each gene is responsible for transferring a feature from parents to descendants such as eye color and other features (Mathew, 2002).The new generation of any living being takes all its features from its parents; half of the new generation's genes come from one of the parents and the other half of its genes come from the other parent.The transferring of genes from parents to descendants is called the crossover process (Erben & Konstanz, 2012).
Actually, some errors may happen in the process of copying the parents' genes to the new generation; these errors are called mutations (Bhaskar & Maheswarapu, 2011).In order to judge the descendants, they will be compared with the parents by calculating the fitness factor, which measures the success of new organisma in surviving and breeding (Gimeno & Nave, 2006).Genetic algorithm simulate the biological evolution in programming concepts with binary encoded strings, by randomly choosing half of the string from each parent and presenting the resulting strings as suggested solutions (Sugimoto, 2007).
In this way, genetic algorithms are used to solve many problems with a huge set of solutions and a requirement to find a solution in a short time such as the knapsack problem (Hristakeva & Shrestha, 2003).The knapsack problem aims to find a set of objects that have high value and low weight compared to the capacity of the knapsack (Taskiran, 2012).The solutions of the knapsack problem are presented in a binary encoding where the selected objects are represented by '1' and the abandoned ones are represented by '0' (Bortfeldt & Winter, 2012).Genetic algorithms are designed to find a local maximum solution for the problem, since generating the best solution will require a long period of time to find.To accomplish this, genetic algorithms use three main operators in order to build up a computerized evolutionary system for problem solving.These three operators are selection, crossover, and mutation.

Selection
The selection process is defined as the process of selecting solutions for a certain problem (Harik et al., 1999).The selection process happens randomly by using functions that generate zeroes and ones randomly.Therefore, genetic algorithms are considered to be random search processes, since the first step in the algorithm selects the solution features randomly.In addition, the random selection process makes genetic algorithms nondeterministic, since the selection process happens randomly and so the selected solution from the first run of the algorithm may be different than the result from another run.However, the random selection of solutions is followed by an evaluation for each solution with a fitness value determined by summing the values of its contents and then the fitter solutions are selected for the next step (Matthews, 2001).
The selection process aims to find suitable solutions for the next step by selecting solutions randomly then choosing the fittest solutions.For example, in the knapsack problem the random selection of different strings of solutions is followed by calculating the values of the selected strings and comparing them with the capacity of the knapsack in order to get the fitness value for each solution, then the fittest solutions are carried on to the next step (Uyar et al., 2004;Shopova & Bancheva, 2006;Sivaraj & Ravichandran, 2011).

Crossover
The process of crossover is also a simulation of the genetic crossover in living organisms (Senaratna, 2005).Actually, the fitter solutions that selected from the first step will pass through the crossover step.Crossover means selecting the bits for the strings of new solutions by taking a half from each parent.After that, the fitness values of new solutions will be calculated in order to compare them with the parents' fitness values (Schmitt, 2001).The fitness values of new solutions give an indicator for comparing the descendants with parents in order to produce an optimum solution.The crossover process is viewed as a generation process, since it produces new solutions that may be better than their parents.In addition, the crossover step carries out an intelligent random selection process; since the randomly selected solutions are offer new solutions and the new solutions become parents for other new solutions as in the evolution process of living organisms (Yang, 2002;Paplinski, 2009;Penev, 2005).

Mutation
Mutation can be defined as a change of a bit form '0' to '1' or from '1' to '0' which leads to the creation of a new and different solution (Jung, 2009).In other words mutation creates new solutions that are different from their parents.In the biological perspective, mutation is often helpful, since it gives living organisms a chance to enhance their features.In genetic algorithms, the mutation process can contribute to new enhanced solutions; the mutation step requires measuring the fitness of new solutions (Bottaci, 2012).Also, mutation achieves the goal of evolutionary algorithms, since the mutation step can enhance the fitness value of new solutions.Therefore, mutation is a very significant step in the search process carried out by genetic algorithms (Korejo, 2009).There are many types of mutation such as one bit mutation, boundary mutation, non-uniform mutation, uniform mutation, and Gaussian mutation.
Those three operators of genetic algorithms are the most major steps for solving problems (Bryant & Benjamin, 2000).

Knapsack Problem
One of the problems that can be solved by a genetic algorithm is the knapsack problem; which is considered as one of the most complex problems in computer science (Lai, 2006).The knapsack problem can be defined as the problem of selecting a number of items to be put into a knapsack that has a certain capacity.The selected objects must have a high value as well as a suitable weight since the total weight cannot exceed the capacity of the knapsack (Dizdar et al., 2009).Therefore, the knapsack problem has a huge space of suggested solutions; and so, finding the best solution possible for the problem requires a long search time.Therefore, the knapsack problem needs a solution that gives an optimal solution in a short search time.However, the capacity of the knapsack is limited and the number of items is huge; therefore, the number of available solutions will be enormous.
Every item in the knapsack problem has a constant weight and a constant value.Typically, the suggested solutions of the knapsack problem are represented by strings of 0's and 1's.The size of each string in bits is equal to the number of items where each bit will represent one item.If the item is abandoned; the corresponding bit is represented by an s 0, otherwise, it is represented by a 1 (Sriram, 2012).The strings consist of only 0's and 1's, so a string represents each item with one bit whether it is selected or abandoned.That is, 0 where: i S : Value of the i th item value in the solution string In order to select an item, the total weight of the selected items in a solution has to be equal to or less than the capacity W of the knapsack as Equation 2demonstrates:  2) that the total weight of the items in the solution must be equal to or less than the capacity of the knapsack.Also, the total value of the items has to be the maximum obtainable one in order to select the solution.The crux of the problem is the huge number of available solutions, which require a long time to find the best solution (Puchinger et al., 2007).Actually, the knapsack problem presents a time problem, unless it is redefined to require only a suitable solution, not necessarily the best solution ever (Chekuri, 2009).It is worth mentioning that items cannot be divided into smaller pieces in the knapsack problem and so their values and weights also cannot be divided.
Each solution string for the knapsack problem has a total value and it also has a total weight (Chekuri, 2009).In order to reject the values that exceed the total capacity of knapsack, there is a value that is called the fitness value, which is calculated for each solution to give it a numeric score.The numeric scores will classify the solutions according to their suitability for the problem where the most suitable solution will be the solution that has the highest value with a total weight less than the capacity of the knapsack.Equation (3) demonstrates the process of calculating fitness values.(Garg et al., 2005) (3) where: According to (3), the fitness value of the solution will have a positive value equal to the total value of its items, if it satisfies the knapsack capacity condition, otherwise the fitness value will be stored as a negative value, so it can be rejected immediately (Tavares et al., 2005).Many researchers have tried to solve the problem of knapsack with genetic algorithms (Hristakeva & Shrestha, 2003).These genetic algorithms are designed to find a search method that can solve the knapsack problem in a short time.
Some of the algorithmic approaches that have been used in attempts to solve the knapsack problem are dynamic programming, brute force, branch and bound, greedy algorithms, memory functions, and genetic algorithms (Matousek, 2002).The most successful algorithm in finding a solution of the knapsack problem is the genetic algorithm since genetic algorithms optimize the total number of solutions, which leads to find a suitable solution of the problem in a quick time.Moreover, genetic algorithms are considered to be the fastest algorithm that solves knapsack problem with optimum solutions (Hristakeva & Shrestha, 2004).In addition, genetic algorithms are also characterized by using random search which implies that we consider genetic algorithms as nondeterministic.Therefore, the final result of the first run of the algorithm can be different than the final result for another run.However, genetic algorithms are also characterized by using the binary encoding method for finding solutions of knapsack problem.This also makes genetic algorithms the most suitable algorithmic approach to the knapsack problem (Gilbert & Eppstein, 2002).Finally, genetic algorithms are characterized by speed, optimizing problems, and many other features that make this approach suitable for the knapsack problem.

Genetic Algorithm Solution for the Knapsack Problem
According to Hristakeva and Shrestha (2003), genetic algorithm depends on random searching to solve problems that have huge amount of solutions.Therefore, genetic algorithm solves knapsack problem because this problem requires a suitable solution in a short manner of time.In addition, knapsack problem needs an algorithm that solves the problem with a suitable and optimum solution.Nevertheless, genetic algorithm presents the solutions of knapsack problem in a binary encoding where the selected item takes the '1' value and the abandoned item takes the '0' value; and so, the solutions will be presented as binary strings of zeros and ones as Sipper (2009) pointed out.However, solutions will randomly selected regarding to the nature of genetic algorithm that followed a randomly search methods and then it tries to enhance the selected solutions in order to reach the highest possible fitness value as Molina et al. (2011) stated.
The process of selecting the solutions depends on generating random numbers between '0' and '1' values.After that, the solutions will be selected according to the generated random number as Chakaborty (2010) argued.
Each solution has a fitness value that can be negative or positive; however, the initial population of solutions will delete the solutions of negative fitness values.Therefore, the initial population of solutions will only contain solutions that have positive fitness values which are considered as accepted ones.After that, the solutions that have the highest values of fitness will be selected in order to send them to the step of crossover as Carlos et al. (2010) stated.According to Djannaty and Doostdar (2008), the step of crossover is a reproduction step where the selected solutions are considered as parents' solution for the offspring solutions because offspring solutions will take the bits from the parents' solutions.After that, the fitness values of offspring solutions will be calculated in order to compare offspring solutions with the parents' solution and so the fitter solution will have a higher level than other solutions.
Enhancing the offspring solutions can be achieved through the step of mutation that changes a bit in the string of offspring solution in order to increase the fitness value.The step of mutation changes one bit from offspring solutions such as changing a '0' to '1'; therefore, the new solution will have a new fitness value.Fitness value of the new solution is an enhanced value comparing with the offspring solutions' fitness value.However, the mutation will enhance solutions and so it will decrease the total time that is needed to find the optimum solutions for the knapsack problem as Julstrom (2005) said.According to Martinjak and Golub (2006), the offspring solution will become parents in order to reproduce new solutions until genetic algorithm finds the optimum solution for knapsack problem.
According to Labed et al. (2011), genetic algorithm firstly produces a specific number of individuals as an initial population which will be later considered as candidate solutions to the knapsack problem.The selection process produces the candidate solutions by a randomly searching process in order to find a specific number of solutions' strings.However, the randomly selection optimizes the space of available solutions that are suggested to solve certain problem.Therefore, the selected solutions have to be evaluated in order to find a measurement that can arrange the selected solutions by numeric values.The fitness value is the most suitable measurement tool that can be used to evaluate and arrange the selected solutions.It is worth to mention that, the fitness value is calculated in regards to the value and the weight of the selected items in a certain solutions.Moreover, the fitness value gives a negative values for the unacceptable solutions and positive values for the accepted one.The fitness values of accepted solutions represent the total value of the solutions; so that, the highest numeric value of fitness between solutions indicates that this solution is the fitter solution as Swetanisha and Mishra (2011) argued.
The fitter solutions will be selected to implement the crossover step on them in order to produce new solutions.
The offspring solutions will also have fitness values in regards to their values and weights as Liu and Liu (2012) stated.The fitness values of offspring solutions may be higher than the fitness values of the parents' solutions.
On the other hand, the fitness values of the offspring may be less than the fitness values of the parents' solutions.However, the fitter solutions will be selected to mutate them with one of the mutation types as the single bit mutation.After mutation applying to the offspring solutions, the fitness value will be recalculated again in order to know the acceptance degree of the new solutions.However, the new offspring solution will be the parents' solutions in order to regenerate new solutions as Sunanda and Garg (2009) pointed out.
It appears that genetic algorithm is a so suitable solution for knapsack problem since this algorithm optimizes the huge number of solutions that are available for solving knapsack problem.In addition to that, genetic algorithm solves knapsack problem by an evolutionary algorithm so that the selected solutions will be enhanced until the searching process reaches the deadline of genetic algorithm; the final solution will be the best solution from the other solutions as Gallardo et al. (2001) stated.However, there are other features that make genetic algorithm suits the knapsack problem as the quickness in finding solutions.Genetic algorithm distinguishes with the quickness feature which appears obviously when comparing it with the long time that taken by traditional solutions to solving knapsack problem as Alves and Almeida (2007) argued.
According to Taishan (2010), it is worth to mention how the genetic algorithm stops the searching process in order to gain a full understanding for the nature of knapsack problem's final solution.The deadline appears when the termination condition achieved.The termination condition is the stability of fitness value since the stability of the fitness value means that the genetic algorithm is generating the same solution or similar solutions and so this value will be the best generated value.However, the solution of knapsack problem that is generated by genetic algorithm is considered as a suitable solution and also it is considered as the best of all tested solutions but not all solutions since it select solutions randomly.According to Zorman et al. (2002), the termination process can also happen when a predetermined condition of an accepted solutions' range fitness value is achieved.Moreover, the genetic algorithm also terminates the flow of the algorithm when the maximum number of tries is exceeded in order to avoid entering infinite loops.However, all of termination conditions have to be implemented in the genetic algorithm that will be used for solving knapsack problem since each one of those conditions completes the other one as Han and Kim (2001) pointed out.
Genetic algorithm is considered to be a nondeterministic algorithm since it depends on random numbers; therefore, the final result of the first run of the program might be different than another run for the program as Mishra et al. (2005) stated.Using of genetic algorithm cannot assure that the final result will be the best solution for the knapsack problem, but it can assure that the final result will be an optimum solution for the knapsack problem since there is not any indication to know the best solution for the problem as Nabil et al. (2012) pointed out.However, it appears that genetic algorithm solves knapsack problem effectively in regards to the saving both of time and effort that are needed to solve the problem with the traditional searching methods and algorithm.Moreover, the ability of genetic algorithm to deal with binary encoding method also contributes in making the genetic algorithm suitable for solving knapsack problem as Hristakeva and Shrestha ( 2004) argued.

The Research Problem
The miracle of the number 19 in the Holy Quran is one of the most important miracles that contribute effectively to discovering new miracles in the Holy Quran, which can thus be considered as sub-miracles (Al-Refae'i, 2006).These sub-miracles contribute by enhancing the understanding of the hidden meanings in the verses of the Holy Quran.Actually, finding the full issues based on the conditions of number 19 miracle of the Holy Quran is a complex process, especially when the searching and calculating processes are executed manually.However, the miracle of the number 19 appeared in an era of technological developments in various fields, which indicates that this miracle needs a technological approach to find the full issues by using it throughout the Holy Quran.Complicated issues cannot be discovered using only manual techniques; therefore, the researchers designed a suitable program for applying an efficient algorithm that can search and find the full issues easily in order to discover new full issues.Therefore, the researchers constructed an algorithm based on the genetic algorithm that has been used to solve the knapsack problem with the goal of enhancing the search process according to special conditions related to the number 19 miracle.

Experiments and Results
First of all, the words of the Quran verses have been normalized in order to process the Ottoman script writing as the normal spelling to simplify the programming.First, the diacritical marks have been removed from the words.Then, some rules have been initialized in order to give each Arabic letter its right weight as was explained in Table 1.One difficulty is caused by the two Arabic letters ‫اﻟﻤﺮﺑﻮﻃﺔ(‬ ‫)اﻟﺘﺎء‬ and ( ‫اﻟﻤﻔﺘ‬ ‫اﻟﺘﺎء‬ ‫ﻮﺣﺔ‬ ), since the computer system cannot differentiate between these two Arabic letters; although these two letters have different weights.The letter ‫اﻟﻤﺮﺑﻮﻃﺔ(‬ ‫)اﻟﺘﺎء‬ has a weight of 7 and the letter ‫اﻟﻤﻔﺘﻮﺣﺔ(‬ ‫)اﻟﺘﺎء‬ has a weight of 11.This problem has been solved by using the ASCII code, since the code of ‫اﻟﻤﺮﺑﻮﻃﺔ(‬ ‫)اﻟﺘﺎء‬ is (201) and the code of ‫اﻟﻤﻔﺘﻮﺣﺔ(‬ ‫)اﻟﺘﺎء‬ is (202); therefore, the right weight value can be calculated for these letters.Another example of weight modifications, in the ottoman writing the Arabic letter ‫)اﻟﻴﺎء(‬ is written as the Arabic letter ‫اﻟﻤﻘﺼﻮرة(‬ ‫)اﻻﻟﻒ‬ so that the problem that appears is the differences in the weights of the letter ‫)اﻟﻴﺎء(‬ and the letter ‫اﻟﻤﻘﺼﻮرة(‬ ‫)اﻻﻟﻒ‬ since the letter ‫)اﻟﻴﺎء(‬ has the weight of (6) but the letter ‫اﻟﻤﻘﺼﻮرة(‬ ‫)اﻻﻟﻒ‬ has the weight of (1).This problem has been solved by adding (5) for the total weight of the word.
In order to apply the theory of Al-Refae'i in a computerized system, a genetic algorithm that solves the knapsack problem has been used to help in finding new successful results.The following algorithm shows the steps that were implemented in this research: Step 1: select a number of (m) solutions randomly from the retrieved verses, where the selected verse has a value of '1' and the unselected one has a value of '0'.
Step 2: for each solution, calculate the total weight.
Step 3: for each solution, calculate the value of the solution; if the weight is divisible by 19 then the value is equal to the weight, otherwise, the value is equal to (-1*the weight).
Step 4: select the two best solutions that have the highest values.

Figure 1 .
Figure 1.The full issue of the word Mohammad ‫)ﻣﺤﻤﺪ(‬ (Al-Refae'i, 2006)3.2The Full Issue of the Word Quran ‫)ﻗﺮﺁن(‬According to Figure2, the total weight of these verses is (494) which is divisible by the number 19 and gives the result of 26.It appears that these verses are concerned with the Holy Quran.From another perspective, the weight of the word Quran ‫)ﻗﺮان(‬ is equal to the sum of the weights of the included letters (14+8+1+3=26).By multiplying 19 by the weight of the word Quran ‫,)ﻗﺮان(‬ which is 26, the result will be 494.Finally, multiplying 19 by the weight of ‫)ﻗﺮان(‬ is equal to the total weight of the verses in the class; therefore, this full issue is about the Holy Quran although the word Quran ‫)ﻗﺮان(‬ is not mentioned in the verses exactly(Al-Refae'i, 2006).