
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

ECE 537 - Foundations of Computing Prof. Sen Homework # Due: Thursday, November 1, 2007 in class
(a) Develop a brute-force algorithm that will always solve this problem optimally. What is the time complexity of your algorithm? (b) Show that this problem has optimal substructure, and then develop an algorithm that at- tempts to solve this problem by constructing a tour using a greedy strategy that always adds the next closest city to the tour. What is the time complexity of your algorithm? Give an example in which your greedy algorithm does not produce an optimal solution. (c) Show that this problem has overlapping subproblems, and then use dynamic programming to develop an algorithm that will always solve this problem optimally. Demonstrate how your solution operates on the problem:
What are the time and space complexities of your algorithm?