

下載本文檔
版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
2009-2010《計算理論》課程期末考試課程號 開課學院:計算機學考試試卷:A考試形式:閉卷,允許 入考試日期:2010128日120誠信考試,沉著應考,杜考生學 所屬院題1234567總得評卷ZhejiangTheoryofComputation,Fall-Winter2009FinalExam(24%)Determinewhetherthefollowingstatementsaretrueorfalse.IfitistruefillaTotherwiseaFinthebracketbeforethestatement. )ForlanguagesL1andL2,ifL1isnon-regularandL1?L2,thenL2is )IfL1andL2arebothnon-regular,thenL1∪L2couldbe )ThereexistsalanguageLwithe6∈LsuchthatL+=L?,whereL+= )JustasTuringMachine’sencoding,DFAsMcanalsobeencodedas“M”,thenlanguage{“M”|“M”6∈L(M)}is )JustasTuringMachine’sencoding,DFAsMcanalsobeencodedasstrings“M”,thenlanguage{“M”|“M”6∈L(M)}isdecidable. )Languagevv∈{a,?|u|≤|v|≤2|u|}iscontext- )LetB=mmm|∈N}andA≤τB,whererecursivefunctionτisreductionfromAtoB,thenAisG )LetGbeaCFG,ifS??w,thenthereexistsaleftmostG?G )Everycontext-freelanguageisrecursively )Alllanguagesonalphabet{a}canbesemi-decidedbyaTuring )IfbothlanguageLanditscomplementarerecursivelyenumerable,Lis )TherecursivelyenumerablelanguagesareclosedunderSolution:(a)F(b)F(c)F(d)F(e)T(f)T(g)T(h)T(i)T(j)F(k)T(l)(14%)OnFiniteConsiderthefollowingNFAMon{a,lwhatlanguagethatNFAMDescribethekeyideaofconstructionanequivalentDFAfromaConstructanequivalentDFAfromtheNFAMNFAMacceptsthelanguageL=?b(b∪ba?b)=a?{, 6
L={w∈{a,b?|containsatleastoneDescribethekeyideaofconstructionanequivalentDFAfromaNFA:EverysubsetofK esasinglestateinournewmachine!·········· 4ptsConstructanequivalentDFAfromtheNFAMForeveryqi(i=1,2),wecanobtainE(q1)={q1},E(q2)= Accordingtodefinitionofδ(Q,a)=∪{E(p)|p∈Kand(q,a,p)∈?forsomeq∈Q},foreachQ?Kand?a∈{a,bwecanobtain:δ({q1},a)={q1},δ({q1},b)={q2},δ({q2},a)={q2},δ({q2},b)={q1,δ({q1,q2},a)={q1,q2},δ({q1,q2},b)= 2(12%)OnRegularShowthattheL1={w∈{a,b?|hasunequalnumbersof0and0isnot1Solution:AssumeL1isregular,byclosureproperties,wekonow0={w1{a,b?|hasequalnumbersof0and0isalsoregular.·········· 4ptsButL1isnotregular,wecanusepum theoremtoproveit.AssumeL0isregular,letnbetheconstantwhoseexistencethepum Choosestringw=2n2∈L0,wheren∈N.········· 4ptsSothepumtheoremmusthold.Letw=xyzsuchthat|xy|≤nandy6=e,theny=aiwherei>0.Butxz=2?i26∈L1. 4Thetheoremfails,thereforeL1isnotregular,henceL1isalsonotregular(16%)OnContext-freeConstructacontext-freegrammarthatgeneratestheL2=mbn|m,n,k∈N,andn≥m+ConstructapushdownautomatathatacceptsWecanconstructthecontext-freegrammarG=(V,Σ,R,S)forlanguageL2,whereV={a,b,c,S1,S2,S3};Σ={a,b,c};and 4ptsR={S→S1S2S3,S1→aS1b,S2→bS2,S3→bS3c,S1→e,S2→e,S3→e, 4ThePDAM=(K,Σ,Γ,?,s,F)isdefined(q,S1S2S3;Γ= } 8(12%)OnTuringDesignasingletapeTuringmachineMthatdecidesthelanguageL3on{a,bL3=nbn|∈N,n≥WhendescribingtheTuringmachinesabove,youcanusetheelementaryTuringmachinesdescribedintextbook.AlwaysassumethatyourTuringmachinestartstheconfigurationw 12(10%)OnPrimitiveRecursiveShowthatthepredicatecomposite(x)(xisacompositenumber)isprimitiverecur-composite(x)?1~?(x>1)∧x)6=1∧ 10(12%)OnClassifywhethereachofthefollowinglanguagesarerecursive,recursivelyenumerable-but-not-recursive,ornon-recursivelyenumerable.Proveyouranswers.L4={“M”|TuringmachineMhaltson“ML5={“M”|TuringmachineMdoesnothalton“ML4isrecursivelyenumerable-but-not-First,WecanuseU(UniversalTuringmachine)tosimulateTuringMon“M”,IfUniversalTuringmachineUhaltson“M”,then“yes”,otherwiseUcheckthehaltingcomputationofMon“M”.Hence,L4isrecursivelyenumerable.·6Secondly,wewillshowthatL4isnotrecursive.Wecanestablishaτ:{“M”|Mhaltsone}toL4.Thereductionτ(“M”)=“M”“M·3L5isnon-recursivelyenumerable.SupposethatL5isrecursivelyenu-merable,thereexistsaTuringmachineM?semidecidesL5.Is“M?”∈L5?AccordingtothedefinitionofL5,“M?”∈L5ifandonlyifM?doesnothalton“M?”.ButM?issupposedtosemidecidesL5,so“M?
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 糕點店財務管理與風險防范考核試卷
- 數據庫應用操作技巧分享試題及答案
- 計算機四級考試小貼士試題及答案分享
- 行政組織中的創新思維與解決問題策略試題及答案
- 公司會所食堂管理制度
- 公路工程團隊建設試題及答案
- 嵌入式系統中的數據通信技術試題及答案
- 展會公共人員管理制度
- 勞務公司分包管理制度
- 醫院新進職工管理制度
- 審計質量影響因素的實證分析
- 山東省青島市即墨市2024年中考適應性考試數學試題含解析
- 海上風電柔性直流輸電系統先進控制技術分析報告
- MOOC 大學物理-力學、電磁學-重慶大學 中國大學慕課答案
- 廢舊物資合同
- 三年級語文下冊 期末綜合模擬測試卷(人教浙江版)
- 好老師是民族的希望
- 構建自媒體內容生產與運營流程
- 《衛生經濟學》課件
- 《安全事故管理》課件
- 食品產業園區規劃設計方案案例
評論
0/150
提交評論