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

Info icon This 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.
Image of page 1

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

View Full Document Right Arrow Icon
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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern