Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Answer all questions and for all questions, show the step using algorithm.

Q1. Running time analysis

(a) Given T(n) = 5T(n/2) + n2. Find out its asymptotic tight bound using the Master Theorem.

(b) Prove the previous asymptotic tight bound using either substitution or induction methods.

Q2. Rod-black tree.

(a) Step-by-step, build a red-black tree with the an ordered input sequence of {20, 5, 11, 10, 29, 5, 21, 4, 15}.

(b) Given the following red-black tree, step-by-step show how to delete the rod node of 21.

1773_Figure.png

Q3. van Embde Boas tree

(a) What is the worst-case run time of the operations on a Van Emde Boas tree? Most time complexity analysis is concerned with the number of elements that are being looked at. How does the time-complexity of a Van Emde Boas tree differ from that norm?

(b) Describe the two functions high(x) and low(x) in the context of a Van Emde Boas tree.

(c) Modify the proto-vEB(16) structure in Figure 20.4 in CLRS textbook to represent the set {2, 3, 4, 5, 7, 13, 14, 15}.

Q4. You are asked to modify the LCS algorithm to identify the heaviest common subsequence (HCS) using a weighted scoring scheme, denoted as matrix M, as shown below.

 

A

B

C

D

A

1

0.5

0

0

B

0.5

2

0

0

C

0

0

1

0.5

D

0

0

0.5

1

Based on this score scheme, A-A match has a score of 1, B-B match has a score of 2, A-B match has a score of 0.5. For example, given that X = {BACBADCDD} and Y = {BC DABCBDD), the subsequences S1x = {BABA} and S1y = {BABB} has a matching scorn of 2 + 1 + 2 + 0.5 = 5.5, and the subsequence S2 = {CDCDD} has a matching score of 1 + 1 + 1 + 1 + 1 = 5. Hence, the shared sequence of S1x and S1y is heavier (with higher scores) than the perfect match subsequence of S2. (In practice, S1a and S1b are often merged as {BABA/B}. Your task is to design an algorithm to identify the heaviest common subsequence by modifying the LCS algorithm in CLRS textbook.

(a) First, illustrate the application of dynamic programming on heaviest common sub-sequence (HCS) using the example of X and Y sequences given above, by following the example of Figure 15.8 in the CLRS textbook.

(b) Design a HCS algorithm by modifying the LCS-LENGTH(X, Y) in Chapter 15 of the CLRS textbook using a weighted scoring matrix M as shown above. The rows and columns in M are symbols of {A. B, C, D}, and the elements of M are scores such that M[A, A] = 1, M[B, B] = 2, M [A, B] = 0.5, M[A, C] = 0, . .

Q5. Knap-sack problem. Illustrate the application of dynamic programming on the following Knapsack problem with the maximum weight 7 pounds. Please note that chargers and their served devices should always be taken together.

Item

Value (dollars)

Weight (pounds)

Cell phone

100

1

Charger for cell phone

30

1

Laptop

300

3

Charger for laptop

70

1

Tent

250

4

Medicine

200

1

Instant food

80

2

Water bottle

10

1

Umbrella

20

1

Flashlight

35

1

Q6. Computational geometry: A generic point representation is P = (X, Y). Given that P0 = (0, 0); P1 = (4, 3); P2 = (1, 0), P3 = (3, 4), calculate the cross product (P0P1)x(P2P3). Are (P2P3)clockwise or counterclockwise to (P0P1) with respect to their cross point? Your explanation should be justified by the cross-product.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92061851

Have any Question?


Related Questions in Computer Engineering

Question 1in what ways can a hash value be secured so as to

Question: 1. In what ways can a hash value be secured so as to provide message authentication? 2. Elaborate on the applications, weaknesses and limitations of the hashing algorithms The response must be typed, single spa ...

Simple coding help needed for java programhere is the

SIMPLE CODING HELP NEEDED FOR JAVA PROGRAM Here is the program description: Write a program that supports the following operations: int add(string login, string time, int priority, int size, int handle): add a new reques ...

Nfs allows the file system on one linux computer to be

NFS allows the file system on one Linux computer to be accessed over a network connection by another Linux system. Discuss the security vulnerabilities of NFS in networked Linux systems, and possible mitigation solutions ...

Question suppose we have 29 bytes of virtual memory and 27

Question : Suppose we have 29 bytes of virtual memory and 27 bytes of physical main memory. Suppose the page size is 23 bytes. (a) How many pages are there in virtual memory? (b) How many page frames are there in main me ...

Tom works for a fruit company and found that the weights of

Tom works for a fruit company and found that the weights of pineapples are normally distributed with mean = 500 grams and standard deviation = 100 grams. a. If he randomly chooses 16 pineapples and measures their weights ...

A standard science experiment is to drop a ball and see how

A standard science experiment is to drop a ball and see how high it bounces. Once the "bounciness" of the ball has been determined, the ratio gives a bounciness index. For example, if a ball dropped from a height of 10 f ...

Service set identifier ssid also known as the wireless

Service Set Identifier (SSID), also known as the wireless network name, identifies the wireless network. An SSID is configured on the wireless AP (on the access point for the infrastructure mode) or on an initial wireles ...

The rooted fibonacci trees tn are defined recursively in

The rooted Fibonacci trees T n are defined recursively in the following way. T 1 and T 2 are both the rooted tree consisting of a single vertex, and for n = 3, 4, ...., the rooted tree T n is constructed from a root with ...

Clientserver model please respond to the followingimagine

"Client/Server Model" Please respond to the following: Imagine that you are a lead developer for social media company and that one of your responsibilities is to help mentor junior developers. The junior developer that y ...

You have 2 tasks to createer-modeling in ms visio simple

You have 2 tasks to createER-Modeling in MS visio. Simple jab for the database expert that would take him 30 min to finish. My requirement not only for the expert to get the task done. I need to do it myself. Then he cor ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As