{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Algorithms_Part14

# Algorithms_Part14 - S Dasgupta C.H Papadimitriou and U.V...

This preview shows pages 1–4. Sign up to view the full content.

S. Dasgupta, C.H. Papadimitriou, and U.V. Vazirani 261 Factoring One last point: we started off this book by introducing another famously hard search problem: FACTORING , the task of finding all prime factors of a given integer. But the difficulty of FACTORING is of a different nature than that of the other hard search problems we have just seen. For example, nobody believes that FACTORING is NP -complete. One major difference is that, in the case of FACTORING , the definition does not contain the now familiar clause “or report that none exists.” A number can always be factored into primes. Another difference (possibly not completely unrelated) is this: as we shall see in Chap- ter 10, FACTORING succumbs to the power of quantum computation —while SAT , TSP and the other NP -complete problems do not seem to.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
262 Algorithms Figure 8.7 Reductions between search problems. 3D MATCHING R UDRATA CYCLE S UBSET SUM TSP ILP ZOE All of NP S AT 3S AT V ERTEX COVER I NDEPENDENT SET C LIQUE 8.3 The reductions We shall now see that the search problems of Section 8.1 can be reduced to one another as depicted in Figure 8.7. As a consequence, they are all NP -complete. Before we tackle the specific reductions in the tree, let’s warm up by relating two versions of the Rudrata problem. R UDRATA ( s, t ) -P ATH -→ R UDRATA C YCLE Recall the R UDRATA CYCLE problem: given a graph, is there a cycle that passes through each vertex exactly once? We can also formulate the closely related R UDRATA ( s, t ) - PATH problem, in which two vertices s and t are specified, and we want a path starting at s and ending at t that goes through each vertex exactly once. Is it possible that R UDRATA CYCLE is easier than R UDRATA ( s, t ) - PATH ? We will show by a reduction that the answer is no. The reduction maps an instance ( G = ( V, E ) , s, t ) of R UDRATA ( s, t ) - PATH into an instance G 0 = ( V 0 , E 0 ) of R UDRATA CYCLE as follows: G 0 is simply G with an additional vertex x and two new edges { s, x } and { x, t } . For instance: G G 0 s t t s x
S. Dasgupta, C.H. Papadimitriou, and U.V. Vazirani 263 So V 0 = V ∪ { x } , and E 0 = E ∪ {{ s, x } , { x, t }} . How do we recover a Rudrata ( s, t ) - path in G given any Rudrata cycle in G 0 ? Easy, we just delete the edges { s, x } and { x, t } from the cycle. Instance: nodes s, t G = ( V, E ) { s, x } , { x, t } G 0 = ( V 0 , E 0 ) R UDRATA CYCLE and edges { s, x } , { x, t } No solution Solution: path Add node x Solution: cycle No solution Delete edges R UDRATA ( s, t ) - PATH To confirm the validity of this reduction, we have to show that it works in the case of either outcome depicted. 1. When the instance of R UDRATA CYCLE has a solution. Since the new vertex x has only two neighbors, s and t , any Rudrata cycle in G 0 must consec- utively traverse the edges { t, x } and { x, s } . The rest of the cycle then traverses every other vertex en route from s to t . Thus deleting the two edges { t, x } and { x, s } from the Rudrata cycle gives a Rudrata path from s to t in the original graph G .

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}