Presentation is loading. Please wait.

Presentation is loading. Please wait.

Complexity Theory in Practice

Similar presentations


Presentation on theme: "Complexity Theory in Practice"— Presentation transcript:

1 Complexity Theory in Practice
Section 8.1: Circumscribing Hard Problems -Vamsi Goli -Vinay Gudivendula -Laura Hall

2 Circumscribing Hard Problems
-Practical point of view -Theoretical point of view -So we consider for Restricted versions of Hard Problems in order to find their complexity.

3 Consider Binpacking problem
-instance is given by a set, s each with a size s -Bin size is B -main goal is to pack all elements into the smallest number of bins.

4 Binpacking problem(Continued)
-Restriction considered: elements size is atleast equal to B/3. -problem is solved in polynomial time. -the bin can contain one , two or three elements. -the case of three elements is uniquely identifiable.(Restriction considered)

5 Binpacking problem(Continued)
-collect elements of size B/3 and place them in the bins and left over B/3 elements are placed along with other elements. -Now identify other sizes elements and place them in the bin. -This takes atmost linear time.

6 Binpacking problem(Continued)
-Now identify the largest subset of pairs that do not share any element . -solve maximum matching problem: which has a polynomial time solution. -the overall running time is dominated by the maximum matching algorithm.

7 G3C problem -the pbm is NP-complete for any fixed number of colors greater than two, solvable in linear time for two colors. -Restriction considered: the pbm is restricted to planar graphs. -The restriction is considered as any Planar graph can be 4 colored and is solved in linear time.

8 G3C problem(Continued)
-G3C problem remains hard when restricted to planar graphs. -Now to prove that Planar G3C is NP-complete: -First reduce G3C to planar by providing a crossover gadget whenever the graph in the plane produces crossing edges. -with all the crossings removed, it is planar.

9 Planar G3C is NP-complete
The crossing gadget must replace the two edges in such a way that: the gadget is planar and three colorable the coloring of endpoints of one original edge in no way effects the coloring of endpoints of other. the two endpoints of an original edge cannot be given same color.

10 Planar G3C is NP-complete
-Design a planar three colorable gadget with four endpoints. x, x‘,y,y‘. -assign the same color to x and x‘ and independently same color to y and y’.

11 Planar G3C is NP-complete
The following shows how to use this to remove crossings from some edge, say: a,b

12 Planar G3C is NP-complete
-so here we detect all edge crossings and replace all edge crossings with our gadget. -it takes polynomial time. -Planarity is not only the important parameter involved, it also considers the maximum degree of vertices.

13 Planar G3C is NP-complete
-that is the chromatic number should not exceed the maximum vertex degree of the graph. -G3C restricted to graphs of degree three is in P. -But when restricted to have a degree equal to four an abrupt transition takes place.

14 Planar G3C is NP-complete
-G3C is NP-complete even when restricted to instances where no degree is more than four. To prove, we need to replace any vertex of degree larger than four with a gadget such that: the gadget is three colorable and contains no vertex larger than four. there is one attaching point for each vertex point to which the original vertex was connected. all attaching points must be colored identically.

15 Planar G3C is NP-complete
-the following figure has all the 3 properties discussed in the previous slide.

16 Planar G3C is NP-complete
-more attaching points are provided by stringing together several such blocks. -i. e a new block is attached to the existing component. [fig] - the transformation preserves colorability and carried out in polynomial time.

17 Complexity Theory Complexity theory helps the algorithmic designer in assessing hard problems.

18 Restrictions of Hard Problems
HC is NP-Complete even when restricted to planar graphs where no vertex degree exceeds three.

19 HC is NP-complete A degree reducing gadget is selected which allows a single path to enter from any connecting edge and exit through any other connecting edge.

20 HC is NP-complete Design a planar gadget that can be substituted for the crossing of two independent XOR components. Finally remove a crossing between an XOR piece and a segment corresponding to a literal in a clause piece.

21 HC is NP-complete We can trivially avoid crossings with variable pieces from instances derived from Positive 1 in 3SAT. XOR components touch only one of the two segments. Crossings with the segments of the clause pieces remain.

22 HC is NP- complete We propose to design a new gadget that will replace triple edges of each clause. Place three edges in series rather than parallel. The gadget must ensure that any path through it uses exactly one of the three series edges.

23 Planar Satisfiability Problem
Def:- Planar Satisfiability problem is restricted to planar instances. An instance of SAT is deemed planar if its graph representation is planar. Graph representation for an instance of satisfiability Set a vertex for each variable. A vertex for each clause. An edge between a variable vertex and clause vertex.

24 Restrictions among Graph Problems
A common restriction among graph problems is restriction to planar graphs. For many graph problems we have a proof of NP-completeness for the general version of the problem typically from 3SAT. In order to show planar versions of the graph we have to proceed problem by problem developing a separate reduction.

