Friday 22 November 2019

UGC NET PAPER 2 June 2019 Question 78 (Shift-I)

Question 78
78. Consider the following grammar:
S→ XY
X→ YaY | a and Y → bbX
Which of the following statements is/are true about the above grammar?
(a) Strings produced by the grammar can have consecutive three a's
(b) Every string produced by the grammar have alternate a and b
(c) Every string produced by the grammar have at least two a's
(d) Every string produced by the grammar have b's in multiple of 2.
  1. 1. (a) only
  2. 2. (b) and (c) only
  3. 3. (d) only
  4. 4. (c) and (d) only
Answer : 4. (c) and (d) only

Explanation Question 78

Given grammar generates strings which contains "b" in multiple of 2 and number of "a" at least 2.

This grammar generate a string set of this form, L = { abba, bbaabbabba, abbbbaabba, . . . . . . . . . . . . . }

  • Statement (a) is not true because the grammar can generate two consecutive a’s but not three consecutive a’s.
  • Statement (b) is not true because every string produced by the grammar do not have alternate a and b. The grammar can generate two b’s together it means that every string do not have alternate "a" and "b".
  • Statement (c) is true because every string produced by the grammar have at least two a's.
  • Statement (d) is true because every string produced by the grammar have b's in multiple of 2.

This is satisfied by statements c and d. But statements a and b are not satisfied.
Hence statements c and d is right.

So, option 4 is correct answer


PreviousNext
UGC NET CS 2018 July - II Question 77UGC NET CS 2018 July - II Question 79

No comments:

Post a Comment

UGC NET Computer Science December 2019 | Question 16

Question 16 In a certain coding language. 'AEIOU' is written as 'TNHDZ'. Using the same coding language. 'BFJPV' wil...

Popular Posts