week-10 - What to do with Hard Problems? Sometimes we end...

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

View Full Document Right Arrow Icon
1 What to do with Hard Problems? Sometimes we end up with a situation where our boss tells us to write a fast algorithm to solve a problem, but we try and fail. We will learn how to prove that the problem is hard, and that we’re not going to find one… …but, will your boss be happy with this? Such problems will come up, and they need an answer, and we need to write something to get that answer. So what are our options? Our Options: 1. Try to do as much simplification as possible, and hope that we can get it to a point where we can solve the problem “fast enough”. Often, if you know enough about your instances, you can write an algorithm that is near polynomial time in the average case. 2. Use a heuristic to approximate the solution. Rather than worrying about getting a correct answer in pretty good worst-case time, we worry about getting a worst- case pretty good answer in polynomial time! Approximating TSP The Euclidean Traveling Salesman is the traditional version of this problem: a salesman wants to plan a drive to visit all his customers exactly once and get back home. All weights of the edges represent the actual distance between the points. TSP remains hard even when the distances are Euclidean distances in the plane. However, this version does allow us an easy method to obtain a reasonable solution.
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 Properties of Euclidean TSP Euclidean geometry satisfies the triangle inequality: d ( u , w ) d ( u , v ) + d ( v , w ) u w v A lower bound. .. We can approximate the optimal Euclidean TSP tour using minimum spanning trees. Claim: the cost of a MST is a lower bound on the cost of a TSP tour. Why? Deleting any edge from a TSP tour leaves a path, which is a tree of weight at least that of the minimum spanning tree! 1 3 6 11 10 9 8 7 5 4 2
Background image of page 2
3 An upper bound. .. Claim: Twice the minimum spanning tree is an upper bound on the length of the cost of a TSP tour. If we were allowed to visit cities more than once, doing a depth-first traversal of a MST, and then walking out the tour specified is at most twice the cost of MST. Why? We will be using each edge exactly twice. 1 3 6 11 10 9 8 7 5 4 2 Preventing multiple visits. .. One of the key elements about the Traveling Salesman Problem is that we’re explicitly not allowed to visit a single vertex multiple times. If we do take into account this restriction, can we still guarantee the upper bound of twice the minimum spanning tree?
Background image of page 3

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

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

Page1 / 11

week-10 - What to do with Hard Problems? Sometimes we end...

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