research article solving the 0/1 knapsack problem by a ...solving the 0/1 knapsack problem by a...

7
Hindawi Publishing Corporation Advances in Bioinformatics Volume 2013, Article ID 341419, 6 pages http://dx.doi.org/10.1155/2013/341419 Research Article Solving the 0/1 Knapsack Problem by a Biomolecular DNA Computer Hassan Taghipour, 1 Mahdi Rezaei, 2 and Heydar Ali Esmaili 1 1 Department of Pathology, Tabriz University of Medical Sciences, Tabriz, Iran 2 Department of eoretical Physics and Astrophysics, University of Tabriz, Tabriz 51664, Iran Correspondence should be addressed to Hassan Taghipour; [email protected] Received 2 November 2012; Revised 11 January 2013; Accepted 11 January 2013 Academic Editor: Bhaskar Dasgupta Copyright © 2013 Hassan Taghipour et al. is is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Solving some mathematical problems such as NP-complete problems by conventional silicon-based computers is problematic and takes so long time. DNA computing is an alternative method of computing which uses DNA molecules for computing purposes. DNA computers have massive degrees of parallel processing capability. e massive parallel processing characteristic of DNA computers is of particular interest in solving NP-complete and hard combinatorial problems. NP-complete problems such as knapsack problem and other hard combinatorial problems can be easily solved by DNA computers in a very short period of time comparing to conventional silicon-based computers. Sticker-based DNA computing is one of the methods of DNA computing. In this paper, the sticker based DNA computing was used for solving the 0/1 knapsack problem. At first, a biomolecular solution space was constructed by using appropriate DNA memory complexes. en, by the application of a sticker-based parallel algorithm using biological operations, knapsack problem was resolved in polynomial time. 1. Introduction DNA encodes the genetic information of cellular organisms. e unique and specific structure of DNA makes it one of the favorite candidates for computing purposes. In comparison with conventional silicon-based computers, DNA computers have massive degrees of miniaturization and parallelism. By recent technology, about 10 18 DNA molecules can be produced and placed in a medium-sized laboratory test tube. Each of these DNA molecules could act as a small proces- sor. Biological operations such as hybridization, separation, setting, and clearing can be performed simultaneously on all of these DNA strands. us, in an in vitro assay, we could handle about 10 18 DNA molecules or we can say that 10 18 data processors can be executed in parallel. In 1994, Adleman introduced the DNA computing as a new method of parallel computing [1]. Adleman succeeded in solving seven-point Hamiltonian path problem solely by manipulating DNA molecules and suggested that DNA could be used to solve complex mathematical problems. In 1999, a new model of DNA computing (sticker model) was introduced by Roweis et al. [2]. is model has a kind of random access memory that requires no strand extension, uses no enzymes, and its materials are reusable. Sticker- based DNA computing has potential capability for being a universal method in DNA computing. Roweis et al. [2] also proposed specific machine architecture for implementing the sticker model as a microprocessor-controlled parallel robotic workstation. us, the operations used in sticker model can be performed on fully automated devices, which is helpful in reducing the error rates of operations. In this paper, we applied sticker model for solving the knapsack problem which is one of the NP-complete prob- lems. e paper is organized as follows. Section 2 introduces the DNA structure and various DNA computing models and discusses about the sticker based DNA computing and bio- logical operations which are used in sticker model. Section 3 introduces a DNA-based algorithm for solving the knapsack problem in sticker model.

Upload: others

Post on 11-Mar-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Research Article Solving the 0/1 Knapsack Problem by a ...Solving the 0/1 Knapsack Problem by a Biomolecular DNA Computer HassanTaghipour, 1 MahdiRezaei, 2 andHeydarAliEsmaili 1 Department

Hindawi Publishing CorporationAdvances in BioinformaticsVolume 2013 Article ID 341419 6 pageshttpdxdoiorg1011552013341419

Research ArticleSolving the 01 Knapsack Problem by a Biomolecular DNAComputer

Hassan Taghipour1 Mahdi Rezaei2 and Heydar Ali Esmaili1

1 Department of Pathology Tabriz University of Medical Sciences Tabriz Iran2Department of Theoretical Physics and Astrophysics University of Tabriz Tabriz 51664 Iran

Correspondence should be addressed to Hassan Taghipour taghipourhyahoocom

Received 2 November 2012 Revised 11 January 2013 Accepted 11 January 2013

Academic Editor Bhaskar Dasgupta

Copyright copy 2013 Hassan Taghipour et al This is an open access article distributed under the Creative Commons AttributionLicense which permits unrestricted use distribution and reproduction in any medium provided the original work is properlycited

Solving some mathematical problems such as NP-complete problems by conventional silicon-based computers is problematic andtakes so long time DNA computing is an alternative method of computing which uses DNA molecules for computing purposesDNA computers have massive degrees of parallel processing capability The massive parallel processing characteristic of DNAcomputers is of particular interest in solving NP-complete and hard combinatorial problems NP-complete problems such asknapsack problem and other hard combinatorial problems can be easily solved by DNA computers in a very short period of timecomparing to conventional silicon-based computers Sticker-based DNA computing is one of the methods of DNA computing Inthis paper the sticker based DNA computing was used for solving the 01 knapsack problem At first a biomolecular solution spacewas constructed by using appropriate DNAmemory complexesThen by the application of a sticker-based parallel algorithm usingbiological operations knapsack problem was resolved in polynomial time

1 Introduction

DNA encodes the genetic information of cellular organismsThe unique and specific structure of DNAmakes it one of thefavorite candidates for computing purposes In comparisonwith conventional silicon-based computers DNA computershave massive degrees of miniaturization and parallelismBy recent technology about 1018 DNA molecules can beproduced and placed in a medium-sized laboratory test tubeEach of these DNA molecules could act as a small proces-sor Biological operations such as hybridization separationsetting and clearing can be performed simultaneously on allof these DNA strands Thus in an in vitro assay we couldhandle about 1018 DNAmolecules or we can say that 1018 dataprocessors can be executed in parallel

In 1994 Adleman introduced the DNA computing as anew method of parallel computing [1] Adleman succeededin solving seven-point Hamiltonian path problem solely bymanipulating DNAmolecules and suggested that DNA couldbe used to solve complex mathematical problems

In 1999 a new model of DNA computing (sticker model)was introduced by Roweis et al [2] This model has a kindof random access memory that requires no strand extensionuses no enzymes and its materials are reusable Sticker-based DNA computing has potential capability for being auniversal method in DNA computing Roweis et al [2] alsoproposed specific machine architecture for implementing thesticker model as a microprocessor-controlled parallel roboticworkstation Thus the operations used in sticker model canbe performed on fully automated devices which is helpful inreducing the error rates of operations

In this paper we applied sticker model for solving theknapsack problem which is one of the NP-complete prob-lems

The paper is organized as follows Section 2 introducesthe DNA structure and various DNA computing models anddiscusses about the sticker based DNA computing and bio-logical operations which are used in sticker model Section 3introduces a DNA-based algorithm for solving the knapsackproblem in sticker model

2 Advances in Bioinformatics

T

CGGAA

GCCTT

TC G

ACG

A

5998400

3998400

3998400

5998400

Figure 1 A DNA molecule

2 Basics of DNA Computing

21 Structure of DNA and DNA Computing Models DNAis a polymeric and a double-stranded molecule which iscomposed of monomers called nucleotides Nucleotides arebuilding blocks of DNA and each of them contains threecomponents sugar phosphate group and nitrogenous baseThere are four different nitrogenous bases which contributein DNA structure Thymine (T) and Cytosine (C) whichare called pyrimidines and Adenine (A) and Guanine (G)which are called purines Because nitrogenous bases arevariable components of nucleotides different neucleotidesare distinguished by nitrogenous bases which contribute intheir structure For this reason the name of the bases are usedto refer to the neucleotides and the neucleotides are simplyrepresented as A G C and T The nucleotides are linkedtogether by phosphodiester bonds and forma single-strandedDNA (ssDNA) A ssDNAmolecule can be likened to a stringconsisting of a combination of four different symbols A GC and T Mathematically this means that we have a four-letter alphabet sum = AGCT to encode information TwossDNA molecules join together to form a double-strandedDNA (DsDNA) based on complementary rule ldquoArdquo alwayspairs with ldquoTrdquo and likewise ldquoCrdquo pairs with ldquoGrdquo In Figure 1a schematic picture of DNA is shown

DNA computing was initially developed by Adleman in1994 Adleman resolved an instance of Hamiltonian pathproblem just by handling the DNA molecules [1] In 1995Lipton presented a method for solving the satisfiability(SAT) problem [3] Adleman-Lipton model can be used tosolve different NP-complete problems In Adleman-Liptonmodel DNA splints are used for the construction of solutionspace Adleman [4 5] also presented a molecular algorithmfor solving the 3-coloring problem Chang and Guo [6ndash8]showed that the DNA operations in Adelman-Lipton modelcould be used for developing DNA algorithms to resolvethe dominating set problem the vertex cover problem themaximal clique problem and the independent set problem

In 1999 Roweis et al [2] introduced the Sticker basedDNA computing model and applied it in solving the minimalset cover problem and this model also was applied forbreaking the Data Encryption Standard (DES) [9] In ourprevious work we also applied sticker based model forsolving the independent set problem [10]

Other than Adleman-Lipton and Sticker based modelsother various models are also proposed in DNA computingby researchers Quyang et al [11] solved the maximal cliqueproblem using DNA molecules and restriction endonucleaseenzymes Amos et al [12 13] described a DNA computationmodel using restriction endonuclease enzymes instead ofsuccessive cycles of separation by DNA hybridization which

can reduce the error rate of computation Hagiya et al [14]proposed a new method of DNA computing that involvesa self-acting DNA molecule containing both the inputprogram and working memory In this method a single-stranded DNA molecule consists of an input segment on the51015840 end followed by a formula (program) segment followed bya spacer and finally with a ldquoheadrdquo on the 31015840 end that movesand performs the computation Another method for DNAcomputation is ldquocomputation by self-assemblyrdquoWinfree et al[15ndash17] introduced a linear and 2-dimensional self-assemblymodel

The surface-basedmodel was introduced by Liu et al [18]This model uses DNA molecules attached to a solid surfaceinstead of DNAmolecules floating in a solutionThe surface-based model was used by Taghipour et al for solving thedominating set problem [19]The computing by blocking wasintroduced by Rozenberg and Spaink [20] This model usesa novel approach to filter the DNA molecules Instead ofseparating the DNA strands to distinct tubes or destroyingand removing the DNA molecules that do not contribute tofinding a solution it blocks (inactivates) them in a way thatthe blocked strands can be considered as nonexistent duringthe subsequent steps of computation

22 Sticker-Based DNA Computation The sticker model wasintroduced by Roweis et al [2] In this model there is amemory strand with 119873 bases in length subdivided into 119870nonoverlapping regions each 119872 bases long (119873 ge 119872119870)119872 can be for example 20 The substrands (bit regions)are significantly different from each other One sticker isdesigned for each subregion each sticker has 119872 bases longand is complementary to one and only one of the119870memoryregions If a sticker is annealed to its corresponding region onmemory strand then the particular region is said to be on Ifno sticker is annealed to a region then the corresponding bitis off Each memory strand along with its annealed stickersis called memory complex In sticker model a tube is acollection of memory complexes composed of large numberof identical memory strands each of which has stickersannealed only at the required bit positions This method ofrepresentation of information differs from other methods inwhich the presence or absence of a particular subsequencein a strand corresponded to a particular bit being on or offIn sticker model each possible bit string is represented bya unique association of memory strands and stickers Thismodel has a kind of random access memory that requiresno strand extension and uses no enzymes [2] Indeed inthe sticker model memory strands are used as registersand stickers are used to write and erase information in theregisters

