0% found this document useful (0 votes)
20 views2 pages

CS 8501 Theory of Computation Exam

The document is a question paper for a Theory of Computation exam. It contains 16 questions across 3 sections testing students' knowledge of formal languages and automata theory. The questions cover topics such as: definitions of deterministic finite automata, regular expressions, context-free grammars, pumping lemma, closure properties of regular languages, elimination of epsilon productions, conversion between grammars and automata models like CFGs, PDAs, and Turing Machines. Students are required to prove statements, construct automata and grammars, and solve decision problems testing their understanding of language and automata classes and their relationships.

Uploaded by

Sasi Balaji
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views2 pages

CS 8501 Theory of Computation Exam

The document is a question paper for a Theory of Computation exam. It contains 16 questions across 3 sections testing students' knowledge of formal languages and automata theory. The questions cover topics such as: definitions of deterministic finite automata, regular expressions, context-free grammars, pumping lemma, closure properties of regular languages, elimination of epsilon productions, conversion between grammars and automata models like CFGs, PDAs, and Turing Machines. Students are required to prove statements, construct automata and grammars, and solve decision problems testing their understanding of language and automata classes and their relationships.

Uploaded by

Sasi Balaji
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

*X10319* Reg. No.

Question Paper Code : X 10319


B.E./[Link]. Degree ExaminationS, november/december 2020
Fifth Semester
Computer Science and Engineering
CS 8501 – THEORY OF COMPUTATION
(Regulations 2017)

Time : Three Hours Maximum : 100 Marks

Answer all questions

Part – A (10×2 = 20 Marks)

1. Define Deterministic Finite Automaton.

2. State any four types of proofs.

3. Write the regular expression for all strings that contain no more than one
occurrence of aa.

4. Write a regular expression for even number of a’s and even number of b’s of a
string w = {a, b}*.

5. Write a Context Free Grammar for the language consisting of equal number of
a’s and b’s.

6. Define Deterministic PDA.

7. What are the two normal forms of CFG ? Write their productions format.

8. Define the language recognized by any Turing Machine.

9. What are recursive languages ?

10. Define the classes P and NP problem. Give example problems for both.

Part – B (5×13 = 65 Marks)

11. a) Prove that for every L recognized by an NFA, there exists an equivalent DFA
accepting the same language L.
(OR)
b) Prove that for every L recognized by an ∈-NFA, there exists an equivalent DFA
accepting the same language L.
X 10319 *X10319*
12. a) Prove that the following languages are not regular using pumping lemma.
i) All unary strings of length prime. (7)
ii) L = {uu|u∈{0, 1}*}. (6)
(OR)
b) State and Prove any two closure properties of Regular Languages.

13. a) How ∈-productions are eliminated from a grammar whose language doesn’t
have empty string ? Remove ∈-productions from the grammar given below.

S → a|aA|B|C A → aB| ∈ B → Aa C → aCD D → ddd


(OR)
b) Write procedure to find PDA to CFG. Give an example for PDA and its CFG.

14. a) How a CFG for L is converted into CNF accepting the same language ? Convert
the following CFG into CFG in CNF.

S→bA|aB A→bAA|aS|a B→aBB|bS|b


(OR)
b) Construct a Turing Machine for proper subtraction, which is defined as m – n
if m > n and 0 otherwise.

15. a) Prove that Universal language is recursively enumerable but not recursive.
(OR)
b) Define PCP and prove that PCP is undecidable.

Part – C (1×15 = 15 Marks)

16. a) Construct a Turing Machine for multiplying two non negative integers using
subroutine.
(OR)
b) How PDA is converted into CFG ? Convert the following PDA into CFG.
P = ({p, q}, {0, 1}, {Z, X}, δ, p, Z, Φ)
δ (p, 1, Z) = {(p, XZ)}, δ (p, ∈, Z) = {(p,∈)} δ (p, 1, X) = {(p, XX)},
δ (q, 1, X) = {(q, ∈)}, δ (p, 0, X) = {(q, X)}, δ (q, 0, Z) = {(p, Z)}

