Skip to content

BCS503 · 2022 · CSE · Semester 5

Theory of Computation

Back to subjects

Automated PYQ shortlist · Academic review pending. Questions are displayed from OCR. Some formulas and figures may need review.

Review status & sources

Similar question wording is grouped and ranked by the number of distinct exam sessions. Groups with the same count are ordered by their extracted text. Some subjects have only one session. Paper references show the PDF page and extracted question number when available.

Module 1

Design a DFA for the Language : L = {w € {0, 1}* : w is a string divisible by 5}.

OCR transcription · Wording, symbols, or figures may be incomplete.

2 exam sessions
  • June-July-2025 · PDF page 1 · Q1
  • Dec-2024-Jan-2025 · PDF page 1 · Q2b

Convert the following € - NFA to DFA € e Fig.Q.2(b) and define e - NFA

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • June-July-2025 · PDF page 1 · Q2b

Define Deterministic Finite Automata (DFA) and the language accepted by it.

1 exam session
  • June-July-2025 · PDF page 1 · Q1b
Show 2 Backup Questions

Define NFA. Obtain an & - NFA which accepts strings consisting of 0 or more a's, followed by 0 or more b's followed by 0 or more C's. Also convert it to DFA.

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • Dec-2024-Jan-2025 · PDF page 1 · Q2c

Define the following with an example: Alphabet Power of an alphabet ¡i) String IV) String concatenation v) Language

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • June-July-2025 · PDF page 1 · Q1

Module 2

Construct & - NFA for the following Regular expression : (i) (0+1)01(1+0) ii) 1(0 + 1)*0 iii) (0 + 1)"011"

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • Dec-2024-Jan-2025 · PDF page 2 · Q4a

Define Regular expression. Write the regular expression for the following languages : i) Strings of a's and b's starting with a and ending with b. ii) Set of strings that consists of alternating O's and I's. ¡ii) L = {a" bm , (n + m) is even}. iv) L = {w :/ w / mod 3 =0 , where w e{a, b}*}.

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • Dec-2024-Jan-2025 · PDF page 1 · Q3a

Define regular expression. Write the regular expression for the following languages: Representing for strings of a and b's having odd length. To accept 10 as substring over an alphabet 2 = {0, 1}

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • June-July-2025 · PDF page 1 · Q3a
Show 2 Backup Questions

i) Obtain NFA (Non deterministic finite automata) for the regular expression (a + b)" abb. ¡i) Obtain NFA for the regular expression (a" + ab) (a + b)"

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • June-July-2025 · PDF page 2 · Q4b

Minimize the following finite automata using Table filling algorithm : a B A B D B * D D D F E G G HIG

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • Dec-2024-Jan-2025 · PDF page 2 · Q3b

Module 3

Define context free grammar. Write the CFG for the following languages: nz0 i) L={aibic™:m>=0 ї¡) L ={we{a,b} : n,(w) = n,(w)}

OCR transcription · Wording, symbols, or figures may be incomplete.

2 exam sessions
  • June-July-2025 · PDF page 2 · Q5a
  • Dec-2024-Jan-2025 · PDF page 2 · Q5a

Consider the grammar G with productions. S→AbB/A/B A→aA/& ; B→aB/bB/d. Obtain LMD, RMD and parse tree for the string aaabab. Is the given grammar ambiguous?

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • Dec-2024-Jan-2025 · PDF page 2 · Q5b

Convert the following CFG to PDA: i) E→E+ E E* Ejid її) E→IE*E (E) I → id

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • June-July-2025 · PDF page 2 · Q6b
Show 2 Backup Questions

Convert the following CFG's to PDA : S→ aA ; A→aABC/bB/a ; B→b ; C→c.

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • Dec-2024-Jan-2025 · PDF page 3 · Q6c

Define PDA (Push Down Automata). Design a PDA to accept the following language: L = {a"b" : n ≥ 0}. Draw the transition diagram and show that instantaneous description for the string aaabbb.

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • June-July-2025 · PDF page 2 · Q6

Module 4

Consider the following CFG : S → ABC / BaB А -→ aA / BaC / aaa B -→ bBb /a / D C -→ CA/AC D→& i) What are useless symbols? ii) Eliminate & - productions, Unit productions and useless symbols from the grammar.

OCR transcription · Wording, symbols, or figures may be incomplete.

2 exam sessions
  • Dec-2024-Jan-2025 · PDF page 3 · Q8b
  • June-July-2025 · PDF page 3 · Q8a

Prove that the family of context free languages is closed under union and concatenation.

2 exam sessions
  • Dec-2024-Jan-2025 · PDF page 3 · Q7c
  • June-July-2025 · PDF page 3 · Q8b

Convert the following grammar to CNF (Chomsky Normal Form) S → ASB/ € A → aAS/a B → SbS A bb and define CNF

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • June-July-2025 · PDF page 2 · Q7a
Show 2 Backup Questions

Define CNF. Convert the following CFG to CNF E→E+T/T T-→T*F/F F→(E)/1 I → la / Ib / a / b.

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • Dec-2024-Jan-2025 · PDF page 3 · Q7

Define Greibach Normal Form. Convert the following CFG to GNF. S → AB ; A → aA/bB /b ; B-→ b.

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • Dec-2024-Jan-2025 · PDF page 3 · Q8

Module 5

Define a turing machine and explain with neat diagram. the working of a basic turing machine.

2 exam sessions
  • Dec-2024-Jan-2025 · PDF page 3 · Q9
  • June-July-2025 · PDF page 3 · Q9a

Design a Turing machine to accept L = {a"b"c"|n ≥ 0}. Draw the transition diagram. Show the moves mode for string aabbcc.

OCR transcription · Wording, symbols, or figures may be incomplete.

2 exam sessions
  • June-July-2025 · PDF page 3 · Q9b
  • Dec-2024-Jan-2025 · PDF page 3 · Q9b

Design a Turing machine to accept palindrome over {a, b} and draw the transition diagram. Write a short notes on : i) Recursively Enumerable Language. ii) Multitape Turing Machine.

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • Dec-2024-Jan-2025 · PDF page 3 · Q10a
Show 2 Backup Questions

Explain language acceptability and design of Turing Machines (Steps).

1 exam session
  • June-July-2025 · PDF page 3 · Q10a

Explain the following: Programming techniques for turing machines Undecidability problem.

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • June-July-2025 · PDF page 3 · Q10b