![]() ![]() You have to work pretty hard, even to solve modest sized Problems. Compared to the size of the graphs on which we compute strongly connected componenets, or shortest paths, but, that's how it goes with NP-complete problems. So I realize these are still pretty absurdly small problem sizes, compared to the size of the arrrays, that we can sort. ![]() To make it more concrete, you could run this dynamic programming algorithm for values of n, probably pushing 30 or so. Okay, if you look at approximation you'll see it's really n over a constant raised to the n but still that's much much bigger than a constant 2 raised to the n. 2^n is of course exponential but it's quite a bit better than n factorial. The running time will be big O of n^2 times 2^n. But, this dynamic programming algorithm will run quite a bit faster than brute-force search. We're not expected a polynomial time algorithm. In this video, and the next, we'll develop a dynamic programming algorithm that solves the TSP problem. This would allow you to solve problems with say, 12, 13, maybe 14 vertices. ![]() You could of course solve the problem using root four search, the running time of root four search would be in factorial. For example in this four vertex pink network the minimum cost towards overall cost thirteen. That minimizes the sum of the corresponding end edges. The responsibility of the algorithm is to figure out the minimum cost way of visiting each vertex exactly once, that is you're supposed to output a tour, a permutation on the vertices. The input, very simple, just a complete un-directed graph, and each of the end choose two edges has a non-negative cost. So let me remind you briefly about the traveling salesman problem. In fact, it's going to be another neat application of the dynamic programming algorithm design. The fact that you can do better than naive brute-force search. ![]() That, it's widely believed there's no known polynomial time algorithm for solving the TSP problem. When we first talked about TSP, it was bad news. In this video and the next, we're going to revisit the famous traveling salesman problem. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |