懂计算理论(正则表达式,图灵机,自动化)求解

zrmzhang 2013-04-29 11:33:44
两道题目 求解答
1. Let R1 = (a|b)∗(aa|bb) and R2 = (bb|aa)(b|a)+ be two regular expressions. The operator + is a generalization of
Kleene-star that requires one or more repetitions, that is, when R is a regular expression, R+ = RR∗.
(a) Give a word w1 such that w1 ∈ L(R1) ∩ L(R2).
(b) Give a word w2 such that w2 ∈ L(R1) \ L(R2).
(c) Give a word w3 such that w3 ∈ L(R2) \ L(R1).
(d) Give a regular expression R3 such that L(R3) = L(R1) ∪ L(R2). (e) Give a regular expression R4 such that L(R4) = L(R1) ∩ L(R2).

2. Let R′ be a formalism to express languages obtained by excluding the Kleene-star * operation from regular expres- sions.
(a) Prove that R′ is strictly less expressive than regular expressions.
(b) Why R′ can only produce finite languages. Explain briefly.
(c) Let “&” be a unary operator such that R& = RR, where R is a regular expression. Will including the “&” operator in regular expressions increase their expressivity? Explain briefly.
...全文
100 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

67,512

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