Explain how to modify knuth-morris-pratt algorithm

Assignment Help Data Structure & Algorithms
Reference no: EM1371025

Many String matching applications allow the following wild card characters in the pattern

1. The wild card ? represents arbitrary single character. For example the pattern s?r?ng matches the string,sprung and sarong.

2. The wild character * represents an arbitrary string of zero or more characters. For example the pattern te*s*t matches test, tensest.

Both wild characters can occur in single pattern. For example f*a?? matches the string face, football. On the other hand neither wild card can occur in the text.

Describe how to modify the Knuth-Morris-Pratt algorithm to support patterns with these wild cards, and analyze the modified algorithm.Your algorithm should find the first substring in the text that matches the pattern.

Reference no: EM1371025

Questions Cloud

Question about discount rate : Determine what would happen to GDP if a significant number of house spouses who were previously stay home to care for their children began taking jobs and placing their children in day care?
External environment and organization design : External Environment and Organization Design - how does the decision to enter an entirely new market affect the design decisions you as a manager make?
Explain how would constraints on financial resources vary : Explain how would constraints on financial resources vary with private pay, versus Medicare, charity or Medicaid pay as primary revenue streams for your facility.
Find out the magnitude of the electrostatic force : An air molecule is moving at a speed of 438m/s. How many meters would molecule move during 7ms (milliseconds) if it didn't collide with any other molecules.
Explain how to modify knuth-morris-pratt algorithm : Explain how to modify Knuth-Morris-Pratt algorithm to support patterns with these wild cards, and analyze modified algorithm. Your algorithm must find first substring in text which matches the pattern.
Overcome organization impediments to change : Impact of change - Show the impact of change. What methods can be applied to overcome organization impediments to change?
Illustrate what is elasticity of demand at profit maximizing : Illustrate what is elasticity of demand at profit maximizing level of output. Without use of any calculations, determine wherefirm=s total revenue would increase, decrease, or stay same if CRAPCO attempted to increase its price by .2%. Explain how..
Venture capital funding : Determine what are some of the sources companies can turn to for venture capital funding?
Question related to humanities : How did the more dynamic and complex view of the universe affect the literature, art, and composition of the early 20th century?

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Create algorithm to perform any sequence of two operations

Let A[1, n] be an array of real numbers. Create an algorithm to perform any sequence of the following two operations: Add(i, x): add the value x to A[i].

  Algorithm to concatenate string in single binary search tree

Create algorithm which concatenates T1 and T2 into single binary search tree. Worst case running time must be O(h).

  Computing entropy of plaintext message

Compute the entropy of the plaintext message?

  Effective address-addressing mode of instruction is direct

Evaluate the effective address if the addressing mode of the instruction is (a) direct; (b) immediate; (c) relative; (d) register indirect.

  Determine the branching factor

Expalin the search algorithm that results from each of the following special cases. How does it relate to other algorithms we have discussed.

  Encryption feistel cipher and decryption algorithm

If this is psudocode for encryption feistel cipher determine decryption algorithm?Output: ciphertext = (left[16], right[16]) Explain pseudo-code of corresponding decryption algorithm for this cipher.

  Explain good algorithms to solve character pathfinding

You are working on the new computer game. One of implementation problems you are trying to solve is character pathfinding. What algorithms would be good to use and explain why?

  Describe implementation of algorithm on simd computer

Describe an implementation of that algorithm on an SIMD computer where the processors are connected to form a linear array

  Calculate best and worst-case speedup for centralized scheme

Suppose that it doesn't take any time to allot work to process, calculate best- and worst-case speedup for centralized scheme for dynamic mapping with two processes.

  Write recursive version of array-based linear search

Write an algorithm but not code. Write a recursive version of the array-based linear search algorithm. Write a recursive version of the linked-list-based linear search algorithm."""

  Finding page faults for lru replacement algorithms

How many page faults would happen for the given replacement algorithms, assuming one, two, three, and four frames?

  Different applications of data structure

What are the different applications of Data Structure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd