Construct a pda accepting

Assignment Help Theory of Computation
Reference no: EM131306379

1. Let S->aB|bA,A->aS|bAA|a,B->bS|aBB|b. Derive the string aaabbabbba as left most derivation.

2. Construct a PDA accepting {anb2n; n>=1} by final state.

3. Construct PDA for the grammar
S->aB|bA,A->a|aS|bAA
B->b|bS|aBB
B->b|bS|aBB
Check for the validation of string ab.

4. Give the parse tree construction of 1001 ad +*-xyxy for the given grammars.
1)S->A|B
A->0A|^
B->0B|1B|^
Parse tree for 1001

5. Construct aPDA for the given grammar and check for the validation of abcba and acb.
S->aSa|bSb|c
6. Show that the grammar S->a|Sa|bSS|SSb|SbS is ambiguous

7. Construct a PDA for the given grammar and check for the validation of aa*a0 and (a0+a).
E->I|E+E|E*E|(E),I->a|Ia|0|I0

7 Find a derivation tree of a*b+a*b given that a*b+a*b is in L(G) where g is given by
S->S+S|S*S, S->a/b

8) Show that the grammar S->a/abSb/aAb, A->bS/aAAb is ambiguous . (6marks)

9) Consider the following productions
S->aB|bA
A->aS|bAA|a
B->bS|aBB|b
for the string aaabbabbba find a leftmost derivation.

10) Construct a PDA accepting by empty stack the language {ambncn/m,n>=1}

11)Convert the PDA P=({p,q},{0,1},{x,z0}, δ,q,z0) where:

1. δ(q,1,z0)={(q,xz0)}
2. δ(q,ε,z0)={(q,ε)}
3. δ(q,1,x)={(q,xX)}
4. δ(q,0,x)={(p,x)}
5. δ(q,ε,x)=(q,ε)
6. δ(p,1,x)=(p,ε)
7. δ(p,0,z0¬)=(q,z0)
12) Convert the PDA P=({p,q},{0,1},{x,z0}, δ,q,z0) where:
1. δ[q 0 z0]={(q,x,z0)}
2. δ[q 0 x]={(q,x,x)}
3. δ[q 1 x]={(q,x)}
4. δ[q ε z0]={(q,ε)}
5. δ[p ε x]={(p,ε)}
6. δ[p 1 x]={(p,x,x)}
7. δ[p 1 z0]={(p,ε)}
Soln:
1. δ[q 0 z0]={(q,x,z0)}
At q: [q z0 q]->0[q x q][q z0q]
[q z0 q]->0[p x p][p z0q]
At p: [q z0 p]->0[q x q][q z0 p]
[q z0 p]->0[q x p][p z0 p]
2. δ[q 0 x]={(q,x,x)}
At q: [q x q]->0[q x q][q x q]
[q x q]->0[q x p][p x q]
At p: [q x p]->0[q x q][q x p]
[q x p]->0[q x p][p x p]
3. δ[q 1 x]={(q,x)}
At q:[q x q]->1[q x q]
At p:[q x p]->1[q x p]
4. δ[q ε z0]={(q,ε)}
[q x q]->ε
5. δ[p ε x]={(p,ε)}
[p x p]->ε
6. δ[p 1 x]={(p,x,x)}
At q: [p x q]->1[p x q][q xq]
[p x q]->1[p x p][p xq]
At p: [p x p]->1[p x q][q xp]
[p x p]->1[p x p][p xp]
7. [p 1 z0]={(p,ε)}
[p z0 p]->1

Reference no: EM131306379

Questions Cloud

Draw the budget constraint : PAF 3102 - Economic Analysis of Public Policy Problem Set. Draw the budget constraint if the family is given a TANF grant of $1200 a month and prices and other income are the same as in part A. There is no restriction on how TANF grants may be spen..
What are two possible hedge ratios at end of first period : Consider a two-period, two-state world. Let the current stock price be 45 and the risk-free rate be 5 percent. Each period the stock price can go either up by 10 percent or down by 10 percent. A call option expiring at the end of the second period ha..
Difference between a debit card and a credit card : List and describe some of the banking services offered by financial institutions.- What is the difference between a debit card and a credit card?
After reviewing the types of investments companies : After reviewing the types of investments companies can make in Marketplace, what types of activities can teams do in Marketplace to continue to learn and innovate in ways to create and maintain competitive advantages over other teams?
Construct a pda accepting : Let S->aB|bA,A->aS|bAA|a,B->bS|aBB|b. Derive the string aaabbabbba as left most derivation. Construct a PDA accepting {anb2n; n>=1} by final state.
Decided to save some money at the end of every year : You have decided to save some money at the end of every year for the next three years. Your plan is to save $1,500, $2,500, and $3,500 at the end of each of the next three years, respectively. You will invest these funds into an account that is expec..
What factors should steve consider : Steve just received his first paycheck and wants to open a checking account. There are five banks in his hometown. What factors should Steve consider when choosing a bank?
What is the difference between arbitration and litigation : What is the difference between arbitration and litigation? What steps in the litigation process are missing in arbitration? Discuss the steps that the parties would have to take in order to go to trial.
What is a risk premium and who might take advantage of it : What is a risk-free rate? Give an example of an investment with a risk-free rate. Why is there no risk?- What is a risk premium? Who might take advantage of it?

Reviews

Write a Review

Theory of Computation Questions & Answers

  Create and monitor accountability through performance

create and monitor accountability through performance management measurement at hod level for effectiveness and

  Manipulation and simplification of logic predicates

How is the principle of inclusion and exclusion related to the rules for manipulation and simplification of logic predicates?

  Problem related to lcg

Consider the LCG defined by m = 16, a = 5, c = 3, and Z0 = 7. Compute until Z19 and verify that when i = 16, the exact the same order will show up. Show all results in a table.

  Is the given grammar left or right recursive

Is the given grammar left or right recursive - describe these in detail because I am having a hard time trying to figure this all out.

  Define predicate combinations

Define predicate combinations which find the number of combinations K of up to N numbers. Validate your predicate with the subsequent test:

  Communication process using a particular computer device

The enhancement of communication process using a particular computer device or software application by the people.

  Rahman s a 2006 lsquoattitudes of malaysian teachers toward

rahman s. a. 2006 lsquoattitudes of malaysian teachers toward a performance-appraisal system journal of applied social

  Write an essay on telstra corporation ltd of 3000 words

write an essay on telstra corporation ltd of 3000 words. following is how to write the introduction of the essay. each

  Construct a truth table for each of the given arguments

Construct a truth table for each of the following arguments. Determine whether each argument is valid or invalid. Justify your answer with a complete or partial truth table.

  Show the memory snapshot of the each statement

Give a memory snapshot each statement is executed. Assuming that x is equal to 4 and that y is equal to 6 before the statement is executed. Also, assume that all the variables are integers.

  Compiler design problem

This is done by changing the CFG that the language uses and what changes would have to be made to ac's CFG

  Company a which has been acquired by company b company a

company a which has been acquired by company b. company a was founded in 1956 in mobile alabama. the average age of its

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