Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有这种语言:
{a n b m | m+n 是偶数}
什么是正确的语法?
S -> aaS | aB | bbC | ε B -> bbB | b C -> bbC | ε
你看,它是一种常规语言。'S' 代表“我们已经构建了偶数个 a's and more a's may follow,'B' 代表“我们已经构建了奇数个 a's,现在有一个奇数个 b's 跟随。'C' 代表“我们已经构建了偶数个 a,现在后面有偶数个 b。
ε 代表 "",空字符串