Which of the following statement is wrong ?
A. | Any regular language has an equivalent context-free grammar. |
B. | Some non-regular languages can’t be generated by any context-free grammar |
C. | Intersection of context free language and a regular language is always context-free |
D. | All languages can be generated by context- free grammar |
Option: D Explanation : Click on Discuss to view users comments. |
Consider a grammar :
G = ( { x , y ) , { s , x , y } , p , s)
where elements of parse :
S--> x y
S -->y x
x--> x z
x--> x
y--> y
z--> z
The language L generated by G most accurately is called
A. | Chomsky type 0 |
B. | Chomsky type 1 |
C. | Chomsky type 2 |
D. | Chomsky type 3 |
Option: D Explanation : Click on Discuss to view users comments. |
Consider a grammar :
G = { { S } , { 0 , 1 } , p , s }
where elements of p are:
S --> ss
S--> 0S1
S--> 1S0
S--> empty
The grammer will generate
A. | regular language |
B. | context-free language |
C. | context-sensitive language |
D. | recursive enumerable language |
Option: A Explanation : Click on Discuss to view users comments. |