Given two strings X and Y, where X consists of the sequence of symbols X1, X2, Xm and Y consists of the sequence of symbols y₁,Y2, ***,yn. Consider the sets {1, 2, ..., m} and {1, 2, ..., n} as representing the different positions in the strings X and Y, and consider a matching of these sets, where a matching is a set of ordered pairs with the property that each item occurs in at most one pair. A matching M of these two sets is an alignment if there are no "crossing" pairs: if (i,j). (i*,j') = Mandi 0 that defines a gap penalty. For each position of X or Y that is not matched in M (it is a gap), we incur a cost of 8. Second, for each pair of letters p and q (p + q) in our alphabet, there is a mismatch cost of app for lining up p with q. Thus, for each (i,j) = M, we pay the appropriate mismatch cost axiy for lining up x; with y;. The cost of M is the sum of its gap and mismatch costs, and the problem seeks an alignment of minimum cost. Define the minimum alignment cost OPT(i,j) (0 ≤ i ≤ m and 0 ≤ j ≤n) in a recursive way. Design a dynamic programming algorithm in pseudocode to identify the optimal sequence alignment. Write down the two-dimensional table of optimal values with tracking arrows for the example problem instance of aligning the words "mean" and "name". Assume that 6 = 2; matching a vowel with a different vowel, or a consonant with a different consonant, costs 1; matching a vowel and a consonant with each other costs 3. Analyze its time complexity and space complexity.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Given two strings X and Y, where X consists of the sequence of symbols X1, X2, Xm and Y
consists of the sequence of symbols y₁,Y2, ***,yn. Consider the sets {1, 2, ..., m} and {1, 2, ..., n}
as representing the different positions in the strings X and Y, and consider a matching of these
sets, where a matching is a set of ordered pairs with the property that each item occurs in at most
one pair. A matching M of these two sets is an alignment if there are no "crossing" pairs: if (i,j).
(i*,j') = Mandi <i, thenj <j. For example,
"stop-" and "-tops" have an alignment {(2, 1), (3, 2), (4, 3)}. Suppose Mis a given alignment
between X and Y. First, there is a parameter >0 that defines a gap penalty. For each position of
X or Y that is not matched in M (it is a gap), we incur a cost of 8. Second, for each pair of letters
p and q (p + q) in our alphabet, there is a mismatch cost of app for lining up p with q. Thus, for
each (i,j) = M, we pay the appropriate mismatch cost axiy for lining up x; with y;. The cost of M
is the sum of its gap and mismatch costs, and the problem seeks an alignment of minimum cost.
Define the minimum alignment cost OPT(i,j) (0 ≤ i ≤ m and 0 ≤ j ≤n) in a recursive way.
Design a dynamic programming algorithm in pseudocode to identify the optimal sequence
alignment.
Write down the two-dimensional table of optimal values with tracking arrows for the example
problem instance of aligning the words "mean" and "name". Assume that 6 = 2; matching a
vowel with a different vowel, or a consonant with a different consonant, costs 1; matching a
vowel and a consonant with each other costs 3.
Analyze its time complexity and space complexity.
Transcribed Image Text:Given two strings X and Y, where X consists of the sequence of symbols X1, X2, Xm and Y consists of the sequence of symbols y₁,Y2, ***,yn. Consider the sets {1, 2, ..., m} and {1, 2, ..., n} as representing the different positions in the strings X and Y, and consider a matching of these sets, where a matching is a set of ordered pairs with the property that each item occurs in at most one pair. A matching M of these two sets is an alignment if there are no "crossing" pairs: if (i,j). (i*,j') = Mandi <i, thenj <j. For example, "stop-" and "-tops" have an alignment {(2, 1), (3, 2), (4, 3)}. Suppose Mis a given alignment between X and Y. First, there is a parameter >0 that defines a gap penalty. For each position of X or Y that is not matched in M (it is a gap), we incur a cost of 8. Second, for each pair of letters p and q (p + q) in our alphabet, there is a mismatch cost of app for lining up p with q. Thus, for each (i,j) = M, we pay the appropriate mismatch cost axiy for lining up x; with y;. The cost of M is the sum of its gap and mismatch costs, and the problem seeks an alignment of minimum cost. Define the minimum alignment cost OPT(i,j) (0 ≤ i ≤ m and 0 ≤ j ≤n) in a recursive way. Design a dynamic programming algorithm in pseudocode to identify the optimal sequence alignment. Write down the two-dimensional table of optimal values with tracking arrows for the example problem instance of aligning the words "mean" and "name". Assume that 6 = 2; matching a vowel with a different vowel, or a consonant with a different consonant, costs 1; matching a vowel and a consonant with each other costs 3. Analyze its time complexity and space complexity.
AI-Generated Solution
AI-generated content may present inaccurate or offensive content that does not represent bartleby’s views.
steps

Unlock instant AI solutions

Tap the button
to generate a solution

Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education