You are on page 1of 1

National University of Computer and Emerging Sciences, Lahore Campus

Course: Theory of Automata Course Code: CS-3005


Program: BS (Computer Science) Semester: Fall 2023
Duration: 10 Minutes Total Marks: 10
Paper Date: 24-Oct-2023 Weight NA
Section: BCS-5J Page(s): 1
Exam: QUIZ 2 Roll No. Solution

[5+5] Marks

Give a PDA for the following language:

𝐿𝐿 = {𝑤𝑤 ∈ {𝑎𝑎, 𝑏𝑏}∗ | 𝑤𝑤 = 𝑎𝑎2𝑛𝑛 𝑏𝑏 𝑛𝑛 }

Give a CFG for the following language:

𝐿𝐿 = {𝑤𝑤 ∈ {𝑎𝑎, 𝑏𝑏}∗ | 𝑛𝑛𝑎𝑎 (𝑤𝑤) = 𝑛𝑛𝑏𝑏 (𝑤𝑤) + 1 }

The start symbol is A.

FAST School of Computing Page 1

You might also like