9. Let be a finite alphabet set, e.g., = {A, B, ... . Z} is the...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
9. Let be a finite alphabet set, e.g., = {A, B, "... . Z} is the set of 26 English alphabet symbols. A string x over is a concatenation of symbols from . E.g., x = NEVERODDOREVEN. We denote by xy the concatenation of x followed by y, and xm a concatenation of x by itself m times. E.g., for the above example, == NEVERODDOREVENNEVERODDOREVEN. x2 We want to solve the following computational question: Given two strings x and y over , are there positive integers m and n such that x = yn? Prove the following: |y| and n = |x|, the lengths of y and x (a) Such positive integers m and n exist iff it is true for m = respectively. From this derive a quadratic-time algorithm for this problem. (b) Suppose y |x|. If the answer to the problem is yes, then y is a prefix as well as a suffix of x. (c) The answer to the problem is yes iff the concatenations in two different orders are the same: xy = yx. Devise a linear-time algorithm from this. (Hint: To prove this condition is necessary, consider d = gcd(|x|, |y|).) 9. Let be a finite alphabet set, e.g., = {A, B, "... . Z} is the set of 26 English alphabet symbols. A string x over is a concatenation of symbols from . E.g., x = NEVERODDOREVEN. We denote by xy the concatenation of x followed by y, and xm a concatenation of x by itself m times. E.g., for the above example, == NEVERODDOREVENNEVERODDOREVEN. x2 We want to solve the following computational question: Given two strings x and y over , are there positive integers m and n such that x = yn? Prove the following: |y| and n = |x|, the lengths of y and x (a) Such positive integers m and n exist iff it is true for m = respectively. From this derive a quadratic-time algorithm for this problem. (b) Suppose y |x|. If the answer to the problem is yes, then y is a prefix as well as a suffix of x. (c) The answer to the problem is yes iff the concatenations in two different orders are the same: xy = yx. Devise a linear-time algorithm from this. (Hint: To prove this condition is necessary, consider d = gcd(|x|, |y|).)
Expert Answer:
Answer rating: 100% (QA)
a To prove that such positive integers m and n exist if and only if m divides x and n divides y we c... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
CANMNMM January of this year. (a) Each item will be held in a record. Describe all the data structures that must refer to these records to implement the required functionality. Describe all the...
-
Portray in words what transforms you would have to make to your execution to some degree (a) to accomplish this and remark on the benefits and detriments of this thought.You are approached to compose...
-
Consider a portfolio of the following derivatives where the counterparty is an OECD bank. Derivative 8-year interest rate swap 6-month option on an equity 1-year swap on precious metals 9-month...
-
What is the total amount Bae will have to repay for his $25,000 student loan if the interest rate is 6 percent over 10 years? What is the total amount he would have to repay if the $25,000 was a...
-
TV advertising agencies face increasing challenges in reaching audience members because viewing TV programs via digital streaming is gaining in popularity. The Harris poll reported on November 13,...
-
Briefly discuss the use of cash registers, prelists, and daily cash summaries in controlling cash receipts.
-
Situation The Tenth National Bank had taken possession of a shopping mall in foreclosure of a mortgage. When the mall was inspected prior to being sold by the bank to a real estate company, it was...
-
Issue(s): Whether a person whose property is taken without compensation may seek redress under the self-executing takings clause of the Fifth Amendment even if the legislature has not affirmatively...
-
Suppose that f is a function with f'(2) = -5. If u is very very close to 0, then f(2 + u) is approximately (a) f(2) 5+ u (b) f(2) + 5u (c) f(2) 5 u (d) f(2) 5u (e) none of these
-
When answering questions three and four, make the following additional assumptions: On December 31, 2022, Fluor revised its estimate of the total construction cost from the original estimate of...
-
Dividing partnership net loss Morgan Graff and Serigo Vargas formed a partnership in which the partnership agreement provided for salary allowances of $50,000 and $44,000, respectively. Determine the...
-
a. Depreciation on the company's equipment for the year is computed to be $13,000. b. The Prepaid Insurance account had a $8,000 debit balance at December 31 before adjusting for the costs of any...
-
A third - party settlement organization ( TPSO ) is required to report any information concerning third - party network transactions of any participating payee only if the gross amount of total...
-
Calculate the perimeter of the triangle formed by the following set of vertices. ((2.2). (-1,-3), (3, 1)) Provide your answer below:
-
Write a report on categories of Immanuel Kant. Explain what is a category or categories in philosophy. Name each of the categories of Immanuel Kant.
-
3M Company reports the following financial statement amounts in its 10-K report: a. Compute the receivables, inventory, and PPE turnover ratios for both 2018 and 2017. (Receivables turnover and...
-
The rotor shown in Fig. 9.44 (a) is balanced temporarily in a balancing machine by adding the masses \(m_{1}=m_{2}=90 \mathrm{~g}\) in the plane \(A\) and \(m_{3}=m_{4}=90 \mathrm{~g}\) in the plane...
-
A turbine rotor is run at the natural frequency of the system. A stroboscope indicates that the maximum displacement of the rotor occurs at an angle \(229^{\circ}\) in the direction of rotation. At...
-
The cylinders of a four-cylinder in-line engine are placed at intervals of \(300 \mathrm{~mm}\) in the axial direction. The cranks have the same length, \(100 \mathrm{~mm}\), and their angular...
Study smarter with the SolutionInn App