Algorithms_Part14 - S. Dasgupta, C.H. Papadimitriou, and...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 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. 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 = ( V , E ) of R UDRATA CYCLE as follows: G is simply G with an additional vertex x and two new edges { s, x } and { x, t } . For instance: G G s t t s x S. Dasgupta, C.H. Papadimitriou, and U.V. Vazirani 263 So V = V ∪ { x } , and E = E ∪ {{ s, x } , { x, t }} . How do we recover a Rudrata ( s, t )- path in G given any Rudrata cycle in G ? 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 = ( V , E ) 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 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...
View Full Document

Page1 / 20

Algorithms_Part14 - S. Dasgupta, C.H. Papadimitriou, and...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online