wiz-icon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

Consider the following languages;
1.A=wwrwrw|wΣ
2.B={wwrxxr|w,xΣ}
3.C=aibjakbl|=|i,j,k,l0,(i+j)=(k+l)

The number of the above languges which is CFL's is/are ____.

Open in App
Solution

  • Only B and C are CFLs.
  • In language C, Push and Pop is clear means
- Input a, Tos S |a| a Push x
- Input b, Tos S |a| b Push x
- Input b, Tos S |a| b Pop x
- Input a, Tos S |a| b Pop x
- Input completed, Tos S String accepted
  • Language B, can be broken down as ww and xx an
Let L1 = ww (CFL
L2 = xx (CFL)
Thus, F is CFI since B = L1, L2 and contexts free language

flag
Suggest Corrections
thumbs-up
2
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Introduction to CFL
OTHER
Watch in App
Join BYJU'S Learning Program
CrossIcon