首页人文社科类教育考试《编译原理及实践课后习题答案
天籁

文档

766

关注

0

好评

0
PDF

《编译原理及实践课后习题答案

阅读 538 下载 0 大小 3.73M 总页数 64 页 2022-10-10 分享
价格:¥ 10.00
下载文档
/ 64
全屏查看
《编译原理及实践课后习题答案
还有 64 页未读 ,您可以 继续阅读 或 下载文档
1、本文档共计 64 页,下载后文档不带www.pdfdz.com水印,支持完整阅读内容。
2、古籍基本都为PDF扫描版,所以文档不支持编辑功能,即不支持文档内文字的复制粘贴。
3、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
4、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
5、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。
The exercises of Chapter Two2.1 Write regular expression for the following character sets,or givereasons why no regular expression can be written:a.All strings of lowercase letters that begin and end in a.[Solution]ala-z]*aab.All strings of lowercase letters that either begin or end in a orboth)both:a(abc…z)*ac.All strings of digits that contain no leading zeros[Solution][1-9][0-9]*d.All strings of digits that represent even numberse.All strings of digits such that all the 2's occur before all the[Solution]a=(01345678)r=(2a)*(9a)or[^9]*[2]*or[^9]*2(1[3-8])*9[2]*g.All strings of a's and b's that contain an odd number of a's oran odd number of b's(or both)[Solution]rl=b"a(b ab"a)*-odd number of a’sr2=a"b(a ba"b)*--odd number of b'sorb"a(b"ab"a)"b*a b(a bab)"a*i.All strings of a's and b's that contain exactly as ny a's as[Solution]No regular expression can be written,as regular expression can notcount.2.2 Write English descriptions for the languages generated by thefollowing regular expressions:a.(a b)*a(a b)[Solution]All the strings of a's and b's that end with a,ab or aa.OrAll the strings of a's and b's that do not end with bb.b.All words in the English alphabet of one or more letters,whichstart with one capital letter and don't contain any other capitalletters.c.(aa b)*(a bb)*[Solution]All the strings of a's and b's that can be divided into two sub-stings,where in the left substring,the even number of consecutivea's are separated by b's while in the right substring,the evennumber of consecutive b'are separated by a's.d.All hexadecil numbers of length one or more,using the numberszero through nine and capital letters A through F,and they are denotedwith a lower or uppercase "x"at the end of the number string.
返回顶部