參考文稿成果_第1頁
參考文稿成果_第2頁
免費預覽已結(jié)束,剩余1頁可下載查看

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

2009-2010《計算理論》課程期末考試課程號 開課學院:計算機學考試試卷:A考試形式:閉卷,允許 入考試日期:2010128日120誠信考試,沉著應(yīng)考,杜考生學 所屬院題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. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論