asg13 - Problem 3: Matrix Multiplication The product of two...

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

View Full Document Right Arrow Icon
COP 3530 Assignment 13 Due: 9 th Dec 2009 Problem 1 Merge Sort & Quick Sort Start with the array [21, 25, 49, 25, 93, 62, 72, 8, 37, 16, 54], 1) Draw a figure similar to Figure 19.9 on page 762 that shows the steps involved in a merge sort. 2) Draw the process of quick sort. Use the first element of the array segment as pivot. Specify each step clearly. Problem 2 Minimum-cost spanning tree Consider the undirected graph G below. (a) Using Kruskal's method, construct a minimum-cost spanning tree. Draw the spanning tree that is constructed and also give the steps (draw figures and state the decision made at each step) used to arrive at this tree. (b) Do part (a) using Prim's method instead of Kruskal's method. Choose vertex 1 as your starting vertex.
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Problem 3: Matrix Multiplication The product of two n x n matrices X and Y is a third n x n matrix Z with (i,j) th entry of Z given as This can be graphically depicted as multiplying a row of X with a column of Y as follows: 1. Devise a divide-and-conquer algorithm for solving this problem. Explain your solution clearly in words. 2. Write the pseudo-code for the solution you have proposed. 3. Derive the time complexity of your solution. Show each step clearly. Note that the simple method described above takes O(n 3 ). [Hint: Consider n/2 x n/2 sub-matrices of matrices X and Y. There are four such sub-matrices in each X and Y. Relate them to the corresponding sub-matrices of Z]...
View Full Document

This note was uploaded on 01/15/2010 for the course COP 3530 taught by Professor Davis during the Fall '08 term at University of Florida.

Page1 / 2

asg13 - Problem 3: Matrix Multiplication The product of two...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online