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

Toc Queston Paper

This document contains a theory of computation exam with multiple choice and written response questions. The questions cover topics like regular expressions, finite automata, context-free grammars, ambiguity, derivation trees, and regular expressions from transition diagrams.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
99 views2 pages

Toc Queston Paper

This document contains a theory of computation exam with multiple choice and written response questions. The questions cover topics like regular expressions, finite automata, context-free grammars, ambiguity, derivation trees, and regular expressions from transition diagrams.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

D. Y. Patil College of Engineering, Akurdi, Pune-44.

Department Of Information Technology Subject: Theory Of Computation(TOC) Marks: 50 Time:1 and 1/2 hour
Q1. a) Represent the following using regular expressions. 6 i) ={a, b, c} the language such that any number of as followed by any number of cs. ii) If L(r) = {00, 010, 0110, 01110, ....} then what is r ? iii) The language of all strings containing atleast two 0s. b) Show that (0*1*)* = (0+1)*. 4 c) Express the language accepted by following Transition Graph in the form of regular expressions. 6

Date:

OR Q1. a) Find a regular expression corresponding to each of the following subsets of {0, 1}*. 6 1) The language of all strings containing exactly two 0s. 2) The language of all strings not containing the substring 00. 3) The language of all strings with odd no of 0s. b) Define the following terms with example. 4 1) Symbol 2) Alphabet c) Describe in simple english the language defined by following regular expressions : 6 i) (a+b)* aa (a+b)* ii) (b+ba)* iii) (a + b) * a b b. iv) a (a+b)*b v) a+b*c+ vi) b*ab*ab* Q2. a) Construct a NFA to accept the language represented by a*b*c*. Construct this NFA to its equivalent DFA. 8 b) Design FA that reads strings made up of = {0,1} and accepts only those strings which ends with 00 or by 11. 6 c) Define the following terms with example. 4 1) Moore Machine 2) Mealy machine OR Q2.a) Show stepwise process of constructing DFA equivalent to the NFA : 6

b) Design a Mealy machine that accepts strings ending in 00 and 11 c) Construct DFA equivalent to NFA ({p, q, r, s}, {0 , 1}, , p, {q, s})

6 6

0 1 p q,s q q r q,r = r s p s p Q3.a) Consider the CFG with productions S ->S + S/S S/S*S/S/S /(S)/a Is the grammar ambiguous ? If Yes find the equivalent unambiguous grammar. 6 b) Construct the parse trees for the strings using specified derivation format for given grammar G. 6 G = ({S, A, B}, {a, b}, P, {S}) P = {S -> aB, S-> bA, A -> a, A -> aS, A -> bAA, B -> b, B -> bS, B -> aBB} Strings : I) a a a b b b (leftmost derivation) II) a b a b a b b a (rightmost derivation). c) Define any two of the following terms with example. 4 1. DFA 2.NFA 3.Mealy machine OR Q3. a) Write a CFG which defines the language containing strings of the form 0n 1n for n>=1 . 4 b) Eliminate all unit, useless and null productions from the grammar given below : 6

D. Y. Patil College of Engineering, Akurdi, Pune-44. Department Of Information Technology Subject: Theory Of Computation(TOC) Marks: 50 Time:1 and 1/2 hour
S ->0X | 011 C-> Z Z ->1Z |11C X ->00X | c) Construct regular expression for following transition diagram.

Date:
6

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy