Question

Question 2 a) Construct a Pushdown Automaton (PDA) for the language L (M) = {a, b}*...

Question 2
a) Construct a Pushdown Automaton (PDA) for the language L (M) = {a, b}* where, if there
are any a’s must precede all b's and the number of b's must be equal to or twice the number
of a’s.


a) Trace the computations for the strings aabb, bbb, and abb in the PDA obtained in Question 2
 

Homework Answers

Answer #1

The given language can be written as union of three simpler languages

PDA for each of the language is:

Their union can be found by adding another start state s and adding the required transitions.

2 aabb belongs to L2, so from s we non-deterministically transition to PDA for L2 by writing x to stack and then we go to state q1 for L2 and write another x to stack then we move to state q2 by reading b and popping x from stack and writing empty string to stack and then finally we read another b pop x push epsilon and finally move to final state.

bbb is in L1 and abb in L3

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
L = { am b n | m < n - 2}. (a) Define the context...
L = { am b n | m < n - 2}. (a) Define the context free grammar G that generates the formal language L. (b) Define the deterministic pushdown automaton A that recognize the formal language L. (c) Implement the pushdown automaton A in your favorite programming language.
L = { am b n | m < n - 2}. (a) Define the context...
L = { am b n | m < n - 2}. (a) Define the context free grammar G that generates the formal language L. (b) Define the deterministic pushdown automaton A that recognize the formal language L. (c) Implement the pushdown automaton A in your favorite programming language.
The decimal values of the Roman numerals are: M D C L X V I 1000...
The decimal values of the Roman numerals are: M D C L X V I 1000 500 100 50 10 5 1 Remember, a larger numeral preceding a smaller numeral means addition, so LX is 60. A smaller numeral preceding a larger numeral means subtraction, so XL is 40. Assignment: Begin by creating a new project in the IDE of your choice. Your project should contain the following: Write a class romanType. An object of romanType should have the following...
Fiscal Administration 10th Mikesell. Chapter 2 Question 3 a,b,c,d,e,f,g,h,i,j,k,l,m,n Identify the strategy represented in each of...
Fiscal Administration 10th Mikesell. Chapter 2 Question 3 a,b,c,d,e,f,g,h,i,j,k,l,m,n Identify the strategy represented in each of the following arguments taken from budget discussions: a. A bill to increase the number of women eligible for Medicaid-funded prenatal assistance in this state would not only save lives, but also cut state costs for care of low-birth-weight babies and children with disabilities. Studies have shown that every dollar spent on prenatal care reduces long-term health-care expenditures by $3.38.
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT