0% found this document useful (0 votes)
5 views4 pages

Computer science theoretical computer

T.y b.sc in computer science

Uploaded by

khanjunaid7796
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)
5 views4 pages

Computer science theoretical computer

T.y b.sc in computer science

Uploaded by

khanjunaid7796
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/ 4

Seat Number

~-056
[]I[TI]
.•••
1 2 4 6 .•••

COMPUTER SCIENCE: UG-CS-364


Theoretical Computer Science
(362404)
P.Pages: 4
Time: Two Hours Max. Marks: 60

Instructions to Candidates:
1. Do not write anything on question paper except Seat No.
2.. Graph or diagram should be drawn with the black ink pen being used
for writing paper or black HB pencil.
3. Students should note, no supplement will be provided.
4. All questions are compulsory.
5. Figures to the right indicates full marks.

1. A) Attempt any six. 6

a) The productions of the form A -t au , where A is variable 'a' is


terminal & 'u' is string of variable is ca!!ed ------.
i) CFG ii) GNF
iii) CNF iv) Unit production

b) Ian In ~ 1} is ---------
i) Regular ii) Context free but not regular
iii) Context sensitive iv) None

c) (0*1* f is same as -------

i) (0+1)* ii) (01)*

iii) (10)* iv) None

d) Language of finite automata is ---------.


i) Type 0 ii) Type 1
iii) Type 2 iv) Type 3

e) The entity which generate language is termed as --------


i) Automata ii) Tokens
iii) Grammar iv) Data

1 P.T.O
~-056
~-056
f) The value of n if Turing machine is defined using n-tuples -------.
i)6 ii)7
iii) 8 iv) 5 I
I

g) A DPDA is a PDA in which:


i) No state P has two outgoing transitions
ii) More than one state can have two or more outgoing transitions
iii) At least one state has more than one transitions
iv) None of the mentioned

h) In Turing machine how many cells can be examined by the RNV head
in each move.
i) Zero ii) One .
. iii) Two iv) One or more

. B) Attempt any six. 6

a) What is relation?

b) Define Regular expression.

c) What is finite automata?

d) Define the.term pumping lemma.

e) What is derivation tree?

f) Enlist the operations performed on sets.

g) Define Turing machine..

h) What is Moore machine?

2. Attempt any six. 12

a) Find R+ & R. for follOWingrelation


:::;
•••••••
= 11
,-,
? ~ .d\ R
•.•. , "J"
= ;1.\'1
(-1 "1) {-I
'/I\"-/l\-'
?\ (? -1) f? "J,\ f"J,
'/I\-,"'t\""-/J
?\\

b) Define:
i) E - production ii) Terminal symbol

c) What are properties of relation?

d) Show that the grammar S -+ SbS I a is ambiguous.

~-056 2
~-056
e) What is right & left most derivation?

f) What is pushdown Automata?

g) Define NFA with E- moves.

h) Set A = {1, 2}, B = {2, 3} Then find AU B, An B, A - B, A x B

12

f) Eliminate E - productions from the grammar G.


S -~ AB
A ~ SA/BB/bB
B~b/aA/E

4. Attempt any three. 12

a) Construct a PDA that accept the language L = {on 12n In;:: 1}


b) Draw a DFA over an alphabet {O, 1} which accept set of all string
which start with '0' & end with '11'.

c) Differentiate between DFA Ys NFA.

~-056 3 P.T.O
~-056
d) Design a TM to recognize a language which accept equal no. of a's &
b's. .

e) Convert the following grammar to GNF.


S~SS
S ~ OS1/01

5. Attempt any two. 12

a) Convert the following state diagram to Regular expression.


a

b
a a

b) Convert the following PDA to a CFG


M = ({qo, q1}, {a,b}, {#, A}, 5,-qo, #, $>
8(qo, a, #) = (qo, A#)

8(qo, a,A) = (qo ,AA)


8(qo, E,A) = (q1' A) .
S(q1' b,A) = (q1,E)
S(q1' E,#) =(q1,E)

c) Construct the Melay machine equivalent to the following Moore


machine.
Present Output
State
00 01 0
"1 "2 .1
2 0
3 0

*********

~.056 4 218/315

You might also like