25 Types of representations
Polar representation:- Each variable gives raise to two vertices connected by an edge, each clause gives raise to a single vertex, and edges connect clauses to all vertices corresponding to literals. Non polar representation:- Variables and clauses give raise to a single vertex each edges connect clauses to all vertices corresponding to variables that appear within the clause.

26 Planar 3SAT are NP-complete
With representations defined earlier the polar and non polar versions of 3SAT are NP-complete. From Preposition 8.1 and Corollary 8.1 Vertex Cover remains NP-complete when limited to graph of degree 5. Planar Vertex Cover is NP-complete.

27 Planar 3SAT are NP-complete
To meet the present requirements reduction from 3SAT uses Local replacement. A clause piece assimilated to a single vertex. The conclusion follows from the NP-completeness of the polar version of planar 3SAT.

28 Planar 3SAT are NP-complete
But the vertex cover remains NP-complete when restricted to planar graphs of degree 5 cannot be concluded from preposition 8.1 and corollary 8.1 because The two reductions cannot be combined since they do not start from same problem. We need a planar version of (3,4)-SAT in order to draw the conclusion.

29 Minimal Research Program Problem is NP-complete
An instance of this problem is given by set of unclassified problems s, a partial order on s denoted by <, and a bound B. Whether there exists a subset s complement with |s|<B and complexity classification function c. By applying the two rules 1. x<y and c(y)=easy implies c(x)=easy. 2. x<y and c(x)=hard implies c(y )=hard.

30 Promise Problems

31 Restrictions of Hard Problems
So far, all of the restrictions we have placed on NP-complete problems have been easily verifiable features. However Not all of the restrictions are verifiable in polynomial time Some restrictions are not verifiable at all

32 Restrictions of Hard Problems
These “unreasonable” restrictions don’t make hard problems unsolvable. Algorithms can be created that easily solve certain instances of problems These problems are still theoretically hard, but easily solvable in practice.

33 “Perfect” Graphs An example of a problem with “unreasonable” restrictions - the “perfect” graph Perfect graphs are created through restriction of graph problems The chromatic number of every sub-graph equals the clique number of that sub-graph Example – bipartite graph

34 “Perfect” Graphs Several NP-hard problems are solvable in polynomial time using perfect graphs Chromatic Number Independent Set Problem Clique Problem

35 “Perfect” Graphs When all instances of a problem can be represented by perfect graphs, it doesn’t matter whether other restrictions can be verified in polynomial time. This saves time by reducing the need to create algorithms that solve every special case of the problem

36 Promise Problems Promise problems are regular problems with a predicate defined for certain instances of the problem. Algorithms that solve promise problems must Provide the correct solution Fulfill the promise Do both within prescribed resource bounds

37 Promise Problems The type of promise that an algorithm uses makes a difference Different types of promises can Increase/decrease the complexity of a task Make problems decidable/undecidable Make problems tractable/intractable

38 Promise Problems A common, yet important type of promise is uniqueness
Each valid instance of a problem only has at most one solution How does uniqueness affect NP-hard and #P-hard problems? Some become solvable in constant time or polynomial time Some become tractable

39 Promise Problems - Completion
However, some problems still remain hard How do we know? Completion A normal problem is a “completion” of a Promise Problem if the two problems have the same answers for all instances that fulfill the promise Completion is the reverse of restriction Complexity of the promise problem = Complexity of the easiest of its completions

40 Promise Problems - Completion
Proving a promise problem is hard involves proving that none of its completions is in P unless some conjecture is false. What conjecture? Usually P ≠ NP However, we need something stronger here

41 RP ≠ NP RP (Randomized Polynomial Time)
A complexity class for which a probabilistic TM exists with the following properties Always runs in Polynomial time in the input size If the correct answer is NO, it always returns NO If the correct answer is YES, it returns YES with probability of at least ½ P is a subset of RP. RP is a subset of NP RP ≠ NP implies P ≠ NP

42 Hard Promise Problem Theorem 8.7
Uniquely Promised SAT cannot be solved in polynomial time unless RP = NP This theorem can be applied to other hard promise problems (with uniqueness promises) through strictly parsimonious transformations.

43 Hard Promise Problems Even with strictly parsimonious transformations and the promise of uniqueness, some problems are still untractable 3SAT Hamiltonian Circuit TSP Maximum Cut Partition Problem Subset Sum Problem Binpacking Etc.

44 Hard Promise Problems Verifying the uniqueness promise is usually hard for hard problems For most NP-Complete problems, deciding the question of uniqueness appears to be in

45 Thank You


Download ppt "Complexity Theory in Practice"

Similar presentations


Ads by Google