Which one of the following grammars generates the language L = (a i b i | i ! j}?

Đăng Khánh

New member
Which one of the following grammars generates the language L = (a i b i | i ! j}?
A.
Code:
 S ->AC | CB
B.
Code:
S -> aS | Sb | a | b 
C -> aCb | a | b 
A -> aA | ε 
B -> Bb | ε
C.
Code:
 S -> ACCB
D.
Code:
S -> AC | CB 
C -> aCb |!
C -> aCb |! 
A -> aA |! 
A -> aA | a 
B -> Bb |! 
B -> bB | b
 

Tìm kiếm

Back
Top