CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

Consider the language L={an | n>0} {anbn | n0} and the following statements.
I. L is determnistic context-free.
II. L is context-free but not deterministic context-free.
III. L is not LL(k) for any k.
Which of the above statements is/are TRUE?

Open in App
Solution

  • Statement I: L in DCFL is true, since {an} {anbn} = regular DCFL = DCFL, by clouser property. So II is false and I is true.
  • Statement III is true because we cannot write LL(k) grammar, for any value of k, since no matter how many a's are shown to compiler it will be impossible to distinguish between whether the string presented is in the form of {an} or {anbn} and hence the production cannot be chosen uniquely for any value of k.
So option (a) is correct, I and III only are true.

flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Objective Session 3
OTHER
Watch in App
Join BYJU'S Learning Program
CrossIcon