Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

This is the theory of computation. Please explain answer clearly, if you write,

ID: 3606934 • Letter: T

Question

This is the theory of computation. Please explain answer clearly, if you write, please write clearly.

1. Describe CFGs for the following languages (a) {a"bnekd" I n 20 and m # k}

Explanation / Answer

b->the language is not regular, but it does have a (probably nondeterministic) PDA. In this case it is much easier to derive a CFG, which is the following s-> aTbb T-> aTb T-> aTbb T-> ab For the PDA the following strategy should work: For each a that you read push two a's in the stack. When you reach the first b pop two a's. For each following b nondeterministically pop either one a or two a's. If in the last b you manage to pop exactly one a you have an valid string. At the same time you also have to check that your input is a series of a's only, followed by a series of b's only, but that is very easy to integrate with the previous paragraph. I cannot see how you can produce a deterministic PDA to do the job, but that is not necessarily the case. I have not proved it, but I suspect no such DPDA exists, since m does not deterministically depend on n, so using the above to produce a NPDA is probably your best bet.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote