Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(1) Draw the Matching-Automaton for the string ano. (2) Run this automaton over the string banananona by giving the sequence of states that the automaton

(1) Draw the Matching-Automaton for the string ano".

(2) Run this automaton over the string \banananona" by giving the sequence of states that the automaton reaches at each position of the string.

(3) Draw an automaton for an*o", where \*" denotes a wildcard, i.e., it matches any character. Use a transition labeled x for the wildcard character, denoting that variable x equals the read letter. In other transitions you may test x, e.g., the transition \a; x = b", denotes that the current letter is a and the wildcard character was b. | In the worstcase, what is the size of an automaton for a pattern of length m containing w-many wildcards, using an alphabet of size k?

(4) Run the Boyer-Moore and the Horspool algorithms for pattern ano" over string \banananona". How many comparisons of characters are applied in total for each algorithm?

(5) Adapt the KMP algorithm so that it can deal with patterns that contain wildcards. Calculate the worst-case running time of your new algorithm.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Repairing And Querying Databases Under Aggregate Constraints

Authors: Sergio Flesca ,Filippo Furfaro ,Francesco Parisi

2011th Edition

146141640X, 978-1461416401

More Books

Students also viewed these Databases questions