+1 (218) 451-4151
glass
pen
clip
papers
heaphones

1. Give an efficient algorithm for determining if a pattern P is a subsequence (not substring) of…

1. Give an efficient algorithm for determining if a pattern P is a subsequence (not substring) of…

1. Give an efficient algorithm for determining if a pattern P is a subsequence (not substring) of a text T. What is the running time of your algorithm?2. Define the edit distance between two strings X and Y of length n and m, respectively, to be the number of edits that it takes to change X into Y. An edit consists of a character insertion, a character deletion, or a character replacement. For example, the strings “algorithm” and “rhythm” have edit distance 6. Design an O(nm)-time algorithm for computing the edit distance between X and Y.