Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

ECE 537 Homework 8: Foundations of Computing - Algorithms and Complexity, Assignments of Electrical and Electronics Engineering

Professor sen's ece 537 homework 8 for the foundations of computing course. The assignment includes solving problems related to matrix multiplication using strassen's algorithm for matrices of sizes not a power of 2, and the traveling salesman problem (tsp) using brute force, a greedy approach, and dynamic programming.

Typology: Assignments

Pre 2010

Uploaded on 07/23/2009

koofers-user-g6o
koofers-user-g6o 🇺🇸

10 documents

1 / 1

Toggle sidebar

Related documents


Partial preview of the text

Download ECE 537 Homework 8: Foundations of Computing - Algorithms and Complexity and more Assignments Electrical and Electronics Engineering in PDF only on Docsity! ECE 537 - Foundations of Computing Prof. Sen Homework #8 Due: Thursday, November 1, 2007 in class 1. Problem 16.2-2 in the Cormen et. al text. 2. Problem 16.2-4 in the Cormen et. al text. 3. Generalize Strassen’s matrix multiplication algorithm as we discussed in class to square matrices whose sizes are not a power of 2. Describe how the generalized algorithm works, and provide an analysis of its running time. 4. In the traveling salesman problem (TSP) we are given a graph G that consists of a set of n vertices V = {v1, . . . vn} that correspond to cities, along with a set of nonnegative edge weights E, where eij corresponds to the distance between city vi and vj . The goal is to find a tour that visits all cities, returning to the starting city, and has minimal total distance. Assume that eii = 0, and that eij = ∞ if there is no edge connecting cites vi and vj . (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: E =     0 10 15 20 5 0 9 10 6 13 0 12 8 8 9 0     What are the time and space complexities of your algorithm? 1
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved