Compiler-Design
October 10, 2023
UGC NET CS 2009 Dec-Paper-2
October 10, 2023
Compiler-Design
October 10, 2023
UGC NET CS 2009 Dec-Paper-2
October 10, 2023

UGC NET CS 2009 Dec-Paper-2

Question 5
In a MIU puzzle, either of the letters M, I or U could go as a start symbol. Production rules are given below :
R1 : U → IU
R2 : M.x → M.x.x where . .. is string concatenation operator. Given this, which of the following holds for
(i) MIUIUIUIUIU
(ii) MIUIUIUIUIUIUIUIU
A
Either (i) or (ii) but not both of these are valid words.
B
Both (i) and (ii) are valid words and they take identical number of transformations for the production.
C
Both (i) and (ii) are valid words but they involve different number of transformations in the production.
D
None of these
Question 5 Explanation: 
(i) string-> MIUIUIUIUIU
It has M (5 times ) IU
So start with MIU
Production 2 says: M.x-> M.x.x
So
MU-> MUU again using it
MUU-> MUUU -> MUUUU ->MUUUUU
Now using prod 1: Last U-> IU
MUUUUU -> MIUUUUU
MIUUUUU -> MIUIUUUU
MIUIUUU —————-> MIUIUIUIUIU
Correct Answer: C
Question 5 Explanation: 
(i) string-> MIUIUIUIUIU
It has M (5 times ) IU
So start with MIU
Production 2 says: M.x-> M.x.x
So
MU-> MUU again using it
MUU-> MUUU -> MUUUU ->MUUUUU
Now using prod 1: Last U-> IU
MUUUUU -> MIUUUUU
MIUUUUU -> MIUIUUUU
MIUIUUU —————-> MIUIUIUIUIU
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!