







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Some concept of Data Structures and Algorithm are Permutation, Representation, Implemented, Algorithm Design, Dynamic Programming, Graph Data Structures, String Processing, General Trees. Main points of this lecture are: Completeness, Dangerous Confession, Lower Bound Proof, World, Completeness Reduction, Semester, Prove Exponential-Time, Lower Bounds, Problems, Same Problem
Typology: Slides
1 / 13
This page cannot be seen from the preview
Don't miss anything!








Suppose you fail to find a fast algorithm. What can you tell your boss?
Suppose I gave you the following algorithm to solve the bandersnatch problem:
Bandersnatch(G) Convert G to an instance of the Bo-billy problem Y. Call the subroutine Bo-billy on Y to solve this instance. Return the answer of Bo-billy(Y ) as the answer to G.
Such a translation from instances of one type of problem to instances of another type such that answers are preserved is called a reduction.
Now suppose my reduction translates G to Y in O(P (n)):
The second argument is the idea we use to prove problems hard!
An instance is a problem with the input parameters specified. TSP instance: d[v 1 , d 2 ] = 10, d[v 1 , d 3 ] = 5, d[v 1 , d 4 ] = 9, d[v 2 , d 3 ] = 6, d[v 2 , d 4 ] = 9, d[v 3 , d 4 ] = 3
3 2 4
1 10 5 3 9
6 9
Solution: {v 1 , v 2 , v 3 , v 4 } cost= 27
Note that there are many possible ways to encode the input graph: adjacency matrices, edge lists, etc. All reasonable encodings will be within polynomial size of each other. The fact that we can ignore minor differences in encoding is important. We are concerned with the difference between algorithms which are polynomial and exponential in the size of the input.
Given a weighted graph G and integer k, does there exist a traveling salesman tour with cost ≤ k? Using binary search and the decision version of the problem we can find the optimal TSP solution.
Reducing (tranforming) one algorithm problem A to another problem B is an argument that if you can figure out how to solve B then you can solve A. We showed that many algorithm problems are reducible to sorting (e.g. element uniqueness, mode, etc.). A computer scientist and an engineer wanted some tea...
Example 2: V = v 1 , v 2 ,
C = {{v 1 , v 2 }, {v 1 , v 2 }, {v 1 }}
Although you try, and you try, and you try and you try, you can get no satisfaction. There is no satisfying assigment since v 1 must be FALSE (third clause), so v 2 must be FALSE (second clause), but then the first clause is unsatisfiable!