BE Computer Engineering (Pokhara University) Theory of Computation (PU, CMP 264) Question Paper 2079
This is the official BE Computer Engineering (Pokhara University) Theory of Computation (PU, CMP 264) question paper for 2079, as set in the regular annual examination. It carries 100 full marks and a time allowance of 180 minutes, across 12 questions. On Kekkei you can attempt this Theory of Computation (PU, CMP 264) past paper online with a timer, get instant AI feedback and step-by-step solutions, and track the topics where you lose marks — completely free. Whether you are revising for your BE Computer Engineering (Pokhara University) Theory of Computation (PU, CMP 264) exam or solving previous years' question papers, this 2079 paper is a great way to practise under real exam conditions.
Section A: Long Answer Questions
Attempt all / any as specified.
(a) Distinguish between a Deterministic Finite Automaton (DFA) and a Non-deterministic Finite Automaton (NFA) with respect to their transition functions and computational power. (4)
(b) Consider the NFA over the alphabet with start state , accepting state , and the following transitions: , , . Convert into an equivalent DFA using the subset construction method, showing the resulting state table and the corresponding state diagram. (8)
(a) Define a Context-Free Grammar (CFG) formally as a 4-tuple. Show that the grammar with productions is ambiguous by giving two distinct parse trees for the string . (6)
(b) Construct a Pushdown Automaton (PDA) that accepts the language by final state. Clearly specify the transition function and trace the acceptance of the string . (6)
(a) Design a Turing Machine that accepts the language . Give the transition table and explain the working of your machine on the input . (8)
(b) State the Halting Problem and prove that it is undecidable. (4)
(a) State the rules for constructing regular expressions and write a regular expression over for the language of all strings that contain at least two consecutive 's and end with a . (5)
(b) State the Pumping Lemma for regular languages and use it to prove that the language is not regular. (7)
Section B: Short Answer Questions
Attempt all / any as specified.
Design a DFA over the alphabet that accepts all strings in which the number represented by the binary string is divisible by (read most significant bit first). Draw the state diagram and briefly justify each state.
Convert the regular expression into an equivalent NFA with epsilon-transitions using Thompson's construction. Show each step of the construction.
Convert the following context-free grammar into Chomsky Normal Form (CNF):
Differentiate between deterministic and non-deterministic pushdown automata. Construct a PDA equivalent to the grammar and explain why this language cannot be accepted by any finite automaton.
(a) Explain the formal definition of a standard (single-tape) Turing Machine as a 7-tuple. (3)
(b) Briefly describe a multi-tape Turing Machine and state whether it is more powerful than a single-tape Turing Machine, justifying your answer. (3)
Differentiate between recursive (decidable) and recursively enumerable languages with the help of suitable examples. Explain the relationship between the two classes using a closure-under-complement argument.
(a) Define the complexity classes and and explain what is meant by an -complete problem. (4)
(b) State the significance of the versus question and give one example of a well-known -complete problem. (3)
Using the principle of mathematical induction, prove that for every integer , the number of distinct strings of length over an alphabet with is exactly . Clearly state the basis and the inductive step.