Another conception in sticker model is (119870 119871) libraryEach (119870 119871) library contains memory complexes with 119870 bitregions the first 119871 bit regions are either on or off in allpossible ways whereas the remaining119870-119871 bit regions are offThe last 119870-119871 bit regions can be used for intermediate datastorage In every (119870 119871) library there are at least 2119871 memorycomplexes In Figure 2 a memory complex with 7 bit regionsrepresenting the binary number 1100101 is shown

Advances in Bioinformatics 3

Figure 2 A memory complex representing 1100101

23 Biological Operations in Sticker Model There are fourprincipal operations in sticker model combination sepa-ration setting and clearing [2] We also defined a newoperation called ldquodividerdquo which is used in the constructionof solution space [10] Here we briefly discuss about theseoperations

(1) Combine (1198790 1198791 and 119879

2) The memory complexes

from the tubes 1198791and 119879

2are combined to form a new

tube 1198790 simply the contents of 119879

1and 119879

2are poured

into the tube 1198790 (1198790= 1198791cup 1198792)

(2) Separate (1198790 119894) rarr (119879+ 119879minus) This operation creates

two new tubes 119879+ and 119879minus 119879+ contains the memorycomplexes having the 119894th bit on (119879+ = +(119879

0 119894)) and

119879minus contains the memory complexes having the 119894th bitoff (119879minus = minus(119879

0 119894))

(3) Set (1198790 119894) The 119894th bit region on every memory

complex in tube 1198790is set to 1 or turned on

(4) Clear (1198790 119894) The 119894th bit region on every memory

complex in tube 1198790is set to 0 or turned off

(5) Divide (1198790 1198791 and119879

2) By this operation the contents

of tube 1198790is divided into two equal portions and

poured into the tubes 1198791and 119879

2

3 Solving the 01 Knapsack Problem inSticker-Based DNA Computers

31 Definition of the Knapsack Problem Knapsack problemis one of the classical optimization problems which have twovariants the 01 and fractional knapsack problems

The 01 knapsack problem is posed as followsThere are 119899 items 119868

1 1198682 1198683 119868

119899 each item 119868

119895has aweight

119882119895and a value 119881

119895 where119882

119895and 119881

119895are integers We have a

knapsack which its capacity (weight) is 119862 where 119862 is also aninteger We want to take the most valuable set of items that fitin our knapsack Which items should we take This is calledthe 01 or binary knapsack problem because each item musteither be taken or left behind we cannot take a fractionalamount of an item

In the fractional knapsack problem the setup is the samebut we can take fractions of items rather than having tomakea binary (0-1) choice for each item The fractional knapsackproblem is solvable by a greedy strategy where as the 01knapsack problem is notThe 01 knapsack problem has beenproved to be an NP-complete problem [21]

119899 119882 119881

Figure 3 Memory strand with at least 119899 +119882 + 119881 bit regions

32 Construction of Sticker Based DNA Solution Space forKnapsack Problem

321 Designing Appropriate DNA Memory Complexes Asdiscussed before there are 119899 items 119868

1 1198682 1198683 119868

119899 each item

119868119895has a weight 119882

119895and a value 119881

119895 where 119882

119895and 119881

119895are

integers Let us consider that the total weight of items is 119882and total value of items is 119881

119882 = 1198821+1198822+1198823+ sdot sdot sdot + 119882

119899=119899

sum119895=1

119882119895

119881 = 1198811+ 1198812+ 1198813+ sdot sdot sdot + 119881

119899=119899

sum119895=1

119881119895

(1)

119899 = total number of itemsWe start with 2119899 ormore identicalmemory strands which

each of them has at least 119899 + 119882 + 119881 bit regions (Figure 3)The first 119899 bit regions (bit regions 1 to 119899) are used to represent119899 items the middle 119882 bit regions (bit regions 119899 + 1 to 119899 +119882) represent the total weight of items119882 and the next 119881 bitregions (bit regions 119899 + 119882 + 1 to 119899 + 119882 + 119881) represent thetotal value of items 119881 Each bit region for example can have20 neucleotides furthermore every memory strand at leastcontains 20 (119899 +119882 + 119881) neucleotides

322 Production of DNA Memory Complexes Which Repre-sent All Possible Subsets of Items It is clear that a set of 119899 itemshas 2119899 subsets and each of these subsets has its own weightand value For construction of solution space it is essentialto represent all subsets of items by appropriate DNAmemorycomplexes Furthermore by using at least 2119899 ormorememorystrands and making the first 119899 bit regions on or off in allpossible ways we represent all 2119899 subsets of items by DNAmemory complexes On the other hand simply we designa (119899 + 119882 + 119881 119899) library For this purpose (Procedure 1) isproposed

Procedure 1 has 119899 divide 119899 set and 119899 combine operationsAt the end of procedure tube 119879

0contains all of the memory

complexes which each of them represent one of the subsets ofitems

323 Representing the Weight and Value of Each Subset onDNA Memory Complexes In this step based on the itemswhich are present in subsets and by annealing correspondingstickers in 119882 and 119881 regions of memory strands the totalweight and value of subsets are represent on memory com-plexes Note each item 119868

119895has aweight119882

119895and a value119881

119895 thus

4 Advances in Bioinformatics

(1) Input (1198790) where 119879

0contains 2119899 or more memory strands with at least (119899 +119882 + 119881) bit regions

(2) For 119894 = 1 to 119899 where 119899 is the total number of items(a) Divide (119879

0 1198791 1198792)

(b) Set (1198791 119894)

(c) Combine (1198790 1198791 1198792)

End for

Procedure 1

For 119894 = 1 to 119899

Separate (1198790 119894) rarr (119879+ 119879minus)

For 119895 = 1 to119882119894

Set (119879+ 119899 + sum119894minus1119896=1119882119896+ 119895)

For 119895 = 1 to 119881119894

Set (119879+ 119899 + sum119899119896=1119882119896+ sum119894minus1

119896=1119881119896+ 119895)

Combine (1198790 119879+ 119879minus)

Procedure 2

for each item 119868119895 119882119895numbers of stickers are annealed to 119882

region and 119881119895numbers of stickers are annealed to 119881 region

on memory strands Furthermore the numbers of annealedstickers in119882 and119881 regions represent the weight and value ofcorresponding subset respectively Procedure 2 is proposedfor representing the weight and value of each subset

Now our solution space is completely produced andcontains at least 2119899 memory complexes which each of themrepresent one of the subsets of items and the numbers ofannealed stickers in 119882 and 119881 regions represent the weightand value of corresponding subset respectively

33 DNA Algorithm for Solving the 01 Knapsack ProblemAlgorithm 1 is proposed for solving the 01 knapsack prob-lem

According to the steps in the algorithm the knapsackproblem can be resolved by sticker based DNA computationin polynomial time

By the execution of step 1 thememory complexes withoutany annealed stickers in 119882 region (represent the subset 0)are placed in tube 119879

0 the memory complexes with only one

annealed sticker (represent the subsets of items which theirweight are 1) are placed in tube 119879

1 the memory complexes

with 2 annealed stickers (represent the subsets of items whichtheir weight are 2) are placed in tubes 119879

2 the memory

complexes with 3 annealed stickers (represent the subsets ofitems which their weight are 3) are placed in tube 119879

3 and

finally the tube 119879119882contains the memory complexes witch all

bit regions located in119882 region are turned to ldquoonrdquo (representthe subset which contains all items) On the other handsstep 1 is a sorting procedure and sorts memory complexesaccording to the number of annealed stickers in 119882 regionIn this step 119882 + 1 tubes are produced (119879

0 1198791 1198792 119879

119882)

and number of every tube indicate the number of annealed

stickers in 119882 region Step 1 contains 119882(119882 + 1)2 separateand 119882(119882 + 1)2 combine operations or totally it contains119882(119882 + 1) operations

In step 2 of algorithm the contents of tubes119879119888+1 119879119888+2 119879119888+3 119879

119882are discarded because memory

complexes which are present in these tubes represent subsetof items that their weight are exceeded the capacity ofknapsack Then the contents of tubes 119879

0 1198791 1198792 119879

119888are

mixed together and transferred to tube 1198790 Now tube 119879

0

contains memory complexes which represent the subsetsof items that their weight are not exceeded the capacity ofknapsack Furthermore at the end of step 2 the memorycomplexes which represent the subsets of items that theirweight are exceeded the capacity of knapsack removedfrom solution space and only remain memory complexesrepresenting subsets that fit in our knapsack It is clear thatthe step 2 contains only 2 operations

By the execution of step 3 sorting of memory complexesare performed according to the number of annealed stickersin 119881 region During this step 119881 + 1 tubes are produced(1198790 1198791 1198792 119879

119881) The memory complexes without any

annealed stickers in 119881 region (represent the subset 0) areplaced in tube 119879

0 the memory complexes with only one

annealed sticker (represent the subsets of items which theirvalue are 1) are placed in tube119879

1 thememory complexes with

2 annealed stickers (represent the subsets of itemswhich theirvalue are 2) are placed in tubes 119879

2 the memory complexes

with 3 annealed stickers (represent the subsets of items whichtheir value are 3) are placed in tube119879

3 and finally the tube119879

119881

contains the memory complexes with all bit regions locatedin 119881 region are turned to ldquoonrdquo (represent the subset whichcontains all items) Step 3 contains 119881(119881 + 1)2 separate and119881(119881+1)2 combine operations or totally it contains119881(119881+1)operations

Advances in Bioinformatics 5

(1) For 119894 = 119899 to 119899 +119882 minus 1For 119895 = 119894 down to 119899

Separate (119879119895minus119899 119894 + 1) rarr (119879

(119895minus119899+1)1015840 119879119895minus119899)

Combine (119879119895minus119899+1 119879119895minus119899+1 119879(119895minus119899+1)

1015840 )

(2)The capacity of knapsack is 119862Discard tubes 119879

119888+1 119879119888+2 119879119888+3 119879

119882

Combine (1198790 1198790 1198791 1198792 119879

119888)

(3) For 119894 = 119899 +119882 to 119899 +119882 + 119881 minus 1For 119895 = 119894 down to 119899 +119882

Separate (119879119895minus119899minus119882 119894 + 1) rarr (119879

(119895minus119899minus119882+1)1015840 119879119895minus119899minus119882)

Combine (119879119895minus119899minus119882+1 119879119895minus119899minus119882+1 119879(119895minus119899minus119882+1)

1015840 )

(4) Read 119879119881 else if it was empty then

Read 119879119881minus1

else if it was empty thenRead 119879

119881minus2 else if it was empty then

Read 119879

2 else if it was empty then

Read 1198791

Algorithm 1

In step 4 all of tubes (from 119879119881to 1198791) are evaluated for

