1 / 17

Reduction Techniques

Reduction Techniques. Restriction Local Replacement Component Design. Restriction. Show that a special case of the problem you are interested in is NP-complete. For example: Long Path Problem Input: Graph G = (V,E), Integer k

azuka
Download Presentation

Reduction Techniques

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Reduction Techniques • Restriction • Local Replacement • Component Design

  2. Restriction • Show that a special case of the problem you are interested in is NP-complete. • For example: • Long Path Problem • Input: Graph G = (V,E), Integer k • Yes/No Question: Does G have a simple path of length at least k? • What special case of this problem is another problem we have considered?

  3. Local Replacement • Make many independent (non-interacting) local changes to the structure. • Example: Reducing SAT to 3SAT • Work on each clause of the SAT instance independently as follows

  4. Easy Cases • Suppose a clause contains k literals: • if k = 1 (meaning Ci = {z1} ), we can add in two new variables v1 and v2, and transform this into 4 clauses: • {v1, v2, z1} {v1, v2, z1} {v1, v2, z1} {v1, v2, z1} • if k = 2 ( Ci = {z1, z2} ), we can add in one variable v1 and 2 new clauses: {v1, z1, z2} {v1, z1, z2} • if k = 3 ( Ci = {z1, z2, z3} ), we move this clause as-is.

  5. Harder Case if k > 3 ( Ci = {z1, z2, …, zk} ) we can add in k - 3 new variables (v1, …, vk-3) and k - 2 clauses: {z1, z2, v1} {v1, z3, v2} {v2, z4, v3} … {vk-3, zk-1, zk} Thus, in the worst case, n clauses will be turned into n2 clauses. This cannot move us from polynomial to exponential time.

  6. Component Design • These are the more elaborate problems where we design complex interacting components • Examples: • Reducing 3SAT to independent set • Reducing independent set to Hamiltonian Cycle

  7. Truth Assignment Component For each variable, we can create two vertices: … v1v1 v2v2 v3v3 vnvn If we connect a variable and its negation, we can be sure that only one of them is in the independent set. We will set our integer bound for independent set to force one vertex from each pair to be chosen.

  8. Clause Component … v1v1 v2v2 v3v3 vnvn For each clause, we create a triangle: v1 v2 v4 v3v7 v3v4 v5v6 At most one vertex in a triangle can be in the independent set. We will set our integer bound for independent set to force one vertex from each triangle to be chosen.

  9. Opposing literals rule C = {v1, v2, v3} , {v1, v2, v4} , {v2, v4, v5} , {v3, v4, v5} v1v1 v2v2 v3v3 v4v4 v5v5 v2 v1 v2 v3 v1v3 v2v4 v4v5 v4v5

  10. u v v u Vertex Cover to Ham Cycle Edge Component: For every edge in the Minimum Vertex Cover problem, we create a component in the Hamiltonian Cycle Problem: u v

  11. Observations…. u v u v u v v v u u v u There are only three possible ways that a cycle can include all of the vertices in this component. Key property: If a path enters v (u), it leaves on v’ (u’)

  12. u v Node Selection All components that represent edges connected to node u are strung together into a chain. If there are V vertices, then we will have V of these chains, all interwoven. Choosing a node u corresponds to traversing such a chain u v w u w u u x x u

  13. y v u w y v u w v u y w v u z x v u z v u x Vertex cover = (v,u) x z v u

  14. y v u w y v u w v u y w v u z x v u z v u x Vertex cover = (v,w,x) x z v u

  15. Tying the Chains Together If we want to know if its possible to cover the original graph using only k vertices, this would be the same as seeing if we can include all of the vertices using only k chains. How can we include exactly k chains in the Hamiltonian Cycle problem? We must add k extra vertices and connect each of them to the beginning and end of every chain. Since each vertex can only be included once, this allows k chains in the final cycle.

  16. Beginning a Transform

  17. The Final Transform for k=1

More Related