13.12.2012 Views

Theoretical and Experimental DNA Computation (Natural ...

Theoretical and Experimental DNA Computation (Natural ...

Theoretical and Experimental DNA Computation (Natural ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

52 3 Models of Molecular <strong>Computation</strong><br />

linear-time solutions although, of course, there is frequently an implication of<br />

an exponential number of processors available to execute any of the basic operations<br />

in unit time.<br />

The 3-vertex-colorability problem<br />

Problem: Three coloring<br />

Given a graph G =(V,E), find a 3-vertex-coloring if one exists, otherwise<br />

return the value empty.<br />

Solution:<br />

• Input: The input set U consists of all strings of the form p1c1p2c2 ...pncn<br />

where n = |V | is the number of vertices in the graph. Here, for all i, pi<br />

uniquely encodes “position i” <strong>and</strong>eachciisany one of the “colors” 1,<br />

2, or 3. Each such string represents one possible assignment of colors to<br />

the vertices of the graph in which, for each i, color ci is assigned to vertex i.<br />

• Algorithm:<br />

for j =1ton do<br />

begin<br />

copy(U, {U1,U2,U3})<br />

for i = 1, 2 <strong>and</strong> 3, <strong>and</strong> all k such that (j, k) ∈ E<br />

in parallel do remove(Ui, {pj �= i, pki})<br />

union({U1,U2,U3},U)<br />

end<br />

select(U)<br />

• Complexity: O(n) parallel time.<br />

After the j th iteration of the for loop, the computation ensures that in the<br />

remaining strings vertex j (although it may be colored 1, 2, or 3 depending on<br />

which of the sets Ui it survived in) has no adjacent vertices that are similarly<br />

colored. Thus, when the algorithm terminates, U only encodes legal colorings<br />

if any exist. Indeed, every legal coloring will be represented in U.<br />

The Hamiltonian path problem<br />

A Hamiltonian path between any two vertices u, v of a graph is a path that<br />

passes through every vertex in V −{u, v} precisely once [67].<br />

Problem: Hamiltonian path<br />

Given a graph G =(V,E) withn vertices, determine whether G contains a<br />

Hamiltonian path.

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

Saved successfully!

Ooh no, something went wrong!