MT4512 Automata, Langugages and Complexity Class Test​

MT4512 Automata, Langugages and Complexity Class Test

Let G1be the context free grammar (S, {01}, S → 0|S1 | 0 | 1, S).

(a) For each of the following two words, either give a derivation or prove that it is not in L(G1): 021, 10. [2 marks]

(b) Describe L(G1) and fully justify your answer. [3 marks]

(c) Construct a PDA s.t. L(P) = L(G1). [2 marks]

 3.

Let L1= {(ab)ncnan≥ 0}. Prove that L1 is not context free. [3 marks]

 Let L2 be the language{0a1b#0a+a, b ∈Z0} 

over the alphabet {01#}. Give an implementation-level description of a Turing machine to recognise L2. [4 marks]

 

5.  

Let M1and Mbe Turing machines, and let L3L(M1) and L4 = L(M2).

(a) Prove that L3 ∪ L4 is Turing recognisable. [2 marks]

(b) If both M1 and M2 are deciders, is L3 ∩ L4 decidable? Justify your answer. [2 marks]

发表评论

电子邮件地址不会被公开。 必填项已用*标注