12.01.2015 Views

Download - Academy Publisher

Download - Academy Publisher

Download - Academy Publisher

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Ⅲ. AN IMPROVED DNA ALGORITHM FOR<br />

THE PARTITION PROBLEM<br />

A. Sticker-based solution space for the partiton<br />

problem<br />

This algorithm for construction the sticker-based<br />

solution space for subsets of a finite set is similar to the<br />

Michael’s algorithm at 2005[13].<br />

Being similar to the Knapsack Problem[19],we will<br />

construct the solution space for subsets of A. Assume that<br />

x 1 ...x n is an n-bit binary number, which is applied to<br />

represent n elements. Assume that the sum of all the<br />

elements in A is S.<br />

Procedure Solution_Generator(T 0 , n)<br />

1: For m = 1 to n<br />

2: Amplify(T 0 , T 1 , T 2 ).<br />

3: Append(T 1 , x 1 m).<br />

4: Append(T 2 , x 0 m).<br />

5: T 01 = ∪ ( T 1 , T 2 ).<br />

6: EndFor<br />

EndProcedure<br />

From Solution_Generator(T 0 , n), it takes n amplify<br />

operations, 2n append operations, n merge operations<br />

and three test tubes to construct sticker-based solution<br />

space. A n-bit binary number corresponds to an array of<br />

input. A value sequence for every bit contains 15 bases.<br />

Therefore, the length of a DNA strand, encoding a subset,<br />

is 15n bases consisting of the concatenation of one value<br />

sequence for each bit.<br />

B. Sticker-based solution space for elements of<br />

subsets for a finite set<br />

An element a i , in A can be converted as a number y i,1<br />

y i,2 …y i,k , for k = a i . Sticker is applied to represent every<br />

bit y i,j for 1≤ j ≤ k .For every bit y i, j , two distinct DNA<br />

sequence were designed. One corresponds to the value<br />

“0” for y i,j and the other corresponds to the value “1” for<br />

y i,j . For the sake of convenience in our presentation,<br />

assume that y 1 i, j denotes the value of y i, j to be 1 and y 0 i, j<br />

denotes the value of y i, j to be 0.The following algorithm<br />

is employed to construct sticker-based solution space for<br />

elements of 2 n possible subsets for a n-element set A.<br />

Assume that S is the sum of all the elements in A.<br />

Procedure Make_Value(T 0 , n)<br />

1: For i = 1 to n<br />

2: T 1 = +( T 0 , x i 1 ) and T 2 = -( T 0 , x i 1 ).<br />

3: If (Detect(T 1 )= ‘yes’ ) then<br />

4: For j = 1 to ai<br />

5: Append(T1 , y1i, j).<br />

6: EndFor<br />

7: If (Detect(T 2 )= ‘yes’ ) then<br />

8: For j = 1 to a i<br />

9: Append(T 2 , y 0 i, j).<br />

10: EndFor<br />

11: EndIf<br />

12: T 01 = ∪ ( T 1 , T 2 ).<br />

13: EndFor<br />

EndProcedure<br />

From Make_Value(T 0 , n), it takes n extract operations,<br />

n detect operations, S append operations, n merge<br />

operations, and three test tubes to construct sticker-based<br />

solution space for elements of 2 n possible subsets to a<br />

n-element set A. n-bit binary number corresponds to a<br />

subset and the longest bit of binary number, which are<br />

used to encode the values of all the elements in A , is S .<br />

Assume that a value sequence for every bit contains 15<br />

bases. Therefore, the last length of a DNA strand,<br />

encoding elements of 2 n possible subsets to a n-element<br />

set A, is 15(n+S).<br />

C. The DNA based algorithm to finish the Logic<br />

Multiplication operation functions<br />

In order to find the legal strands of the partition<br />

problem, a parallel searcher is designed.<br />

Procedure Parallel_Searcher(T 0, S/2)<br />

1: For i = 0 to S -1<br />

2: t = min{S/2, i}.<br />

3: For j = t down to 0<br />

4: T ON j+1 = + (T j , y 1 i+1) and T j =-(T j ,<br />

y 1 i+1).<br />

5: T j+1 = ∪ (T j+1 , T ON j+1).<br />

6: EndFor<br />

7: EndFor<br />

8: If (Detect(T s/2+1 ) =“yes” )<br />

9: Discard(T s/2+1 ).<br />

10: EndIf<br />

EndProcedure<br />

From Parallel_Searcher (T 01 , S/2), it takes S(S+2)/8<br />

exact operations, S(S+2)/8 merge operations, one detect<br />

operation, one discard operation and S/2+2 test tubes<br />

where S is the sum of all the element in the set A. The<br />

length of a DNA strand has never been changed, is<br />

15(n+S).<br />

D. An improved DNA based algorithm for the<br />

partition problem<br />

Algorithm1. An improved DNA based algorithm for<br />

the partition problem<br />

1: Solution_Generator(T 0 , n).<br />

2: Make_Value(T 0 , n).<br />

3: Parallel_Searcher(T 0, S/2).<br />

4: If ( Detect(T S/2 ) =“yes” )<br />

5: Read(T S/2 ).<br />

6: EndIf<br />

Theorem 1: From those steps in Algorithm 1, the<br />

improved DNA based algorithm for the partition problem<br />

can be solved.<br />

Proof: On the execution of Line(1), it calls<br />

Solution_Generator(T 0 , n). The algorithm, Solution_<br />

Generator(T 0 , n), is mainly used to construct solution<br />

space for 2 n possible subsets of an n-element in the set A.<br />

Line (2) calls Make_Value(T 0 , n).The algorithm, Make_<br />

Value(T 0 , n) is employed to construct sticker-based<br />

solution space for element of 2 n possible subsets of an<br />

n-element in the set A. Line(3) is called Parallel_<br />

Searcher(T 0, S/2). The algorithm, Parallel_ Searcher(T 0,<br />

S/2) is mainly used to search the legal DNA strands for<br />

the partition problem.<br />

51

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!