presence of memory complexes and the first tube whichis not empty and contains memory complexes representthe most valuable set Step 4 maximally contains 119881 Readoperations

Finally it is clear that the total number of operations inour algorithm is1198822 + 1198812 +119882 + 2 lowast 119881 + 2

4 Conclusion

In this paper the sticker based DNA computing was usedfor solving the 01 knapsack problem This method couldbe used for solving other NP-complete problems There arefour principal operations in sticker model CombinationSeparation Setting and Clearing We also defined a newoperation called ldquodividerdquo and applied it in construction ofsolution space

As mentioned earlier one of the important properties ofDNA computing is its real massive parallelism which makesit a favorite and powerful tool for solving NP-complete andhard combinatorial problems In sticker model as in otherDNA based computation methods the property of DNAmolecules to making duplexes is used as main biologicaloperationThemain difference between the stickermodel andAdleman-Lipton model is that in the sticker model there is akind of Random accessmemory and the computations do notdepend on DNA molecules extension as seen in Adleman-Lipton model

References

[1] L Adleman ldquoMolecular computation of solutions to combina-torial problemsrdquo Science vol 266 pp 1021ndash1024 1994

[2] S Roweis E Winfree R Burgoyne et al ldquoA sticker basedmodel for DNA computationrdquo in Proceedings of the 2nd AnnualWorkshop onDNAComputing PrincetonUniversity L Landwe-ber and E Baum Eds Series in Discrete Mathematics andTheoretical Computer Science DIMACS pp 1ndash29 AmericanMathematical Society 1999

[3] R J Lipton ldquoDNA solution of hard computational problemsrdquoScience vol 268 pp 542ndash545 1995

[4] L M Adleman On Constructing a Molecular ComputerDepartment of Computer Science University of SouthernCalifornia 1995

[5] L M Adleman ldquoOn constructing a molecular computerrdquo inDNA Based Computers R J Lipton and E B Baum Eds pp1ndash22 American Mathematical Society 1996

[6] W-L Chang andM Guo ldquoSolving the dominating-set problemin Adleman-Liptons Modelrdquo in Proceedings of the 3rd Inter-national Conference on Parallel and Distributed ComputingApplications and Technologies pp 167ndash172 Kanazawa Japan2002

[7] W-L Chang and M Guo ldquoSolving the clique problem and thevertex cover problem in Adleman-Liptonrsquos modelrdquo in IASTEDInternational Conference Networks Parallel and DistributedProcessing and Applications pp 431ndash436 Tsukuba Japan 2002

[8] W-L Chang and M Guo ldquoSolving NP-complete problem inthe Adleman-LiptonModelrdquo in Proceedings ofThe InternationalConference on Computer and Information Technology pp 157ndash162 2002

6 Advances in Bioinformatics

[9] L Adleman P Rothemund S Roweis and E Winfree ldquoOnapplying molecular computation to the data encryption stan-dardrdquo in Proceedings of the 2nd DIMACS wWorkshop on DNABased Computers Princeton University pp 24ndash48 1996

[10] H Taghipour A TaghipourM Rezaei andH Esmaili ldquoSolvingthe independent set problem by sticker based DNA computersrdquoAmerican Journal of Molecular Biology vol 2 no 2 pp 153ndash1582012

[11] Q Ouyang P D Kaplan S Liu and A Libchaber ldquoDNAsolution of the maximal clique problemrdquo Science vol 278 no5337 pp 446ndash449 1997

[12] M Amos A Gibbons and D Hodgson ldquoError-resistant imple-mentation of DNA computationsrdquo in Proceedings of the 2ndDIMACS Workshop on DNA Based Computers 1996

[13] M Amos A Gibbons and D Hodgson ldquoA new model of DNAcomputationrdquo in Proceedings of the 12th British Colloquium onTheoretical Computer Science 1996

[14] M Hagiya M Arita D Kiga K Sakamoto and S YokoyamaldquoTowards parallel evaluation and learning of boolean 120583-formulas with moleculesrdquo DIMACS Series in Discrete Math-ematics and Theoretical Computer Science vol 48 pp 57ndash721999

[15] E Winfree ldquoSimulations of computing by self-assemblyrdquo inProceedings of the 4th International Meeting on DNA BasedComputers pp 213ndash239 1998

[16] E Winfree F Liu L A Wenzler and N C Seeman ldquoDesignand self-assembly of two-dimensional DNA crystalsrdquo Naturevol 394 no 6693 pp 539ndash544 1998

[17] E Winfree X Yang and N Seeman ldquoUniversal computationvia self-assembly of DNA some theory and experimentsrdquo inProceedings of the 2nd DIMACS Workshop on DNA BasedComputers 1996

[18] Q Liu Z Guo A E Condon R M Corn M G Lagally andL M Smith ldquoA surface-based approach to DNA computationrdquoin Proceedings of the 2nd Annual Meeting on DNA BasedComputers Princeton University 1996

[19] H Taghipour M Rezaei and H Esmaili ldquoApplying surface-basedDNA computing for solving the dominating set problemrdquoAmerican Journal ofMolecular Biology vol 2 no 3 pp 286ndash2902012

[20] G Rozenberg and H Spaink ldquoDNA computing by blockingrdquoTheoretical Computer Science vol 292 no 3 pp 653ndash665 2003

[21] M R Garey and D S Johnson Computer and Intractabilitya Guide to the Theory of NP-Completeness Freeman SanFrancisco Calif USA 1979

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Anatomy Research International

PeptidesInternational Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

International Journal of

Volume 2014

Zoology

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Molecular Biology International

GenomicsInternational Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

BioinformaticsAdvances in

Marine BiologyJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Signal TransductionJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

BioMed Research International

Evolutionary BiologyInternational Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Biochemistry Research International

ArchaeaHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Genetics Research International

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Advances in

Virolog y

Hindawi Publishing Corporationhttpwwwhindawicom

Nucleic AcidsJournal of

Volume 2014

Stem CellsInternational

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Enzyme Research

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Microbiology

Page 2: Research Article Solving the 0/1 Knapsack Problem by a ...Solving the 0/1 Knapsack Problem by a Biomolecular DNA Computer HassanTaghipour, 1 MahdiRezaei, 2 andHeydarAliEsmaili 1 Department

2 Advances in Bioinformatics

T

CGGAA

GCCTT

TC G

ACG

A

5998400

3998400

3998400

5998400

Figure 1 A DNA molecule

2 Basics of DNA Computing

21 Structure of DNA and DNA Computing Models DNAis a polymeric and a double-stranded molecule which iscomposed of monomers called nucleotides Nucleotides arebuilding blocks of DNA and each of them contains threecomponents sugar phosphate group and nitrogenous baseThere are four different nitrogenous bases which contributein DNA structure Thymine (T) and Cytosine (C) whichare called pyrimidines and Adenine (A) and Guanine (G)which are called purines Because nitrogenous bases arevariable components of nucleotides different neucleotidesare distinguished by nitrogenous bases which contribute intheir structure For this reason the name of the bases are usedto refer to the neucleotides and the neucleotides are simplyrepresented as A G C and T The nucleotides are linkedtogether by phosphodiester bonds and forma single-strandedDNA (ssDNA) A ssDNAmolecule can be likened to a stringconsisting of a combination of four different symbols A GC and T Mathematically this means that we have a four-letter alphabet sum = AGCT to encode information TwossDNA molecules join together to form a double-strandedDNA (DsDNA) based on complementary rule ldquoArdquo alwayspairs with ldquoTrdquo and likewise ldquoCrdquo pairs with ldquoGrdquo In Figure 1a schematic picture of DNA is shown

DNA computing was initially developed by Adleman in1994 Adleman resolved an instance of Hamiltonian pathproblem just by handling the DNA molecules [1] In 1995Lipton presented a method for solving the satisfiability(SAT) problem [3] Adleman-Lipton model can be used tosolve different NP-complete problems In Adleman-Liptonmodel DNA splints are used for the construction of solutionspace Adleman [4 5] also presented a molecular algorithmfor solving the 3-coloring problem Chang and Guo [6ndash8]showed that the DNA operations in Adelman-Lipton modelcould be used for developing DNA algorithms to resolvethe dominating set problem the vertex cover problem themaximal clique problem and the independent set problem

In 1999 Roweis et al [2] introduced the Sticker basedDNA computing model and applied it in solving the minimalset cover problem and this model also was applied forbreaking the Data Encryption Standard (DES) [9] In ourprevious work we also applied sticker based model forsolving the independent set problem [10]

Other than Adleman-Lipton and Sticker based modelsother various models are also proposed in DNA computingby researchers Quyang et al [11] solved the maximal cliqueproblem using DNA molecules and restriction endonucleaseenzymes Amos et al [12 13] described a DNA computationmodel using restriction endonuclease enzymes instead ofsuccessive cycles of separation by DNA hybridization which

can reduce the error rate of computation Hagiya et al [14]proposed a new method of DNA computing that involvesa self-acting DNA molecule containing both the inputprogram and working memory In this method a single-stranded DNA molecule consists of an input segment on the51015840 end followed by a formula (program) segment followed bya spacer and finally with a ldquoheadrdquo on the 31015840 end that movesand performs the computation Another method for DNAcomputation is ldquocomputation by self-assemblyrdquoWinfree et al[15ndash17] introduced a linear and 2-dimensional self-assemblymodel

The surface-basedmodel was introduced by Liu et al [18]This model uses DNA molecules attached to a solid surfaceinstead of DNAmolecules floating in a solutionThe surface-based model was used by Taghipour et al for solving thedominating set problem [19]The computing by blocking wasintroduced by Rozenberg and Spaink [20] This model usesa novel approach to filter the DNA molecules Instead ofseparating the DNA strands to distinct tubes or destroyingand removing the DNA molecules that do not contribute tofinding a solution it blocks (inactivates) them in a way thatthe blocked strands can be considered as nonexistent duringthe subsequent steps of computation

22 Sticker-Based DNA Computation The sticker model wasintroduced by Roweis et al [2] In this model there is amemory strand with 119873 bases in length subdivided into 119870nonoverlapping regions each 119872 bases long (119873 ge 119872119870)119872 can be for example 20 The substrands (bit regions)are significantly different from each other One sticker isdesigned for each subregion each sticker has 119872 bases longand is complementary to one and only one of the119870memoryregions If a sticker is annealed to its corresponding region onmemory strand then the particular region is said to be on Ifno sticker is annealed to a region then the corresponding bitis off Each memory strand along with its annealed stickersis called memory complex In sticker model a tube is acollection of memory complexes composed of large numberof identical memory strands each of which has stickersannealed only at the required bit positions This method ofrepresentation of information differs from other methods inwhich the presence or absence of a particular subsequencein a strand corresponded to a particular bit being on or offIn sticker model each possible bit string is represented bya unique association of memory strands and stickers Thismodel has a kind of random access memory that requiresno strand extension and uses no enzymes [2] Indeed inthe sticker model memory strands are used as registersand stickers are used to write and erase information in theregisters

Another conception in sticker model is (119870 119871) libraryEach (119870 119871) library contains memory complexes with 119870 bitregions the first 119871 bit regions are either on or off in allpossible ways whereas the remaining119870-119871 bit regions are offThe last 119870-119871 bit regions can be used for intermediate datastorage In every (119870 119871) library there are at least 2119871 memorycomplexes In Figure 2 a memory complex with 7 bit regionsrepresenting the binary number 1100101 is shown

