033701 ©
Assignment 2 2024
Detailed Solutions, References & Explanations
Unique number: 365071
Due Date: 27 June 2024
Question 1 [15]
Build a DPDA to show that the language L = {(ba)"a(ab)"? | n > 2} is deterministic context free.
Question 2 [15]
Prove that the language L = {ba"b2"a™" | n > 0} over the alphabet ¥ = {a, b} is non-context free.
Use the pumping lemma with length.
Question 3 [10]
Let Li be the grammar generating (aa)*. Let L2 be the grammar generating (a+b) *ba(atb)*.
First provide the grammars generating Li and L2 respectively. Then apply the applicable theorem of
Chapter 17 to determine LiLo.
Question 4 [10]
Decide whether the grammar given below generates any words.
S— XY
X— SY
Y— SX
X—a
Yoob
Terms of use
By making use of this document you agree to:
e Use this document as a guide for learning, comparison and reference purpose,
e Not to duplicate, reproduce and/or misrepresent the contents of this document as your own work,
e Fully accept the consequences should you plagiarise or misuse this document.
Disclaimer
Extreme care has been used to create this document, however the contents are provided “as is” without
any representations or warranties, express or implied. The author assumes no liability as a result of
“reliance and use of the contents of this document. This document is to be used for comparison, research
and reference purposes ONLY. No part of this document may be reproduced, resold or transmitted in any
form or by any means.