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

  Build a graphic map for your project

You can use any of the techniques mentioned above and use any software application that you like. Don't do it in haste: take your time to analyze, improve, and modify it. Post the answers on the seventh day to your folder.

  Compare and contrast mealy and moore machines

What properties of formal languages would you use (and how) to formally prove that there is no NFA that can accept the language L(M). Explain briefly and show formally, by resorting to problem reduction, that the problem, of deciding whether a Tur..

  Devise a turing machine with input given in unary notation

Devise a Turing machine with input given in unary notation (i.e., a string of n 1's denotes the integer n, and numbers are delimited by 0's) such that the machine produces the following output:

  Rice-s theorem for enumerable or non-re

We know by rice's theorem that none of the following problems are decidable. However,are they recursively enumerable,or non-RE? IS L(M) infinite?

  Prove the problem by contradiction

Let n > 1 be an integer. Prove by contradiction that if n is a perfect square, and then n + 3 cannot be a perfect square.

  Scrum vs plan-based software development strategies

Develop a visual rendering of each approach using Microsoft Visio or its open source alternative, Dia. Note: The graphically depicted solution is not included in the required page length.

  Explain informally the working of the machine m

Explain informally, the working of the machine M. Give the language L(M ) in set notation. Provide a grammar having 12 or less rules that accepts the same language as M. What type of grammar is it

  1-is situational leadership model a useful model and how

1-is situational leadership model a useful model and how can we apply this model effectively?2-how is the

  Normal 0 false false false en-us x-none

normal 0 false false false en-us x-none x-none

  Argue that the problem is np complete

Argue that the following prob is NP Complete. Given list of positive integers, u1,u2,...un (in binary representation) and asked if there is partition of this set into 3 subsets, each of which has same sum.

  Write the predicate logic

Write the predicate singleChild(Name) which finds the name of single children - For this problem single children means no other child has the same father and mother.

  Taska research strategy is a plan of action that gives

taska research strategy is a plan of action that gives direction to your efforts enabling you to conduct your research

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