Abstract
By means of reverse complement alignments of DNA sequences, this paper gives a DNA encoding method and DNA algorithm for the 0/1 knapsack problem. For any instance of the 0/1 knapsack problem, it uses DNA strand si = si¢spisi¢¢ to encode item ui, where the length of si is wi and the length of spi is pi. And then it computes the reverse complement alignment rpi of spi, and let lpi be the reversal of the lower strand of rpi. Next, it computes the reverse complement alignment ri'' and rj' of si'' and sj', and adds DNA strand aij = li''+lj' as additional code, where li'' and lj' are the reversals of the lower strands of ri'' and rj', respectively. The DNA encoding method can obtain the optimal solutions more easily than the formers, and it has the characteristics of low error rate.