CS4040/5040 Homework # 4 solution

$29.99

Original Work ?

Download Details:

  • Name: home4-xfpp7x.zip
  • Type: zip
  • Size: 3.51 MB

Category: Tags: , You will Instantly receive a download link upon Payment||Click Original Work Button for Custom work

Description

5/5 - (4 votes)

1. (10 pts.) Give the optimal parenthization of the matrices, and the number of multiplications required for the optimal solution of the following chain matrix multiplication
problem. Show all work, including any tables required.
Matrix dimensions are: A[10×2], B[2×8], C[8×12], D[12×100], E[100×4], F[4×44].
2. (10 pts.) What is the solution to the problem (with the same matrices as the previous
question) if instead of trying to minimize the number of multiplications, we instead
want to find the maximum amount of multiplications? Give the optimal parenthization
of the matrices (for this new version of the problem), and the number of multiplications
required for the optimal solution of this chain matrix multiplication problem. Show
all work, including any tables required.
3. (10 pts.) What modification to QuickSort will guarantee that it runs in O(n lg n) time
in the worst case?
4. (10 pts.) Compute the Longest Common Subsequence of the following strings
representing DNA strands. Show all work, including any tables required.
String A = “CGCCGATGTCCGATCC”, B = “GGCCCTTTAAGTCAGCA”
5. (10 pts.) Activity Selection. Give the solution to the following activity selection problem. Show all work.
Activity # si fi
1 2 3
2 1 2.5
3 8 10
4 1 5
5 7 8
6 2 5
7 4 5
8 8 11
9 2 6
10 5 9
11 3 4
6. (10 pts.) CS5040 only Suppose you have a list of n unsorted distinct numbers and
you want to find which ones are closest to the median. In particular, you want to find
the m numbers closest to the median in this list of numbers. Give an algorithm to find
these m numbers that runs in time O(n).
1

🚀 Custom Work, Just for You! 🚀

Can’t find the tutorial you need? No worries! We create custom, original work at affordable prices! We specialize in Computer Science, Software, Mechanical, and Electrical Engineering, as well as Health Sciences, Statistics, Discrete Math, Social Sciences, Law, and English.

✍️ Custom/Original Work Essays cost as low as $10 per page.
💻 Programming Custom Work starts from $50.

🔥 Get top-quality help now! 🔥

Get Your Custom Work