Advances in Bioinformatics 3

Figure 2 A memory complex representing 1100101

23 Biological Operations in Sticker Model There are fourprincipal operations in sticker model combination sepa-ration setting and clearing [2] We also defined a newoperation called ldquodividerdquo which is used in the constructionof solution space [10] Here we briefly discuss about theseoperations

(1) Combine (1198790 1198791 and 119879

2) The memory complexes

from the tubes 1198791and 119879

2are combined to form a new

tube 1198790 simply the contents of 119879

1and 119879

2are poured

into the tube 1198790 (1198790= 1198791cup 1198792)

(2) Separate (1198790 119894) rarr (119879+ 119879minus) This operation creates

two new tubes 119879+ and 119879minus 119879+ contains the memorycomplexes having the 119894th bit on (119879+ = +(119879

0 119894)) and

119879minus contains the memory complexes having the 119894th bitoff (119879minus = minus(119879

0 119894))

(3) Set (1198790 119894) The 119894th bit region on every memory

complex in tube 1198790is set to 1 or turned on

(4) Clear (1198790 119894) The 119894th bit region on every memory

complex in tube 1198790is set to 0 or turned off

(5) Divide (1198790 1198791 and119879

2) By this operation the contents

of tube 1198790is divided into two equal portions and

poured into the tubes 1198791and 119879

2

3 Solving the 01 Knapsack Problem inSticker-Based DNA Computers

31 Definition of the Knapsack Problem Knapsack problemis one of the classical optimization problems which have twovariants the 01 and fractional knapsack problems

The 01 knapsack problem is posed as followsThere are 119899 items 119868

1 1198682 1198683 119868

119899 each item 119868

119895has aweight

119882119895and a value 119881

119895 where119882

119895and 119881

119895are integers We have a

knapsack which its capacity (weight) is 119862 where 119862 is also aninteger We want to take the most valuable set of items that fitin our knapsack Which items should we take This is calledthe 01 or binary knapsack problem because each item musteither be taken or left behind we cannot take a fractionalamount of an item

In the fractional knapsack problem the setup is the samebut we can take fractions of items rather than having tomakea binary (0-1) choice for each item The fractional knapsackproblem is solvable by a greedy strategy where as the 01knapsack problem is notThe 01 knapsack problem has beenproved to be an NP-complete problem [21]

119899 119882 119881

Figure 3 Memory strand with at least 119899 +119882 + 119881 bit regions

32 Construction of Sticker Based DNA Solution Space forKnapsack Problem

321 Designing Appropriate DNA Memory Complexes Asdiscussed before there are 119899 items 119868

1 1198682 1198683 119868

119899 each item

119868119895has a weight 119882

119895and a value 119881

119895 where 119882

119895and 119881

119895are

integers Let us consider that the total weight of items is 119882and total value of items is 119881

119882 = 1198821+1198822+1198823+ sdot sdot sdot + 119882

119899=119899

sum119895=1

119882119895

119881 = 1198811+ 1198812+ 1198813+ sdot sdot sdot + 119881

119899=119899

sum119895=1

119881119895

(1)

119899 = total number of itemsWe start with 2119899 ormore identicalmemory strands which

each of them has at least 119899 + 119882 + 119881 bit regions (Figure 3)The first 119899 bit regions (bit regions 1 to 119899) are used to represent119899 items the middle 119882 bit regions (bit regions 119899 + 1 to 119899 +119882) represent the total weight of items119882 and the next 119881 bitregions (bit regions 119899 + 119882 + 1 to 119899 + 119882 + 119881) represent thetotal value of items 119881 Each bit region for example can have20 neucleotides furthermore every memory strand at leastcontains 20 (119899 +119882 + 119881) neucleotides

322 Production of DNA Memory Complexes Which Repre-sent All Possible Subsets of Items It is clear that a set of 119899 itemshas 2119899 subsets and each of these subsets has its own weightand value For construction of solution space it is essentialto represent all subsets of items by appropriate DNAmemorycomplexes Furthermore by using at least 2119899 ormorememorystrands and making the first 119899 bit regions on or off in allpossible ways we represent all 2119899 subsets of items by DNAmemory complexes On the other hand simply we designa (119899 + 119882 + 119881 119899) library For this purpose (Procedure 1) isproposed

Procedure 1 has 119899 divide 119899 set and 119899 combine operationsAt the end of procedure tube 119879

0contains all of the memory

complexes which each of them represent one of the subsets ofitems

323 Representing the Weight and Value of Each Subset onDNA Memory Complexes In this step based on the itemswhich are present in subsets and by annealing correspondingstickers in 119882 and 119881 regions of memory strands the totalweight and value of subsets are represent on memory com-plexes Note each item 119868

119895has aweight119882

119895and a value119881

119895 thus

4 Advances in Bioinformatics

(1) Input (1198790) where 119879

0contains 2119899 or more memory strands with at least (119899 +119882 + 119881) bit regions

(2) For 119894 = 1 to 119899 where 119899 is the total number of items(a) Divide (119879

0 1198791 1198792)

(b) Set (1198791 119894)

(c) Combine (1198790 1198791 1198792)

End for

Procedure 1

For 119894 = 1 to 119899

Separate (1198790 119894) rarr (119879+ 119879minus)

For 119895 = 1 to119882119894

Set (119879+ 119899 + sum119894minus1119896=1119882119896+ 119895)

For 119895 = 1 to 119881119894

Set (119879+ 119899 + sum119899119896=1119882119896+ sum119894minus1

119896=1119881119896+ 119895)

Combine (1198790 119879+ 119879minus)

Procedure 2

for each item 119868119895 119882119895numbers of stickers are annealed to 119882

region and 119881119895numbers of stickers are annealed to 119881 region

on memory strands Furthermore the numbers of annealedstickers in119882 and119881 regions represent the weight and value ofcorresponding subset respectively Procedure 2 is proposedfor representing the weight and value of each subset

Now our solution space is completely produced andcontains at least 2119899 memory complexes which each of themrepresent one of the subsets of items and the numbers ofannealed stickers in 119882 and 119881 regions represent the weightand value of corresponding subset respectively

33 DNA Algorithm for Solving the 01 Knapsack ProblemAlgorithm 1 is proposed for solving the 01 knapsack prob-lem

According to the steps in the algorithm the knapsackproblem can be resolved by sticker based DNA computationin polynomial time

By the execution of step 1 thememory complexes withoutany annealed stickers in 119882 region (represent the subset 0)are placed in tube 119879

0 the memory complexes with only one

annealed sticker (represent the subsets of items which theirweight are 1) are placed in tube 119879

1 the memory complexes

with 2 annealed stickers (represent the subsets of items whichtheir weight are 2) are placed in tubes 119879

2 the memory

complexes with 3 annealed stickers (represent the subsets ofitems which their weight are 3) are placed in tube 119879

3 and

finally the tube 119879119882contains the memory complexes witch all

bit regions located in119882 region are turned to ldquoonrdquo (representthe subset which contains all items) On the other handsstep 1 is a sorting procedure and sorts memory complexesaccording to the number of annealed stickers in 119882 regionIn this step 119882 + 1 tubes are produced (119879

0 1198791 1198792 119879

119882)

and number of every tube indicate the number of annealed

stickers in 119882 region Step 1 contains 119882(119882 + 1)2 separateand 119882(119882 + 1)2 combine operations or totally it contains119882(119882 + 1) operations

In step 2 of algorithm the contents of tubes119879119888+1 119879119888+2 119879119888+3 119879

119882are discarded because memory

complexes which are present in these tubes represent subsetof items that their weight are exceeded the capacity ofknapsack Then the contents of tubes 119879

0 1198791 1198792 119879

119888are

mixed together and transferred to tube 1198790 Now tube 119879

0

contains memory complexes which represent the subsetsof items that their weight are not exceeded the capacity ofknapsack Furthermore at the end of step 2 the memorycomplexes which represent the subsets of items that theirweight are exceeded the capacity of knapsack removedfrom solution space and only remain memory complexesrepresenting subsets that fit in our knapsack It is clear thatthe step 2 contains only 2 operations

By the execution of step 3 sorting of memory complexesare performed according to the number of annealed stickersin 119881 region During this step 119881 + 1 tubes are produced(1198790 1198791 1198792 119879

119881) The memory complexes without any

annealed stickers in 119881 region (represent the subset 0) areplaced in tube 119879

0 the memory complexes with only one

annealed sticker (represent the subsets of items which theirvalue are 1) are placed in tube119879

1 thememory complexes with

2 annealed stickers (represent the subsets of itemswhich theirvalue are 2) are placed in tubes 119879

2 the memory complexes

with 3 annealed stickers (represent the subsets of items whichtheir value are 3) are placed in tube119879

3 and finally the tube119879

119881

contains the memory complexes with all bit regions locatedin 119881 region are turned to ldquoonrdquo (represent the subset whichcontains all items) Step 3 contains 119881(119881 + 1)2 separate and119881(119881+1)2 combine operations or totally it contains119881(119881+1)operations

Advances in Bioinformatics 5

(1) For 119894 = 119899 to 119899 +119882 minus 1For 119895 = 119894 down to 119899

Separate (119879119895minus119899 119894 + 1) rarr (119879

(119895minus119899+1)1015840 119879119895minus119899)

Combine (119879119895minus119899+1 119879119895minus119899+1 119879(119895minus119899+1)

1015840 )

(2)The capacity of knapsack is 119862Discard tubes 119879

119888+1 119879119888+2 119879119888+3 119879

119882

Combine (1198790 1198790 1198791 1198792 119879

119888)

(3) For 119894 = 119899 +119882 to 119899 +119882 + 119881 minus 1For 119895 = 119894 down to 119899 +119882

Separate (119879119895minus119899minus119882 119894 + 1) rarr (119879

(119895minus119899minus119882+1)1015840 119879119895minus119899minus119882)

Combine (119879119895minus119899minus119882+1 119879119895minus119899minus119882+1 119879(119895minus119899minus119882+1)

1015840 )

(4) Read 119879119881 else if it was empty then

Read 119879119881minus1

else if it was empty thenRead 119879

119881minus2 else if it was empty then

Read 119879

2 else if it was empty then

Read 1198791

Algorithm 1

In step 4 all of tubes (from 119879119881to 1198791) are evaluated for

presence of memory complexes and the first tube whichis not empty and contains memory complexes representthe most valuable set Step 4 maximally contains 119881 Readoperations

Finally it is clear that the total number of operations inour algorithm is1198822 + 1198812 +119882 + 2 lowast 119881 + 2

4 Conclusion

In this paper the sticker based DNA computing was usedfor solving the 01 knapsack problem This method couldbe used for solving other NP-complete problems There arefour principal operations in sticker model CombinationSeparation Setting and Clearing We also defined a newoperation called ldquodividerdquo and applied it in construction ofsolution space

As mentioned earlier one of the important properties ofDNA computing is its real massive parallelism which makesit a favorite and powerful tool for solving NP-complete andhard combinatorial problems In sticker model as in otherDNA based computation methods the property of DNAmolecules to making duplexes is used as main biologicaloperationThemain difference between the stickermodel andAdleman-Lipton model is that in the sticker model there is akind of Random accessmemory and the computations do notdepend on DNA molecules extension as seen in Adleman-Lipton model

