3. Tired of solving the longest common subsequence problem so many times, Gabriel yearns to do...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
3. Tired of solving the longest common subsequence problem so many times, Gabriel yearns to do something different. Now, when given two strings S and T, he wants to find the shortest com- mon supersequence. That is, he wants to find a shortest (maybe not unique!) possible string SCS (S,T) (a shortest common supersequence) such that S and I are both subsequences of SCS(S, T). For example, one such shortest common supersequence of "Turing" and "Church" is "TChurcinhg". Another example is SCS("seven", "evens") = "sevens". (a) Find all SCSS for "Bob" and "Tom". (b) Find an SCS for "Apple" and "Microsoft". (c) Find all SCSs for "Homeowner" and "meow". (d) Given two strings S = 81828m of length m and T = ttt of length n as inputs, help Gabriel devise an algorithm that finds a shortest common supersequence of S and T in O(mn) time. Show that your algorithm indeed terminates in O(mn) time. 3. Tired of solving the longest common subsequence problem so many times, Gabriel yearns to do something different. Now, when given two strings S and T, he wants to find the shortest com- mon supersequence. That is, he wants to find a shortest (maybe not unique!) possible string SCS (S,T) (a shortest common supersequence) such that S and I are both subsequences of SCS(S, T). For example, one such shortest common supersequence of "Turing" and "Church" is "TChurcinhg". Another example is SCS("seven", "evens") = "sevens". (a) Find all SCSS for "Bob" and "Tom". (b) Find an SCS for "Apple" and "Microsoft". (c) Find all SCSs for "Homeowner" and "meow". (d) Given two strings S = 81828m of length m and T = ttt of length n as inputs, help Gabriel devise an algorithm that finds a shortest common supersequence of S and T in O(mn) time. Show that your algorithm indeed terminates in O(mn) time.
Expert Answer:
Answer rating: 100% (QA)
The question youve provided concerns the problem of finding the shortest common supersequence SCS of two given strings The SCS for two strings is the shortest string that has both input strings as sub... View the full answer
Related Book For
Data Structures and Algorithm Analysis in Java
ISBN: 978-0132576277
3rd edition
Authors: Mark A. Weiss
Posted Date:
Students also viewed these programming questions
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
The longest common subsequence problem is as follows: Given two sequences A = a1, a2, . . . , aM, and B = b1, b2, . . . , bN, find the length, k, of the longest sequence C = c1, c2, . . . , ck such...
-
Mazlin Limited purchased a machine on account on April 2, 2015, at an invoice price of $360,000. On April 4, it paid $2,000 for delivery of the machine. A one-year, $4,000 insurance policy on the...
-
Refer to Exercises 3.2, Problem 10. Find the number of days that each mine should be operated in order to fill the order at the least cost. (See the graph of the feasible set in Fig. 18.) In problem...
-
1. Is Jack Elliot culturally sensitive or culturally insensitive? 2. Does he make any cross-cultural errors on his arrival in Japan? If yes, what are they? 3. Review the earlier chapter section...
-
On average, the number density of free electrons in copper is \(8.46 \times 10^{19} \mathrm{~mm}^{-3}\). (a) Calculate what the linear charge density \(\lambda\) for a copper wire \(1.00...
-
(Five Differences, Compute Taxable Income and Deferred Taxes, Draft Income Statement) Wise Company began operations at the beginning of 2011. The following information pertains to this company. 1....
-
16. A signal containing multiple frequencies is shown in figure A. It is passed through 2 different filters and then outputs are shown in figure B & C. M (A) S (B) sha (C) (a) B corresponds to low...
-
The diagram below represents a process where two components are made at stations A1 and A2 (one component is made at A1 and the other at A2). These components are then assembled at station B and...
-
On January 1, 2016, Zebra Corporation issued 1,900 of its 8%, $1,000 bonds at 97.9. Interest is payable semiannually on January 1 and July 1. The bonds mature on January 1, 2026. Zebra paid $57,000...
-
The intercultural business communication process as the interaction of three variables: culture, business, and communication. Identify five sub-variables for each of these three components (culture,...
-
The ingredients needed to create a pork dish is $4.56. Your net production cost is $3.33. You need to mark up the cost of the dish to a 30% profit margin. What does your profit margin total, and what...
-
With relevant examples describe at least five (5) most important causes of externalities.
-
What are the intricate mechanisms underlying the symbiotic relationships between microorganisms and their host organisms, and how do these interactions shape ecological dynamics?
-
Canary owns a zinc mine costing $480,000 on which he has claimed $120,000 in depletion in prior years. At the beginning of the current year, it was estimated that 600,000 tons of zinc remained in the...
-
Bradley Jones, age 23, is considering joining the prestigious MSF Program at IIT's Stuart School of Business in fall of 2023. He is trying to figure out if the program is worth the investment - -- at...
-
If a process has a six-sigma capability, what is the process capability index? a. 1 b. 2 c. 6 d. 12
-
Give an algorithm to decide whether an edge (v, w) in a depth-first spanning forest of a directed graph is a tree, back, cross, or forward edge.
-
An algorithm takes 0.5 ms for input size 100. How long will it take for input size 500 if the running time is the following (assume low-order terms are negligible): a. Linear b. O(N logN) c....
-
The Sieve of Eratosthenes is a method used to compute all primes less than N. We begin by making a table of integers 2 to N. We find the smallest integer, i, that is not crossed out, print i, and...
-
The quaternions are three quantities i, j, and k such that, along with the real number 1, they form the basis of a four-dimensional space over the real numbers. The objects i, j, and k have...
-
In Example 12.1, we introduced the Hong-Ou-Mandel interferometer and presented an analysis of thinking about the photons produced by the laser as classical electromagnetic waves. In this exercise, we...
-
We had established an intriguing relationship between the path integral of the previous chapter and the partition function here through "complexification" of the time coordinate. In this problem, we...
Study smarter with the SolutionInn App