–––––––––––––

Common questions

Powered by AI

The classes P and NP in computational theory represent problems based on their solvability and verification complexities. Class P consists of problems solvable in polynomial time, indicative of manageable complexity. NP represents problems for which a solution can be verified in polynomial time but may not be solvable quickly. The classic example in NP is the traveling salesman problem, which demonstrates the difficulty of finding an optimal solution without brute force, whereas problems like polynomial multiplication fit in P. This division is critical for understanding computational limits and the P vs NP problem, a major unsolved question .

Converting a PDA into a CFG involves creating a set of production rules that account for transitions in the PDA. This is done by defining variables associated with the PDA's states and stack symbols. Each transition in the PDA corresponds to a rule in the CFG that manipulates the stack to mimic the automaton's behavior. For example, a PDA transition q:a,A->r can be translated into a CFG rule that matches the stack operation. The transformation aims to generate the language recognized by the PDA using CFG production rules .

The Pumping Lemma for regular languages is a property that all regular languages must satisfy, which can be used to prove that certain languages are not regular. For a regular language, there exists a pumping length such that any string longer than this length can be divided into parts that allow pumping (repeating) of certain sections to produce new strings also in the language. However, the set of unary strings of prime length violates this property because no matter how sections are repeated, they cannot maintain their primality, thus demonstrating that the language is non-regular .

A Deterministic Pushdown Automaton (DPDA) is a type of pushdown automaton where, for each state and input symbol, there is at most one transition path available, making its moves predictable and deterministic. In contrast, a non-deterministic pushdown automaton can have multiple possible moves for a given input, allowing it to guess. DPDAs specifically recognize deterministic context-free languages, a subset of context-free languages recognizable by NPDA (non-deterministic pushdown automaton).

Closure properties of regular languages refer to the fact that these languages are closed under various operations such as union, intersection, concatenation, and Kleene star. This means performing these operations on regular languages results in another regular language. These properties are crucial as they provide powerful techniques for proving language regularity and constructing automata. For example, given two regular languages A and B, their union (A ∪ B), intersection (A ∩ B), and concatenation (A⋅B) are all regular .

The Post Correspondence Problem (PCP) is a decision problem involving matching sequences of strings defined by two lists where concatenating strings according to provided indices should lead to identical results. PCP is undecidable; there is no algorithm that can solve all instances of the problem. This undecidability impacts theoretical computation by exemplifying limitations of algorithmic processes and reinforcing the existence of decision problems without reliable procedural solutions, thus influencing research into computability and complexity .

Recursive languages are a class of languages for which there exists a Turing Machine that can decide whether a given string belongs to the language or not in finite time. These languages are also known as decidable because the Turing Machine halts on every input string, either accepting or rejecting it. This contrasts with recursively enumerable languages where the Turing Machine may not halt for non-member strings of the language .

The Universal language, which includes all valid Turing Machine descriptions and inputs, is recursively enumerable because there is a Turing Machine that can enumerate all possible strings of this language by simulating every Turing Machine on every input string. However, it is not recursive because no Turing Machine can decide in finite time whether an arbitrary string belongs to this language; some computations never halt. This shows that while we can enumerate potential solutions, determining decisively if a solution exists (like the halting problem) is generally undecidable .

A Deterministic Finite Automaton (DFA) is a theoretical model of computation that is used to recognize regular languages. It consists of a finite set of states, a set of input symbols, a transition function that determines the state transitions, a start state, and a set of accepting states. In a DFA, for a given state and an input symbol, there is precisely one transition to the next state. This determinism makes DFAs straightforward to implement and analyze .

Context-Free Grammars (CFGs) are significant as they define the syntax of context-free languages, which include most programming languages. CFGs consist of production rules that specify how to generate strings from the language's alphabet. A simple CFG for a language with equal numbers of 'a's and 'b's is: S -> aSb | bSa | ε. This CFG generates strings like 'ab' or 'ba' with each 'a' matched by a 'b', maintaining equality .

You might also like