References

[1] L Adleman ldquoMolecular computation of solutions to combina-torial problemsrdquo Science vol 266 pp 1021ndash1024 1994

[2] S Roweis E Winfree R Burgoyne et al ldquoA sticker basedmodel for DNA computationrdquo in Proceedings of the 2nd AnnualWorkshop onDNAComputing PrincetonUniversity L Landwe-ber and E Baum Eds Series in Discrete Mathematics andTheoretical Computer Science DIMACS pp 1ndash29 AmericanMathematical Society 1999

[3] R J Lipton ldquoDNA solution of hard computational problemsrdquoScience vol 268 pp 542ndash545 1995

[4] L M Adleman On Constructing a Molecular ComputerDepartment of Computer Science University of SouthernCalifornia 1995

[5] L M Adleman ldquoOn constructing a molecular computerrdquo inDNA Based Computers R J Lipton and E B Baum Eds pp1ndash22 American Mathematical Society 1996

[6] W-L Chang andM Guo ldquoSolving the dominating-set problemin Adleman-Liptons Modelrdquo in Proceedings of the 3rd Inter-national Conference on Parallel and Distributed ComputingApplications and Technologies pp 167ndash172 Kanazawa Japan2002

[7] W-L Chang and M Guo ldquoSolving the clique problem and thevertex cover problem in Adleman-Liptonrsquos modelrdquo in IASTEDInternational Conference Networks Parallel and DistributedProcessing and Applications pp 431ndash436 Tsukuba Japan 2002

[8] W-L Chang and M Guo ldquoSolving NP-complete problem inthe Adleman-LiptonModelrdquo in Proceedings ofThe InternationalConference on Computer and Information Technology pp 157ndash162 2002

6 Advances in Bioinformatics

[9] L Adleman P Rothemund S Roweis and E Winfree ldquoOnapplying molecular computation to the data encryption stan-dardrdquo in Proceedings of the 2nd DIMACS wWorkshop on DNABased Computers Princeton University pp 24ndash48 1996

[10] H Taghipour A TaghipourM Rezaei andH Esmaili ldquoSolvingthe independent set problem by sticker based DNA computersrdquoAmerican Journal of Molecular Biology vol 2 no 2 pp 153ndash1582012

[11] Q Ouyang P D Kaplan S Liu and A Libchaber ldquoDNAsolution of the maximal clique problemrdquo Science vol 278 no5337 pp 446ndash449 1997

[12] M Amos A Gibbons and D Hodgson ldquoError-resistant imple-mentation of DNA computationsrdquo in Proceedings of the 2ndDIMACS Workshop on DNA Based Computers 1996

[13] M Amos A Gibbons and D Hodgson ldquoA new model of DNAcomputationrdquo in Proceedings of the 12th British Colloquium onTheoretical Computer Science 1996

[14] M Hagiya M Arita D Kiga K Sakamoto and S YokoyamaldquoTowards parallel evaluation and learning of boolean 120583-formulas with moleculesrdquo DIMACS Series in Discrete Math-ematics and Theoretical Computer Science vol 48 pp 57ndash721999

[15] E Winfree ldquoSimulations of computing by self-assemblyrdquo inProceedings of the 4th International Meeting on DNA BasedComputers pp 213ndash239 1998

[16] E Winfree F Liu L A Wenzler and N C Seeman ldquoDesignand self-assembly of two-dimensional DNA crystalsrdquo Naturevol 394 no 6693 pp 539ndash544 1998

[17] E Winfree X Yang and N Seeman ldquoUniversal computationvia self-assembly of DNA some theory and experimentsrdquo inProceedings of the 2nd DIMACS Workshop on DNA BasedComputers 1996

[18] Q Liu Z Guo A E Condon R M Corn M G Lagally andL M Smith ldquoA surface-based approach to DNA computationrdquoin Proceedings of the 2nd Annual Meeting on DNA BasedComputers Princeton University 1996

[19] H Taghipour M Rezaei and H Esmaili ldquoApplying surface-basedDNA computing for solving the dominating set problemrdquoAmerican Journal ofMolecular Biology vol 2 no 3 pp 286ndash2902012

[20] G Rozenberg and H Spaink ldquoDNA computing by blockingrdquoTheoretical Computer Science vol 292 no 3 pp 653ndash665 2003

[21] M R Garey and D S Johnson Computer and Intractabilitya Guide to the Theory of NP-Completeness Freeman SanFrancisco Calif USA 1979

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Anatomy Research International

PeptidesInternational Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

International Journal of

Volume 2014

Zoology

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Molecular Biology International

GenomicsInternational Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

BioinformaticsAdvances in

Marine BiologyJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Signal TransductionJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

BioMed Research International

Evolutionary BiologyInternational Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Biochemistry Research International

ArchaeaHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Genetics Research International

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Advances in

Virolog y

Hindawi Publishing Corporationhttpwwwhindawicom

Nucleic AcidsJournal of

Volume 2014

Stem CellsInternational

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Enzyme Research

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Microbiology

Page 3: Research Article Solving the 0/1 Knapsack Problem by a ...Solving the 0/1 Knapsack Problem by a Biomolecular DNA Computer HassanTaghipour, 1 MahdiRezaei, 2 andHeydarAliEsmaili 1 Department

Advances in Bioinformatics 3

Figure 2 A memory complex representing 1100101

23 Biological Operations in Sticker Model There are fourprincipal operations in sticker model combination sepa-ration setting and clearing [2] We also defined a newoperation called ldquodividerdquo which is used in the constructionof solution space [10] Here we briefly discuss about theseoperations

(1) Combine (1198790 1198791 and 119879

2) The memory complexes

from the tubes 1198791and 119879

2are combined to form a new

tube 1198790 simply the contents of 119879

1and 119879

2are poured

into the tube 1198790 (1198790= 1198791cup 1198792)

(2) Separate (1198790 119894) rarr (119879+ 119879minus) This operation creates

two new tubes 119879+ and 119879minus 119879+ contains the memorycomplexes having the 119894th bit on (119879+ = +(119879

0 119894)) and

119879minus contains the memory complexes having the 119894th bitoff (119879minus = minus(119879

0 119894))

(3) Set (1198790 119894) The 119894th bit region on every memory

complex in tube 1198790is set to 1 or turned on

(4) Clear (1198790 119894) The 119894th bit region on every memory

complex in tube 1198790is set to 0 or turned off

(5) Divide (1198790 1198791 and119879

2) By this operation the contents

of tube 1198790is divided into two equal portions and

poured into the tubes 1198791and 119879

2

3 Solving the 01 Knapsack Problem inSticker-Based DNA Computers

31 Definition of the Knapsack Problem Knapsack problemis one of the classical optimization problems which have twovariants the 01 and fractional knapsack problems

The 01 knapsack problem is posed as followsThere are 119899 items 119868

1 1198682 1198683 119868

119899 each item 119868

119895has aweight

119882119895and a value 119881

119895 where119882

119895and 119881

119895are integers We have a

knapsack which its capacity (weight) is 119862 where 119862 is also aninteger We want to take the most valuable set of items that fitin our knapsack Which items should we take This is calledthe 01 or binary knapsack problem because each item musteither be taken or left behind we cannot take a fractionalamount of an item

In the fractional knapsack problem the setup is the samebut we can take fractions of items rather than having tomakea binary (0-1) choice for each item The fractional knapsackproblem is solvable by a greedy strategy where as the 01knapsack problem is notThe 01 knapsack problem has beenproved to be an NP-complete problem [21]

119899 119882 119881

Figure 3 Memory strand with at least 119899 +119882 + 119881 bit regions

32 Construction of Sticker Based DNA Solution Space forKnapsack Problem

321 Designing Appropriate DNA Memory Complexes Asdiscussed before there are 119899 items 119868

1 1198682 1198683 119868

119899 each item

119868119895has a weight 119882

119895and a value 119881

119895 where 119882

119895and 119881

119895are

integers Let us consider that the total weight of items is 119882and total value of items is 119881

119882 = 1198821+1198822+1198823+ sdot sdot sdot + 119882

119899=119899

sum119895=1

119882119895

119881 = 1198811+ 1198812+ 1198813+ sdot sdot sdot + 119881

119899=119899

sum119895=1

119881119895

(1)

119899 = total number of itemsWe start with 2119899 ormore identicalmemory strands which

each of them has at least 119899 + 119882 + 119881 bit regions (Figure 3)The first 119899 bit regions (bit regions 1 to 119899) are used to represent119899 items the middle 119882 bit regions (bit regions 119899 + 1 to 119899 +119882) represent the total weight of items119882 and the next 119881 bitregions (bit regions 119899 + 119882 + 1 to 119899 + 119882 + 119881) represent thetotal value of items 119881 Each bit region for example can have20 neucleotides furthermore every memory strand at leastcontains 20 (119899 +119882 + 119881) neucleotides

322 Production of DNA Memory Complexes Which Repre-sent All Possible Subsets of Items It is clear that a set of 119899 itemshas 2119899 subsets and each of these subsets has its own weightand value For construction of solution space it is essentialto represent all subsets of items by appropriate DNAmemorycomplexes Furthermore by using at least 2119899 ormorememorystrands and making the first 119899 bit regions on or off in allpossible ways we represent all 2119899 subsets of items by DNAmemory complexes On the other hand simply we designa (119899 + 119882 + 119881 119899) library For this purpose (Procedure 1) isproposed

Procedure 1 has 119899 divide 119899 set and 119899 combine operationsAt the end of procedure tube 119879

0contains all of the memory

complexes which each of them represent one of the subsets ofitems

323 Representing the Weight and Value of Each Subset onDNA Memory Complexes In this step based on the itemswhich are present in subsets and by annealing correspondingstickers in 119882 and 119881 regions of memory strands the totalweight and value of subsets are represent on memory com-plexes Note each item 119868

119895has aweight119882

119895and a value119881

119895 thus

4 Advances in Bioinformatics

(1) Input (1198790) where 119879

0contains 2119899 or more memory strands with at least (119899 +119882 + 119881) bit regions

(2) For 119894 = 1 to 119899 where 119899 is the total number of items(a) Divide (119879

0 1198791 1198792)

(b) Set (1198791 119894)

(c) Combine (1198790 1198791 1198792)

End for

Procedure 1

For 119894 = 1 to 119899

Separate (1198790 119894) rarr (119879+ 119879minus)

For 119895 = 1 to119882119894

Set (119879+ 119899 + sum119894minus1119896=1119882119896+ 119895)

For 119895 = 1 to 119881119894

Set (119879+ 119899 + sum119899119896=1119882119896+ sum119894minus1

119896=1119881119896+ 119895)

Combine (1198790 119879+ 119879minus)

Procedure 2

for each item 119868119895 119882119895numbers of stickers are annealed to 119882

region and 119881119895numbers of stickers are annealed to 119881 region

on memory strands Furthermore the numbers of annealedstickers in119882 and119881 regions represent the weight and value ofcorresponding subset respectively Procedure 2 is proposedfor representing the weight and value of each subset

Now our solution space is completely produced andcontains at least 2119899 memory complexes which each of themrepresent one of the subsets of items and the numbers ofannealed stickers in 119882 and 119881 regions represent the weightand value of corresponding subset respectively

