Suppose we are given a DFA D = (Q,S,d,Q0,F), and we are asked to design an NFA N such that it…

Suppose we are given a DFA D = (Q,S,d,Q0,F), and we are asked to design an NFA N such that it recognizes the middle-third of every string recognized by D. More formally, we want the language of the NFA N, L (N), to be L (N) = {y : ?x, y, z ? S * : len(x) = len(y) = len(z)? x yz ? L (D)} Of course, for every string in L (D) whose length is not divisible by 3, there will be no corresponding “middle-third” string contributed to N. Build the NFA using the mk_nfa call provided within Def_NFA, and then produce the minimized DFA using Jove’s suite of functions. Hint: The idea is to imagine keeping a

»Suppose we are given a DFA D = (Q,S,d,Q0,F), and we are asked to design an NFA N such that it recognizes the middle-third of every string recognized by D. More formally, we want the language of the NFA N, L (N), to be L (N) = {y : ?x, y, z ? S * : len(x) = len(y) = len(z)? x yz ? L (D)} Of course, for every string in L (D) whose length is not divisible by 3, there will be no corresponding “middle-third” string contributed to N. Build the NFA using the mk_nfa call provided within Def_NFA, and then produce the minimized DFA using Jove’s suite of functions. Hint: The idea is to imagine keeping a nondeterministically chosen milepost a third of the way and another nondeterministically chosen milepost two-thirds of the way. Model the NFA state as Q 5 (the Q being the set of states of the DFA), i.e., Q ×Q ×Q ×Q ×Q. Let the initial state be (q0, q1, q1, q2, q2). It is as if we placed one mile-post token at some state q1, another at q2, and let a token from q0 seek the one at q1, let another token at q1 seek q2, and a final token at q2 seek qf , a state in F. We move three tokens with “equal velocities,” and if/when they manage to hit a “magical configuration,” we have found our middle-third string. More specifically, the idea is then to consider the following types of state transitions (notice that the second and fourth components of the state tuple stay put, serving as fixed mileposts): (q0, q1, q1, q2, q2) ? (q01, q1, q12, q2, q21) ? (q02, q1, q12, q2, q22) ? (q03, q1, q13, q2, q23) ? … (q1, q1, q2, q2, qf ) In this scenario, the last state is our “magical configuration.” Putting these ideas to work, we write down the following components of our NFA: Q N = Q 5 S N = S Q N 0 = {(q0, q1, q1, q2, q2) : q1, q2 ? Q} (i.e., start the NFA from the set of these initial states). F N = {(q1, q1, q2, q2, qf ) : qf ? F}. d N ((qa, q1, qb, q2, qc), y) = {(d(qa, c1), q1,d(qb, y), q2,d(qc, c2)) : c1, c2 ? S} One can see how only the middle token “listens to y”; the other two tokens chaotically wander. They seek to find the “magical configuration” in all possible ways. Try animating this on a piece of paper using colored beads in place of tokens.

»

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more