Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In JFLAP, the PDA will need to be able to handle input strings of length up to about 80 symbols using at most 4GB of

image text in transcribed

In JFLAP, the PDA will need to be able to handle input strings of length up to about 80 symbols using at most 4GB of memory.

Construct a PDA that accepts {a=ba,b in {x,y} such that a=b and ai=bi for some i,1imin(a,b)} For your PDA to work correctly it will need to be non-deterministic. You can assume that you will always be given a valid string - that is, the input will always contain one \# and a and b will be strings over {x,y}. My PDA has 31 states and and is broken into two major sections, one for a=b and one for a=b. For the case where we assume that a=b, you need to find a symbol that matches at the same index of a and b(ai=bi for some i) and a symbol that does not match at the same index of a and b(aj=bj for some j). One way that this can be accomplished is by finding an index i such that ai=bi and ai+1=bi+1 or ai+1=bi+1 and ai=bi. As in programming assignment 3 , you can store the index in the stack and the values of ai and ai+1 in the state. For the case where we assume that a=b, you need to find an index i where ai=bi. Since the lengths are different, we get that a=b without finding an index j in which aj=bj. For this case, you can simply check that a1=b1. If a1=b1, then the other portion of the code (where we assume that a=b ) will accept the string

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

Graph Databases In Action

Authors: Dave Bechberger, Josh Perryman

1st Edition

1617296376, 978-1617296376

Students also viewed these Databases questions

Question

9. Explain the relationship between identity and communication.

Answered: 1 week ago

Question

a. How do you think these stereotypes developed?

Answered: 1 week ago

Question

a. How many different groups were represented?

Answered: 1 week ago