33 DNA Algorithm for Solving the 01 Knapsack ProblemAlgorithm 1 is proposed for solving the 01 knapsack prob-lem

According to the steps in the algorithm the knapsackproblem can be resolved by sticker based DNA computationin polynomial time

By the execution of step 1 thememory complexes withoutany annealed stickers in 119882 region (represent the subset 0)are placed in tube 119879

0 the memory complexes with only one

annealed sticker (represent the subsets of items which theirweight are 1) are placed in tube 119879

1 the memory complexes

with 2 annealed stickers (represent the subsets of items whichtheir weight are 2) are placed in tubes 119879

2 the memory

complexes with 3 annealed stickers (represent the subsets ofitems which their weight are 3) are placed in tube 119879

3 and

finally the tube 119879119882contains the memory complexes witch all

bit regions located in119882 region are turned to ldquoonrdquo (representthe subset which contains all items) On the other handsstep 1 is a sorting procedure and sorts memory complexesaccording to the number of annealed stickers in 119882 regionIn this step 119882 + 1 tubes are produced (119879

0 1198791 1198792 119879

119882)

and number of every tube indicate the number of annealed

stickers in 119882 region Step 1 contains 119882(119882 + 1)2 separateand 119882(119882 + 1)2 combine operations or totally it contains119882(119882 + 1) operations

In step 2 of algorithm the contents of tubes119879119888+1 119879119888+2 119879119888+3 119879

119882are discarded because memory

complexes which are present in these tubes represent subsetof items that their weight are exceeded the capacity ofknapsack Then the contents of tubes 119879

0 1198791 1198792 119879

119888are

mixed together and transferred to tube 1198790 Now tube 119879

0

contains memory complexes which represent the subsetsof items that their weight are not exceeded the capacity ofknapsack Furthermore at the end of step 2 the memorycomplexes which represent the subsets of items that theirweight are exceeded the capacity of knapsack removedfrom solution space and only remain memory complexesrepresenting subsets that fit in our knapsack It is clear thatthe step 2 contains only 2 operations

By the execution of step 3 sorting of memory complexesare performed according to the number of annealed stickersin 119881 region During this step 119881 + 1 tubes are produced(1198790 1198791 1198792 119879

119881) The memory complexes without any

annealed stickers in 119881 region (represent the subset 0) areplaced in tube 119879

0 the memory complexes with only one

annealed sticker (represent the subsets of items which theirvalue are 1) are placed in tube119879

1 thememory complexes with

2 annealed stickers (represent the subsets of itemswhich theirvalue are 2) are placed in tubes 119879

2 the memory complexes

with 3 annealed stickers (represent the subsets of items whichtheir value are 3) are placed in tube119879

3 and finally the tube119879

119881

contains the memory complexes with all bit regions locatedin 119881 region are turned to ldquoonrdquo (represent the subset whichcontains all items) Step 3 contains 119881(119881 + 1)2 separate and119881(119881+1)2 combine operations or totally it contains119881(119881+1)operations

Advances in Bioinformatics 5

(1) For 119894 = 119899 to 119899 +119882 minus 1For 119895 = 119894 down to 119899

Separate (119879119895minus119899 119894 + 1) rarr (119879

(119895minus119899+1)1015840 119879119895minus119899)

Combine (119879119895minus119899+1 119879119895minus119899+1 119879(119895minus119899+1)

1015840 )

(2)The capacity of knapsack is 119862Discard tubes 119879

119888+1 119879119888+2 119879119888+3 119879

119882

Combine (1198790 1198790 1198791 1198792 119879

119888)

(3) For 119894 = 119899 +119882 to 119899 +119882 + 119881 minus 1For 119895 = 119894 down to 119899 +119882

Separate (119879119895minus119899minus119882 119894 + 1) rarr (119879

(119895minus119899minus119882+1)1015840 119879119895minus119899minus119882)

Combine (119879119895minus119899minus119882+1 119879119895minus119899minus119882+1 119879(119895minus119899minus119882+1)

1015840 )

(4) Read 119879119881 else if it was empty then

Read 119879119881minus1

else if it was empty thenRead 119879

119881minus2 else if it was empty then

Read 119879

2 else if it was empty then

Read 1198791

Algorithm 1

In step 4 all of tubes (from 119879119881to 1198791) are evaluated for

presence of memory complexes and the first tube whichis not empty and contains memory complexes representthe most valuable set Step 4 maximally contains 119881 Readoperations

Finally it is clear that the total number of operations inour algorithm is1198822 + 1198812 +119882 + 2 lowast 119881 + 2

4 Conclusion

In this paper the sticker based DNA computing was usedfor solving the 01 knapsack problem This method couldbe used for solving other NP-complete problems There arefour principal operations in sticker model CombinationSeparation Setting and Clearing We also defined a newoperation called ldquodividerdquo and applied it in construction ofsolution space

As mentioned earlier one of the important properties ofDNA computing is its real massive parallelism which makesit a favorite and powerful tool for solving NP-complete andhard combinatorial problems In sticker model as in otherDNA based computation methods the property of DNAmolecules to making duplexes is used as main biologicaloperationThemain difference between the stickermodel andAdleman-Lipton model is that in the sticker model there is akind of Random accessmemory and the computations do notdepend on DNA molecules extension as seen in Adleman-Lipton model

References

[1] L Adleman ldquoMolecular computation of solutions to combina-torial problemsrdquo Science vol 266 pp 1021ndash1024 1994

[2] S Roweis E Winfree R Burgoyne et al ldquoA sticker basedmodel for DNA computationrdquo in Proceedings of the 2nd AnnualWorkshop onDNAComputing PrincetonUniversity L Landwe-ber and E Baum Eds Series in Discrete Mathematics andTheoretical Computer Science DIMACS pp 1ndash29 AmericanMathematical Society 1999

[3] R J Lipton ldquoDNA solution of hard computational problemsrdquoScience vol 268 pp 542ndash545 1995

[4] L M Adleman On Constructing a Molecular ComputerDepartment of Computer Science University of SouthernCalifornia 1995

[5] L M Adleman ldquoOn constructing a molecular computerrdquo inDNA Based Computers R J Lipton and E B Baum Eds pp1ndash22 American Mathematical Society 1996

[6] W-L Chang andM Guo ldquoSolving the dominating-set problemin Adleman-Liptons Modelrdquo in Proceedings of the 3rd Inter-national Conference on Parallel and Distributed ComputingApplications and Technologies pp 167ndash172 Kanazawa Japan2002

[7] W-L Chang and M Guo ldquoSolving the clique problem and thevertex cover problem in Adleman-Liptonrsquos modelrdquo in IASTEDInternational Conference Networks Parallel and DistributedProcessing and Applications pp 431ndash436 Tsukuba Japan 2002

[8] W-L Chang and M Guo ldquoSolving NP-complete problem inthe Adleman-LiptonModelrdquo in Proceedings ofThe InternationalConference on Computer and Information Technology pp 157ndash162 2002

6 Advances in Bioinformatics

[9] L Adleman P Rothemund S Roweis and E Winfree ldquoOnapplying molecular computation to the data encryption stan-dardrdquo in Proceedings of the 2nd DIMACS wWorkshop on DNABased Computers Princeton University pp 24ndash48 1996

[10] H Taghipour A TaghipourM Rezaei andH Esmaili ldquoSolvingthe independent set problem by sticker based DNA computersrdquoAmerican Journal of Molecular Biology vol 2 no 2 pp 153ndash1582012

[11] Q Ouyang P D Kaplan S Liu and A Libchaber ldquoDNAsolution of the maximal clique problemrdquo Science vol 278 no5337 pp 446ndash449 1997

[12] M Amos A Gibbons and D Hodgson ldquoError-resistant imple-mentation of DNA computationsrdquo in Proceedings of the 2ndDIMACS Workshop on DNA Based Computers 1996

[13] M Amos A Gibbons and D Hodgson ldquoA new model of DNAcomputationrdquo in Proceedings of the 12th British Colloquium onTheoretical Computer Science 1996

[14] M Hagiya M Arita D Kiga K Sakamoto and S YokoyamaldquoTowards parallel evaluation and learning of boolean 120583-formulas with moleculesrdquo DIMACS Series in Discrete Math-ematics and Theoretical Computer Science vol 48 pp 57ndash721999

[15] E Winfree ldquoSimulations of computing by self-assemblyrdquo inProceedings of the 4th International Meeting on DNA BasedComputers pp 213ndash239 1998

[16] E Winfree F Liu L A Wenzler and N C Seeman ldquoDesignand self-assembly of two-dimensional DNA crystalsrdquo Naturevol 394 no 6693 pp 539ndash544 1998

[17] E Winfree X Yang and N Seeman ldquoUniversal computationvia self-assembly of DNA some theory and experimentsrdquo inProceedings of the 2nd DIMACS Workshop on DNA BasedComputers 1996

[18] Q Liu Z Guo A E Condon R M Corn M G Lagally andL M Smith ldquoA surface-based approach to DNA computationrdquoin Proceedings of the 2nd Annual Meeting on DNA BasedComputers Princeton University 1996

[19] H Taghipour M Rezaei and H Esmaili ldquoApplying surface-basedDNA computing for solving the dominating set problemrdquoAmerican Journal ofMolecular Biology vol 2 no 3 pp 286ndash2902012

[20] G Rozenberg and H Spaink ldquoDNA computing by blockingrdquoTheoretical Computer Science vol 292 no 3 pp 653ndash665 2003

[21] M R Garey and D S Johnson Computer and Intractabilitya Guide to the Theory of NP-Completeness Freeman SanFrancisco Calif USA 1979

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Anatomy Research International

PeptidesInternational Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

International Journal of

Volume 2014

Zoology

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Molecular Biology International

GenomicsInternational Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

BioinformaticsAdvances in

Marine BiologyJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Signal TransductionJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

BioMed Research International

Evolutionary BiologyInternational Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Biochemistry Research International

ArchaeaHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Genetics Research International

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Advances in

Virolog y

Hindawi Publishing Corporationhttpwwwhindawicom

Nucleic AcidsJournal of

Volume 2014

Stem CellsInternational

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Enzyme Research

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Microbiology

Page 4: Research Article Solving the 0/1 Knapsack Problem by a ...Solving the 0/1 Knapsack Problem by a Biomolecular DNA Computer HassanTaghipour, 1 MahdiRezaei, 2 andHeydarAliEsmaili 1 Department

4 Advances in Bioinformatics

(1) Input (1198790) where 119879

0contains 2119899 or more memory strands with at least (119899 +119882 + 119881) bit regions

(2) For 119894 = 1 to 119899 where 119899 is the total number of items(a) Divide (119879

0 1198791 1198792)

(b) Set (1198791 119894)

(c) Combine (1198790 1198791 1198792)

End for

Procedure 1

For 119894 = 1 to 119899

Separate (1198790 119894) rarr (119879+ 119879minus)

For 119895 = 1 to119882119894

Set (119879+ 119899 + sum119894minus1119896=1119882119896+ 119895)

For 119895 = 1 to 119881119894

Set (119879+ 119899 + sum119899119896=1119882119896+ sum119894minus1

119896=1119881119896+ 119895)

