問題詳情

76 有一文法(grammar)G={{S}, {0, 1}, P, S },其中P={S→SS, S→0S1, S→1S0, S→empty}。根據此文法所產生之語言為以下何者? 
(A){W | where W has an equal number of 0’s and 1’s} 
(B){0n1n | where n ≥ 0} 
(C){0n1n | where n ≥ 0} U {1n0n where n ≥ 0} 
(D){0m1k | where m, k ≥ 0} U {1m0k where m, k ≥ 0}

參考答案

答案:A
難度:適中0.4
統計:A(4),B(1),C(3),D(2),E(0)