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^mb^n : m ≤ 2n}
如果有人可以就如何解决这个问题来构建语法以及一个非常感谢的解决方案提供建议!
一些提示:
从 { a n b n |的语法开始 n 中的 n }。
您在第 (1) 部分中构建的语法可能通过在字符串的一侧放置 a 并在另一侧放置 b 来起作用。这样,最终会有相同数量的 a 和 b。试着修改语法,让你每一步写一个 a 或两个 a。
希望这可以帮助!