Combine (1198790 119879+ 119879minus)

Procedure 2

for each item 119868119895 119882119895numbers of stickers are annealed to 119882

region and 119881119895numbers of stickers are annealed to 119881 region

on memory strands Furthermore the numbers of annealedstickers in119882 and119881 regions represent the weight and value ofcorresponding subset respectively Procedure 2 is proposedfor representing the weight and value of each subset

Now our solution space is completely produced andcontains at least 2119899 memory complexes which each of themrepresent one of the subsets of items and the numbers ofannealed stickers in 119882 and 119881 regions represent the weightand value of corresponding subset respectively

33 DNA Algorithm for Solving the 01 Knapsack ProblemAlgorithm 1 is proposed for solving the 01 knapsack prob-lem

According to the steps in the algorithm the knapsackproblem can be resolved by sticker based DNA computationin polynomial time

By the execution of step 1 thememory complexes withoutany annealed stickers in 119882 region (represent the subset 0)are placed in tube 119879

0 the memory complexes with only one

annealed sticker (represent the subsets of items which theirweight are 1) are placed in tube 119879

1 the memory complexes

with 2 annealed stickers (represent the subsets of items whichtheir weight are 2) are placed in tubes 119879

2 the memory

complexes with 3 annealed stickers (represent the subsets ofitems which their weight are 3) are placed in tube 119879

3 and

finally the tube 119879119882contains the memory complexes witch all

bit regions located in119882 region are turned to ldquoonrdquo (representthe subset which contains all items) On the other handsstep 1 is a sorting procedure and sorts memory complexesaccording to the number of annealed stickers in 119882 regionIn this step 119882 + 1 tubes are produced (119879

0 1198791 1198792 119879

119882)

and number of every tube indicate the number of annealed

stickers in 119882 region Step 1 contains 119882(119882 + 1)2 separateand 119882(119882 + 1)2 combine operations or totally it contains119882(119882 + 1) operations

In step 2 of algorithm the contents of tubes119879119888+1 119879119888+2 119879119888+3 119879

119882are discarded because memory

complexes which are present in these tubes represent subsetof items that their weight are exceeded the capacity ofknapsack Then the contents of tubes 119879

0 1198791 1198792 119879

119888are

mixed together and transferred to tube 1198790 Now tube 119879

0

contains memory complexes which represent the subsetsof items that their weight are not exceeded the capacity ofknapsack Furthermore at the end of step 2 the memorycomplexes which represent the subsets of items that theirweight are exceeded the capacity of knapsack removedfrom solution space and only remain memory complexesrepresenting subsets that fit in our knapsack It is clear thatthe step 2 contains only 2 operations

By the execution of step 3 sorting of memory complexesare performed according to the number of annealed stickersin 119881 region During this step 119881 + 1 tubes are produced(1198790 1198791 1198792 119879

119881) The memory complexes without any

annealed stickers in 119881 region (represent the subset 0) areplaced in tube 119879

0 the memory complexes with only one

annealed sticker (represent the subsets of items which theirvalue are 1) are placed in tube119879

1 thememory complexes with

2 annealed stickers (represent the subsets of itemswhich theirvalue are 2) are placed in tubes 119879

2 the memory complexes

with 3 annealed stickers (represent the subsets of items whichtheir value are 3) are placed in tube119879

3 and finally the tube119879

119881

contains the memory complexes with all bit regions locatedin 119881 region are turned to ldquoonrdquo (represent the subset whichcontains all items) Step 3 contains 119881(119881 + 1)2 separate and119881(119881+1)2 combine operations or totally it contains119881(119881+1)operations

Advances in Bioinformatics 5

(1) For 119894 = 119899 to 119899 +119882 minus 1For 119895 = 119894 down to 119899

Separate (119879119895minus119899 119894 + 1) rarr (119879

(119895minus119899+1)1015840 119879119895minus119899)

Combine (119879119895minus119899+1 119879119895minus119899+1 119879(119895minus119899+1)

1015840 )

(2)The capacity of knapsack is 119862Discard tubes 119879

119888+1 119879119888+2 119879119888+3 119879

119882

Combine (1198790 1198790 1198791 1198792 119879

119888)

(3) For 119894 = 119899 +119882 to 119899 +119882 + 119881 minus 1For 119895 = 119894 down to 119899 +119882

Separate (119879119895minus119899minus119882 119894 + 1) rarr (119879

(119895minus119899minus119882+1)1015840 119879119895minus119899minus119882)

Combine (119879119895minus119899minus119882+1 119879119895minus119899minus119882+1 119879(119895minus119899minus119882+1)

1015840 )

(4) Read 119879119881 else if it was empty then

Read 119879119881minus1

else if it was empty thenRead 119879

119881minus2 else if it was empty then

Read 119879

2 else if it was empty then

Read 1198791

Algorithm 1

In step 4 all of tubes (from 119879119881to 1198791) are evaluated for

presence of memory complexes and the first tube whichis not empty and contains memory complexes representthe most valuable set Step 4 maximally contains 119881 Readoperations

Finally it is clear that the total number of operations inour algorithm is1198822 + 1198812 +119882 + 2 lowast 119881 + 2

4 Conclusion

In this paper the sticker based DNA computing was usedfor solving the 01 knapsack problem This method couldbe used for solving other NP-complete problems There arefour principal operations in sticker model CombinationSeparation Setting and Clearing We also defined a newoperation called ldquodividerdquo and applied it in construction ofsolution space

As mentioned earlier one of the important properties ofDNA computing is its real massive parallelism which makesit a favorite and powerful tool for solving NP-complete andhard combinatorial problems In sticker model as in otherDNA based computation methods the property of DNAmolecules to making duplexes is used as main biologicaloperationThemain difference between the stickermodel andAdleman-Lipton model is that in the sticker model there is akind of Random accessmemory and the computations do notdepend on DNA molecules extension as seen in Adleman-Lipton model

References

[1] L Adleman ldquoMolecular computation of solutions to combina-torial problemsrdquo Science vol 266 pp 1021ndash1024 1994

[2] S Roweis E Winfree R Burgoyne et al ldquoA sticker basedmodel for DNA computationrdquo in Proceedings of the 2nd AnnualWorkshop onDNAComputing PrincetonUniversity L Landwe-ber and E Baum Eds Series in Discrete Mathematics andTheoretical Computer Science DIMACS pp 1ndash29 AmericanMathematical Society 1999

[3] R J Lipton ldquoDNA solution of hard computational problemsrdquoScience vol 268 pp 542ndash545 1995

[4] L M Adleman On Constructing a Molecular ComputerDepartment of Computer Science University of SouthernCalifornia 1995

[5] L M Adleman ldquoOn constructing a molecular computerrdquo inDNA Based Computers R J Lipton and E B Baum Eds pp1ndash22 American Mathematical Society 1996

[6] W-L Chang andM Guo ldquoSolving the dominating-set problemin Adleman-Liptons Modelrdquo in Proceedings of the 3rd Inter-national Conference on Parallel and Distributed ComputingApplications and Technologies pp 167ndash172 Kanazawa Japan2002

[7] W-L Chang and M Guo ldquoSolving the clique problem and thevertex cover problem in Adleman-Liptonrsquos modelrdquo in IASTEDInternational Conference Networks Parallel and DistributedProcessing and Applications pp 431ndash436 Tsukuba Japan 2002

[8] W-L Chang and M Guo ldquoSolving NP-complete problem inthe Adleman-LiptonModelrdquo in Proceedings ofThe InternationalConference on Computer and Information Technology pp 157ndash162 2002

6 Advances in Bioinformatics

[9] L Adleman P Rothemund S Roweis and E Winfree ldquoOnapplying molecular computation to the data encryption stan-dardrdquo in Proceedings of the 2nd DIMACS wWorkshop on DNABased Computers Princeton University pp 24ndash48 1996

[10] H Taghipour A TaghipourM Rezaei andH Esmaili ldquoSolvingthe independent set problem by sticker based DNA computersrdquoAmerican Journal of Molecular Biology vol 2 no 2 pp 153ndash1582012

[11] Q Ouyang P D Kaplan S Liu and A Libchaber ldquoDNAsolution of the maximal clique problemrdquo Science vol 278 no5337 pp 446ndash449 1997

[12] M Amos A Gibbons and D Hodgson ldquoError-resistant imple-mentation of DNA computationsrdquo in Proceedings of the 2ndDIMACS Workshop on DNA Based Computers 1996

[13] M Amos A Gibbons and D Hodgson ldquoA new model of DNAcomputationrdquo in Proceedings of the 12th British Colloquium onTheoretical Computer Science 1996

[14] M Hagiya M Arita D Kiga K Sakamoto and S YokoyamaldquoTowards parallel evaluation and learning of boolean 120583-formulas with moleculesrdquo DIMACS Series in Discrete Math-ematics and Theoretical Computer Science vol 48 pp 57ndash721999

[15] E Winfree ldquoSimulations of computing by self-assemblyrdquo inProceedings of the 4th International Meeting on DNA BasedComputers pp 213ndash239 1998

[16] E Winfree F Liu L A Wenzler and N C Seeman ldquoDesignand self-assembly of two-dimensional DNA crystalsrdquo Naturevol 394 no 6693 pp 539ndash544 1998

[17] E Winfree X Yang and N Seeman ldquoUniversal computationvia self-assembly of DNA some theory and experimentsrdquo inProceedings of the 2nd DIMACS Workshop on DNA BasedComputers 1996

[18] Q Liu Z Guo A E Condon R M Corn M G Lagally andL M Smith ldquoA surface-based approach to DNA computationrdquoin Proceedings of the 2nd Annual Meeting on DNA BasedComputers Princeton University 1996

[19] H Taghipour M Rezaei and H Esmaili ldquoApplying surface-basedDNA computing for solving the dominating set problemrdquoAmerican Journal ofMolecular Biology vol 2 no 3 pp 286ndash2902012

[20] G Rozenberg and H Spaink ldquoDNA computing by blockingrdquoTheoretical Computer Science vol 292 no 3 pp 653ndash665 2003

[21] M R Garey and D S Johnson Computer and Intractabilitya Guide to the Theory of NP-Completeness Freeman SanFrancisco Calif USA 1979

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Anatomy Research International

PeptidesInternational Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

International Journal of

Volume 2014

Zoology

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Molecular Biology International

GenomicsInternational Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

BioinformaticsAdvances in

Marine BiologyJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Signal TransductionJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

BioMed Research International

Evolutionary BiologyInternational Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Biochemistry Research International

ArchaeaHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Genetics Research International

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Advances in

Virolog y

Hindawi Publishing Corporationhttpwwwhindawicom

Nucleic AcidsJournal of

Volume 2014

Stem CellsInternational

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Enzyme Research

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Microbiology

Page 5: Research Article Solving the 0/1 Knapsack Problem by a ...Solving the 0/1 Knapsack Problem by a Biomolecular DNA Computer HassanTaghipour, 1 MahdiRezaei, 2 andHeydarAliEsmaili 1 Department

Advances in Bioinformatics 5

(1) For 119894 = 119899 to 119899 +119882 minus 1For 119895 = 119894 down to 119899

Separate (119879119895minus119899 119894 + 1) rarr (119879

(119895minus119899+1)1015840 119879119895minus119899)

