0% found this document useful (0 votes)
97 views3 pages

Turing Machine for Odd Palindrome Design

The document is a theory of computation exam paper containing 6 questions with multiple parts. It tests concepts related to finite automata (FAs), pushdown automata (PDAs), Turing machines (TMs), and context-free grammars (CFGs). Some key tasks include: designing FAs/PDAs/TMs for specific languages; proving properties of languages and models of computation; converting between CFGs and other forms.

Uploaded by

Sweet Home
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)
97 views3 pages

Turing Machine for Odd Palindrome Design

The document is a theory of computation exam paper containing 6 questions with multiple parts. It tests concepts related to finite automata (FAs), pushdown automata (PDAs), Turing machines (TMs), and context-free grammars (CFGs). Some key tasks include: designing FAs/PDAs/TMs for specific languages; proving properties of languages and models of computation; converting between CFGs and other forms.

Uploaded by

Sweet Home
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
You are on page 1/ 3

UKA TARSADIA UNIVERSITY

B.Tech (CE)/B.Tech (IT) ( Semester 6 )


030080609(2017-18)/030090609(2017-18)
Theory of Computaion
Date :09/10/2019 Time :1:30PM- 4:30PM
Max. Marks:60
Instructions :
1. Attempt all questions.
2. Write each section in a separate answer book.
3. Make suitable assumptions wherever necessary.
4. Draw diagrams/figures whenever necessary.
5. Figures to the right indicate full marks allocated to that question.
6. Follow usual meaning of notations/abbreviations.
SECTION - 1
Q 1 Answer the following (Any 3) [6]
I) Show that (A ∪ B)' = (A' ∩ B').

II) Define the following terms:


i)  Onto function
ii) One-to-one function

III) Using principle of mathematical induction, prove that for every n >= 1,
 

IV) Construct truth table for the following statement:


(p → q) ∨ ¬(p ∧ q)

Q 2 A) Answer the following in brief. (Any 1) [2]


I) Draw FA for regular expression: (1+110)*0 where Σ = {0,1}.

II) Explain Moore machine with an example.

Q 2 B) Answer the following in detail. (Any 2) [10]


I) Design NFA for the language that accepts all language over {0,1} in which even number of 0’s should be
present. Convert it into equivalent DFA.

II) Let M1,M2 and M3 be the FAs in following figure, recognize language L1, L2 and L3 respectively.
  

Draw FAs for following languages:


a)  L1 ∩ L2
b)  L3 - L2
III) Calculate δ*(q0,0101) from following transition table:
Q δ(q, ∧) δ(q,0) δ(q,1)
1 {2,5} Ø Ø
2 Ø 2 3
3 Ø 4 Ø
4 8 Ø 4
5 Ø 6 5
6 Ø 7 Ø
7 8 7 Ø
8 1 Ø Ø
 

Q 3 A) Answer the following in brief. (Any 1) [2]


I) Write the CFG for the language L= (an bn cm dm | n, m ≥ 1).

II) Define context free grammar. 

Q 3 B) Answer the following in detail. (Any 2) [10]


I) Convert following CFG into equivalent CNF:
I.   S → AA
     A → B | BB
     B → abB | b | BB
II.  S → bA | aB
     A → bAA | aS | a
     B → aBB | bS | b

II) Prove that the following CFG is ambiguous:


E → E or E | E and E | not E | true | false
Write unambiguous CFG for the above grammar. Draw parse tree for the string  “not true and not true”.

III) Find an equivalent CFG for the following grammar that has no  Λ productions:

 
SECTION - 2
Q 4 Answer the following (Any 3) [6]
I)Identify the types of following grammars:
a) SP → aPbS
  S→a
  P→b
b) X → aY
  Y→a

II) Justify: If L ⊆ Σ* is accepted by a TM 'T' that halts on every input string, then L is recursive.
 

III) Enlist computable functions.

IV) Match following:


Unrestricted Remunerable Language Linear - bounded Automation
Regular Language Pushdown Automation
Context Free Language Turing Machine
Context Sensitive Language Finite Automation
 

Q 5 Answer the following in detail. (Any 2) [12]


I) Design a Turing machine that recognizes the language L=anbn.

II) Explain universal and multitape Turing machines with an example.

III) Design a Turing Machine that accepts odd length palindrome over {0, 1}.

Q 6 Answer the following in detail. (Any 2) [12]


I) Construct PDA and transition table for the language L= {1 0n 12n 0, n>=1}. Show the tracing of PDA for
input string “10011110”.
 

II) Construct a PDA and transition table for a given CFG over an alphabet set Σ = {a,b}. Show the tracing of
PDA for input string ”aabbb”.
S → SB
S → AB
A → CC
C→a
B→b

III) Construct the grammar for the following PDA.


M = ({q0, q1, q2, q3},{a, b},{a, z0},δ,q0,z0, Ø) and where δ is given by
δ(q0, a, z0)={(q0, az0)}
δ(q0, a, a)={(q0, aa)}
δ(q0, b, a)={(q1, ∧ )}
δ(q1, b, a)={(q1, ∧)}
δ(q1, b, z0)={(q2, z0)}
δ(q2, b, z0)={(q3, z0)
δ(q3, ∧ , z0)={(q3, ∧)}

You might also like