You are given two sequences of characters (DNA strands) Xn = (x1, x2, ..., xn) and...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
You are given two sequences of characters (DNA strands) Xn = (x1, x2, ..., xn) and Ym (y1, y2, ..., ym) and we want to measure their similarity in the following way: we put the two sequences one below the other and try to match the characters one by one. We can add spaces to the two sequences to increase the number of matching characters but for each space a cost of 1 unit is added. If two characters do not match, then we are charged a cost of 3 units. Our goal is to find the layout of the sequences with the least cost. For example: consider the two sequences X7-(C, T, A, C, C, G, G) and Y6 =(T, A, C, A, T, G). One provision is the following: X, C T A C C Y = GG TACAT G 4 pairs of characters have matched this layout, we have added 3 spaces (with cost 1), and a pair has not matched (cost 3). The total cost of this layout equals 6. a) Write the recurrence equation to find minimum comparison cost C (i, j) of sequences Xi and Yj b) Write pseudocode to find minimum comparison cost C (n, m) using a table. Note that this method should not be recursive. c) What is the running time and the space of the above algorithm? You are given two sequences of characters (DNA strands) Xn = (x1, x2, ..., xn) and Ym (y1, y2, ..., ym) and we want to measure their similarity in the following way: we put the two sequences one below the other and try to match the characters one by one. We can add spaces to the two sequences to increase the number of matching characters but for each space a cost of 1 unit is added. If two characters do not match, then we are charged a cost of 3 units. Our goal is to find the layout of the sequences with the least cost. For example: consider the two sequences X7-(C, T, A, C, C, G, G) and Y6 =(T, A, C, A, T, G). One provision is the following: X, C T A C C Y = GG TACAT G 4 pairs of characters have matched this layout, we have added 3 spaces (with cost 1), and a pair has not matched (cost 3). The total cost of this layout equals 6. a) Write the recurrence equation to find minimum comparison cost C (i, j) of sequences Xi and Yj b) Write pseudocode to find minimum comparison cost C (n, m) using a table. Note that this method should not be recursive. c) What is the running time and the space of the above algorithm?
Expert Answer:
Related Book For
Algorithm Design And Applications
ISBN: 9781118335918
1st Edition
Authors: Michael T. Goodrich, Roberto Tamassia
Posted Date:
Students also viewed these programming questions
-
The new line character is utilized solely as the last person in each message. On association with the server, a client can possibly (I) question the situation with a client by sending the client's...
-
do the following,..... Write program that reads a person's first and last names, separated by a space. Then the program outputs last name, comma, first name. Create program that takes in user input...
-
Given the following set of slope staking notes: C Sta 51+00 50+00 49+00 L CX 33.4 F 9.1 33.6. F 10.3 35.4 C 5.5 0.0 F 3.5 R C 3.2 X C 4.1 30.2 0.0 20.0 Bases Base for cut=48 ft Base for fill= 40 ft s...
-
In the simple quantity theory of money, changes in the money supply affect the price level but not Real GDP. Do you agree or disagree with this statement? Explain your answer.
-
A cantilever beam of length L = 2m supports a load P = 8.0kN (see figure). The beam is made of wood with cross-sectional dimensions 120mm x 200mm. Calculate the shear stresses due to the load at...
-
Find the cross-sectional area \((A)\) and the area moment of inertia (I) of a simply supported steel beam of length \(1 \mathrm{~m}\) for which the first three natural frequencies lie in the range...
-
Russell Container Corporation has a $1,000 par value bond outstanding with 30 years to maturity. The bond carries an annual interest payment of $105 and is currently selling for $880 per bond....
-
A home in a remote location without access to municipal power is expensive to heat during the winter using a gas generator. The home owner is considering whether to set the thermostat to 66 deg F...
-
1. Why Compatibilism is said to be soft determinism. Justify with philosophical reasons. 2. Discuss the five main features of Existentialist philosophy with relevant examples.
-
Tesa Limited has a relatively high level of current assets and this is evident in the amount of inventory it carries and the amount owed by trade debtors A higher inventory level is maintained to...
-
Suppose you deposit the cash flows in a bank account that pays 7 % interest per year. What is the balance in the account at the end of each of the next three years (after your deposit of$190 is made)
-
You are the only water resources engineer at the consulting firm Las Maravillas de la Ingenera based out of Lima, Per. You were assigned to work on el ro Marain, a river in Per that is a tributary to...
-
Today is March1, 2006. Consider the following two (semi-annual coupon) bonds: Bond A Bond B Maturity DateMarch 1, 2012March 1, 2013 Coupon Rate4%12% Current Price$948.71 $1,273.01 (a)What is the YTM...
-
A bank has the following information about its 3-year zero coupon bond portfolio Market Value of Position ($M) 250 Face Value ($M) 325 Yield to Maturity 6.25% Average historical change in daily yield...
-
A company manufactures three products: x1, x2 and x3. Material and labor requirements per unit are: The manager has listed the following objectives in order of priority (e.g. preemptive goals ) Goal...
-
For the given transfer function: Vo(s) / Vi(s) = (s^2C^2R^2 + 1) / (s^2C^2R^2 + 4sCR + 1) Assumiing that 1/(CR) = 120 PI so write the matlab code to find the magnitude plot
-
A construction contract differs from contracts that we generally deal with that focus on an easily defined physical object because the physical object can be examined. How is the object of a...
-
What does the owner contribute to the project and what does the contractor contribute to the project?
-
For what type of project is a line-of-balance schedule particularly suited? Identify specific examples.
Study smarter with the SolutionInn App