Combine (119879119895minus119899+1 119879119895minus119899+1 119879(119895minus119899+1)

1015840 )

(2)The capacity of knapsack is 119862Discard tubes 119879

119888+1 119879119888+2 119879119888+3 119879

119882

Combine (1198790 1198790 1198791 1198792 119879

119888)

(3) For 119894 = 119899 +119882 to 119899 +119882 + 119881 minus 1For 119895 = 119894 down to 119899 +119882

Separate (119879119895minus119899minus119882 119894 + 1) rarr (119879

(119895minus119899minus119882+1)1015840 119879119895minus119899minus119882)

Combine (119879119895minus119899minus119882+1 119879119895minus119899minus119882+1 119879(119895minus119899minus119882+1)

1015840 )

(4) Read 119879119881 else if it was empty then

Read 119879119881minus1

else if it was empty thenRead 119879

119881minus2 else if it was empty then

Read 119879

2 else if it was empty then

Read 1198791

Algorithm 1

In step 4 all of tubes (from 119879119881to 1198791) are evaluated for

presence of memory complexes and the first tube whichis not empty and contains memory complexes representthe most valuable set Step 4 maximally contains 119881 Readoperations

Finally it is clear that the total number of operations inour algorithm is1198822 + 1198812 +119882 + 2 lowast 119881 + 2

4 Conclusion

In this paper the sticker based DNA computing was usedfor solving the 01 knapsack problem This method couldbe used for solving other NP-complete problems There arefour principal operations in sticker model CombinationSeparation Setting and Clearing We also defined a newoperation called ldquodividerdquo and applied it in construction ofsolution space

As mentioned earlier one of the important properties ofDNA computing is its real massive parallelism which makesit a favorite and powerful tool for solving NP-complete andhard combinatorial problems In sticker model as in otherDNA based computation methods the property of DNAmolecules to making duplexes is used as main biologicaloperationThemain difference between the stickermodel andAdleman-Lipton model is that in the sticker model there is akind of Random accessmemory and the computations do notdepend on DNA molecules extension as seen in Adleman-Lipton model

References

[1] L Adleman ldquoMolecular computation of solutions to combina-torial problemsrdquo Science vol 266 pp 1021ndash1024 1994

[2] S Roweis E Winfree R Burgoyne et al ldquoA sticker basedmodel for DNA computationrdquo in Proceedings of the 2nd AnnualWorkshop onDNAComputing PrincetonUniversity L Landwe-ber and E Baum Eds Series in Discrete Mathematics andTheoretical Computer Science DIMACS pp 1ndash29 AmericanMathematical Society 1999

[3] R J Lipton ldquoDNA solution of hard computational problemsrdquoScience vol 268 pp 542ndash545 1995

[4] L M Adleman On Constructing a Molecular ComputerDepartment of Computer Science University of SouthernCalifornia 1995

[5] L M Adleman ldquoOn constructing a molecular computerrdquo inDNA Based Computers R J Lipton and E B Baum Eds pp1ndash22 American Mathematical Society 1996

[6] W-L Chang andM Guo ldquoSolving the dominating-set problemin Adleman-Liptons Modelrdquo in Proceedings of the 3rd Inter-national Conference on Parallel and Distributed ComputingApplications and Technologies pp 167ndash172 Kanazawa Japan2002

[7] W-L Chang and M Guo ldquoSolving the clique problem and thevertex cover problem in Adleman-Liptonrsquos modelrdquo in IASTEDInternational Conference Networks Parallel and DistributedProcessing and Applications pp 431ndash436 Tsukuba Japan 2002

[8] W-L Chang and M Guo ldquoSolving NP-complete problem inthe Adleman-LiptonModelrdquo in Proceedings ofThe InternationalConference on Computer and Information Technology pp 157ndash162 2002

6 Advances in Bioinformatics

[9] L Adleman P Rothemund S Roweis and E Winfree ldquoOnapplying molecular computation to the data encryption stan-dardrdquo in Proceedings of the 2nd DIMACS wWorkshop on DNABased Computers Princeton University pp 24ndash48 1996

[10] H Taghipour A TaghipourM Rezaei andH Esmaili ldquoSolvingthe independent set problem by sticker based DNA computersrdquoAmerican Journal of Molecular Biology vol 2 no 2 pp 153ndash1582012

[11] Q Ouyang P D Kaplan S Liu and A Libchaber ldquoDNAsolution of the maximal clique problemrdquo Science vol 278 no5337 pp 446ndash449 1997

[12] M Amos A Gibbons and D Hodgson ldquoError-resistant imple-mentation of DNA computationsrdquo in Proceedings of the 2ndDIMACS Workshop on DNA Based Computers 1996

[13] M Amos A Gibbons and D Hodgson ldquoA new model of DNAcomputationrdquo in Proceedings of the 12th British Colloquium onTheoretical Computer Science 1996

[14] M Hagiya M Arita D Kiga K Sakamoto and S YokoyamaldquoTowards parallel evaluation and learning of boolean 120583-formulas with moleculesrdquo DIMACS Series in Discrete Math-ematics and Theoretical Computer Science vol 48 pp 57ndash721999

[15] E Winfree ldquoSimulations of computing by self-assemblyrdquo inProceedings of the 4th International Meeting on DNA BasedComputers pp 213ndash239 1998

[16] E Winfree F Liu L A Wenzler and N C Seeman ldquoDesignand self-assembly of two-dimensional DNA crystalsrdquo Naturevol 394 no 6693 pp 539ndash544 1998

[17] E Winfree X Yang and N Seeman ldquoUniversal computationvia self-assembly of DNA some theory and experimentsrdquo inProceedings of the 2nd DIMACS Workshop on DNA BasedComputers 1996

[18] Q Liu Z Guo A E Condon R M Corn M G Lagally andL M Smith ldquoA surface-based approach to DNA computationrdquoin Proceedings of the 2nd Annual Meeting on DNA BasedComputers Princeton University 1996

[19] H Taghipour M Rezaei and H Esmaili ldquoApplying surface-basedDNA computing for solving the dominating set problemrdquoAmerican Journal ofMolecular Biology vol 2 no 3 pp 286ndash2902012

[20] G Rozenberg and H Spaink ldquoDNA computing by blockingrdquoTheoretical Computer Science vol 292 no 3 pp 653ndash665 2003

[21] M R Garey and D S Johnson Computer and Intractabilitya Guide to the Theory of NP-Completeness Freeman SanFrancisco Calif USA 1979

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Anatomy Research International

PeptidesInternational Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

International Journal of

Volume 2014

Zoology

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Molecular Biology International

GenomicsInternational Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

BioinformaticsAdvances in

Marine BiologyJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Signal TransductionJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

BioMed Research International

Evolutionary BiologyInternational Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Biochemistry Research International

ArchaeaHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Genetics Research International

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Advances in

Virolog y

Hindawi Publishing Corporationhttpwwwhindawicom

Nucleic AcidsJournal of

Volume 2014

Stem CellsInternational

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Enzyme Research

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Microbiology

Page 6: Research Article Solving the 0/1 Knapsack Problem by a ...Solving the 0/1 Knapsack Problem by a Biomolecular DNA Computer HassanTaghipour, 1 MahdiRezaei, 2 andHeydarAliEsmaili 1 Department

6 Advances in Bioinformatics

[9] L Adleman P Rothemund S Roweis and E Winfree ldquoOnapplying molecular computation to the data encryption stan-dardrdquo in Proceedings of the 2nd DIMACS wWorkshop on DNABased Computers Princeton University pp 24ndash48 1996

[10] H Taghipour A TaghipourM Rezaei andH Esmaili ldquoSolvingthe independent set problem by sticker based DNA computersrdquoAmerican Journal of Molecular Biology vol 2 no 2 pp 153ndash1582012

[11] Q Ouyang P D Kaplan S Liu and A Libchaber ldquoDNAsolution of the maximal clique problemrdquo Science vol 278 no5337 pp 446ndash449 1997

[12] M Amos A Gibbons and D Hodgson ldquoError-resistant imple-mentation of DNA computationsrdquo in Proceedings of the 2ndDIMACS Workshop on DNA Based Computers 1996

[13] M Amos A Gibbons and D Hodgson ldquoA new model of DNAcomputationrdquo in Proceedings of the 12th British Colloquium onTheoretical Computer Science 1996

[14] M Hagiya M Arita D Kiga K Sakamoto and S YokoyamaldquoTowards parallel evaluation and learning of boolean 120583-formulas with moleculesrdquo DIMACS Series in Discrete Math-ematics and Theoretical Computer Science vol 48 pp 57ndash721999

[15] E Winfree ldquoSimulations of computing by self-assemblyrdquo inProceedings of the 4th International Meeting on DNA BasedComputers pp 213ndash239 1998

[16] E Winfree F Liu L A Wenzler and N C Seeman ldquoDesignand self-assembly of two-dimensional DNA crystalsrdquo Naturevol 394 no 6693 pp 539ndash544 1998

[17] E Winfree X Yang and N Seeman ldquoUniversal computationvia self-assembly of DNA some theory and experimentsrdquo inProceedings of the 2nd DIMACS Workshop on DNA BasedComputers 1996

[18] Q Liu Z Guo A E Condon R M Corn M G Lagally andL M Smith ldquoA surface-based approach to DNA computationrdquoin Proceedings of the 2nd Annual Meeting on DNA BasedComputers Princeton University 1996

[19] H Taghipour M Rezaei and H Esmaili ldquoApplying surface-basedDNA computing for solving the dominating set problemrdquoAmerican Journal ofMolecular Biology vol 2 no 3 pp 286ndash2902012

[20] G Rozenberg and H Spaink ldquoDNA computing by blockingrdquoTheoretical Computer Science vol 292 no 3 pp 653ndash665 2003

[21] M R Garey and D S Johnson Computer and Intractabilitya Guide to the Theory of NP-Completeness Freeman SanFrancisco Calif USA 1979

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Anatomy Research International

PeptidesInternational Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

International Journal of

Volume 2014

Zoology

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Molecular Biology International

GenomicsInternational Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

BioinformaticsAdvances in

Marine BiologyJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Signal TransductionJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

BioMed Research International

Evolutionary BiologyInternational Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Biochemistry Research International

ArchaeaHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Genetics Research International

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Advances in

Virolog y

Hindawi Publishing Corporationhttpwwwhindawicom

Nucleic AcidsJournal of

Volume 2014

Stem CellsInternational

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Enzyme Research

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Microbiology

Page 7: Research Article Solving the 0/1 Knapsack Problem by a ...Solving the 0/1 Knapsack Problem by a Biomolecular DNA Computer HassanTaghipour, 1 MahdiRezaei, 2 andHeydarAliEsmaili 1 Department

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Anatomy Research International

PeptidesInternational Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

International Journal of

Volume 2014

Zoology

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Molecular Biology International

GenomicsInternational Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

BioinformaticsAdvances in

Marine BiologyJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Signal TransductionJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

BioMed Research International

Evolutionary BiologyInternational Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Biochemistry Research International

ArchaeaHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Genetics Research International

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Advances in

Virolog y

Hindawi Publishing Corporationhttpwwwhindawicom

Nucleic AcidsJournal of

Volume 2014

Stem CellsInternational

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Enzyme Research

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Microbiology