In the longest palindrom substring (or longest sysmmetric factor), the goal is to find the maximum-length...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
In the longest palindrom substring (or longest sysmmetric factor), the goal is to find the maximum-length contiguous substring in a given text which is also a palindrome. A palin- dromic word refers to a ward or a phrase that reads the same in both directions, i.e, when it is read in forward and reverse directions. Examples of palindromes are strings "civic", "racecar", and "aibohphobia". Consider the following DNA sequence: "AGCTTTTCCCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGGTTCTGAACTGGTT ACCTGCCGTGAGTAAATTAAAATATTATTGACTTAGGTCACTAAATACTTTAACCAATATAGGCATAGCGCAGACAGATAAAAA" • Explain how to use a code for LCS to find the longest palindrome of any sequence. • Provide the code that implements your solution. This code should use your previous LCS code as a function. If we consider the above DNA sequence as a text sequence, report the output of your palindrome code applied on this sequence (provide both the palindrome substring and its length). In the longest palindrom substring (or longest sysmmetric factor), the goal is to find the maximum-length contiguous substring in a given text which is also a palindrome. A palin- dromic word refers to a ward or a phrase that reads the same in both directions, i.e, when it is read in forward and reverse directions. Examples of palindromes are strings "civic", "racecar", and "aibohphobia". Consider the following DNA sequence: "AGCTTTTCCCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGGTTCTGAACTGGTT ACCTGCCGTGAGTAAATTAAAATATTATTGACTTAGGTCACTAAATACTTTAACCAATATAGGCATAGCGCAGACAGATAAAAA" • Explain how to use a code for LCS to find the longest palindrome of any sequence. • Provide the code that implements your solution. This code should use your previous LCS code as a function. If we consider the above DNA sequence as a text sequence, report the output of your palindrome code applied on this sequence (provide both the palindrome substring and its length).
Expert Answer:
Answer rating: 100% (QA)
To find the longest palindrome substring of a given sequence you can adapt the Longest Common Subseq... View the full answer
Related Book For
Algorithm Design And Applications
ISBN: 9781118335918
1st Edition
Authors: Michael T. Goodrich, Roberto Tamassia
Posted Date:
Students also viewed these algorithms questions
-
Consider the following data for farmer John who sells tomatoes in a perfectly competitive market. Assume the current market price of tomatoes is $8.00 per bushel, and costs change with quantity as...
-
Verify that u (vw)=uvu w = for (a1, b, c), = (a2, b2, C2), and w = (a3, b3, C3). This is the Distributive Law for the dot product.
-
The Millers are thinking of introducing a new product line in their store. For this exercise, assume the following: Total fixed costs for the line are estimated at $15,000. Total number of units...
-
The IASB's main objective is to develop a set of high-quality standards for financial reporting by companies at the international level. Required: Critically examine the possibility of achieving this...
-
The axis of the three-hinge arch ABC is a parabola with vertex at B. Knowing that 14 P = kips and Q = 21 kips, determine (a) The components of the reaction at A, (b) The components of the force...
-
Problem 1: Yashilta Ltd is an aerospace production company which plans to be the first provider of suborbital spaceflights to the paying public. It is in fierce competition with Virginia Galactica...
-
Consider an experiment that selects a cell phone camera and records the recycle time of a flash (the time taken to ready the camera for another flash). The possible values for this time depend on the...
-
Classification of variable and fixed costs Classify each of the following as a variable or fixed cost with respect to a unit of product that is sold: a. Commissions paid to sales personnel. b....
-
The Polaris Company uses a job-order costing system. The following transactions occurred in October: a. Raw materials purchased on account, $210,000. b. Raw materials used in production, $190,000...
-
Constructing a distribution of demand during reorder lead time is complicated if the lead time itself is variable. Consider the following distribution for a reorder point inventory system. a. What is...
-
Define two vector functions r(t) = 10 sin(t)i + 5 cos(t)j + 14tk (t) = 5 sin(t)i + 10 cos(t)j + (t 14)k Computer (t) (t) = 14t - 146 X
-
We determined that the actual number of visits in the selection sort algorithm is: T(n) = 1n + 3n-3 We characterized this method as having O(n) growth. Compute the actual ratios T(2,000)/T(1,000)...
-
Produce an infinite stream that contains the factorials 1!, 2!, 3!, and so on. Hint: First produce a stream containing arrays [1, 1!], [2, 2!], [3, 3!], and so on. Use BigInteger values for the...
-
Reimplement Exercise E14.11 so that you dont generate new arrays with the subsequences, but instead collect the starting index values. Then implement the generalized merge method so that it receives...
-
Prove that a heap of height h contains at least 2 h1 elements but less than 2 h ele ments.
-
Write a method: public static String toString (Stream stream, int n) list of its first n elements. that turns a Stream into a comma-separated
-
Prove the dissociation PH of sodium phosphate.
-
From 1970 to 1990, Sri Lanka's population grew by approximately 2.2 million persons every five years. The population in 1970 was 12.2 million people.What is the best formula for P, Sri Lanka's...
-
Describe how to compute shiftHash(h(X[i..i+m1]), X, i) for the hash function, h(X[i..i + m 1]) = X[i] + + X[i + m 1], where each character is viewed as an integer in the range [0, c 1], with c...
-
Suppose you are given a connected weighted undirected graph, G, with n vertices and m edges, such that the weight of each edge in G is an integer in the interval [1, c], for a fixed constant c > 0....
-
The problem of accurately summing a set S of n floating-point numbers, S = {x 1 , x 2 ,...,x n }, on a real-world computer is more challenging than might first appear. For example, using the standard...
-
What are the types of interpersonal communication?
-
How does one choose between communication methods and handle barriers to effective communication?
-
What are the various forms of virtual communication used in modern organizations?
Study smarter with the SolutionInn App