Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
Slides 12

Slides 12

Ratings: (0)|Views: 6 |Likes:
Published by atul

More info:

Published by: atul on Jun 21, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

06/20/2009

pdf

text

original

 
StupidTuringMachineTricks 
Oftenitisusefultothinkofthestateandthetape symbolashavingstructure.
 
Thecomponentsofatapesymbolar
tracks 
.
 
Usuallyonecomponentofthestateisthe 
control 
responsibleforrunningtheprogramoftheTM;othercomponentsholddata.
Exampl
Le
=
Q;
 
;
;;q 
;B;
.Supposethe programof 
needstoswapthecontentsof adjacenttapecellssometimes.
 
Someofthestatesi
willbeofthefor 
q;
and 
p;
wher
isanysymbolin,.Wealsoneedstate
tobeginand 
toend.
 
Instat
 
willpickupthesymbolscanneintothedataportionofthestate.
3
 
r;
= 
q;
;X;
foral
in,.
 
Incontrolstate 
 
depositsthesymboliitsdatacomponentandpicksupthesymbol thatwastheregoingtocontrolstat
.
3
 
 
q;
;
= 
p;
;X;
foral
an
in,.
 
Incontrolstate 
 
depositsitsdataand entersstate 
movingright.
3
 
 
p;
;
=
s;X;
foral
an
i,.
Example:MultipleTracks 
Acommonuseformultipletracksistouseone trackfordatatheotherforasinglemark.
 
Symbolsof,arepairs 
A;
wher
isthe real"symbolan
iseither 
blankor 
 
.
3
Inputsymbol 
isidentiedwith 
B;
.
3
Theblankis 
B;
.
 
Here'saprogramtondthe 
 
assumingitisomewheretotheleftofthepresentposition.1.
 
q;
 
B;
=
q;
 
B;
;
 2.
 
q;
 
 
;
=
p;
 
B;
;
 
OtherTMModel
WhileregularorCFlanguagesareclassesof languagesthatwedenedbyconvenientnotations RE'sCFG'setc.noonesupposedthatthey representedeverythingwecancompute.
 
 
ThepurposeoftheTMwastodeneverythingwecancompute.
3
Forconvenienceweuserecognition oflanguagesasthespaceofpossiblcomputablethings;otherspacese.g. computingarithmeticfunctionsyieldthe sameconclusions.
 
Thusitwouldbeawkwardifwecouldnd anothernotionofeverything"thatwas dierentfromtheTM.
3
Arealcomputerisanimportantspecial case.DorealcomputersandTM'sdene thesamesetofcomputablethings
 
OurnextstepsaretoconsiderpotentiallmorepowerfulnotionsofcomputingandsethattheTMmodelwedenedcansimulatthem.
3
Thesemodelsare:multitapeTM nondeterministicTMmultistacmachinescountermachinesrealcomputers.
MultitapeTM'
AllowtheTMtohavesomenitenumberoftape
withaheadforeachtape.
 
Moveisafunctionofthestateandthesymbol scannedbyeachtapehead.
 
Action=newstatenewsymbolforeactapeandaheadmotionLRorSfor stationary".
 
Firsttapeholdstheinputothertapesarinitiallyblank.
ManyTapestoOneTapeSimulatio
Tosimulat
tapesuseonetapewith
tracks.
 
Onetrackholdsthecontentsofeachtape.
 
Anothertrackholdsamarkrepresentingthe headpositionofthattapeas 
 
WXY
 
TosimulateonemoveofthemultitapeTM theone-tapeTMmustrememberhowman*'saretoitsleft.
 
1.Moveleftthenrightvisitingallthe*'toseewhateachtapeheadisscanning.2.DecideonthemultitapeTM'smove basedonthescannedsymbolsanditstaterememberedinthestateoftheonetapeTM.3.Visiteach*againmakingthenecessaradjustments:changesymbolsandmov*'sonecellleftorrightasneeded.
 
Importantobservationforwhenwestudy polynomialtimeTM's:IfthemultitapeTmake
moveswhentheinputisoflengt
thentheone-tapeTMmake
 
 
moves.
3
ThusifthemultitapeTMtakepolynomialtimesodoestheone-tape TM.
3
Keypointinproof:The*'scan'tgemorethan 
cellsapartsoonemove issimulatedi
 
 
movesoftheonetapeTM.
NondeterministicT
LettheTMhaveanitesetofchoicesofmove.
 
AswiththenondeterministicPDAthereinomix-and-match";if
p;X;
and
q;Y;R 
 arechoiceswecannotgotostat
print 
onthecellandmoverighte.g.unles
q;X;
isanotherchoice.
NondeterministictoDeterministiSimulation 
LettheNTMhaveonetapebutrstsimulatwithamultitapeDTM;laterconvertthemultitape DTMtoaone-tapeDTM.
 
UseonetapeofDTMtohold
queue 
ofID'oftheNTMseparatedbyspecialmarkers*.
 
WhenanIDreachesthefrontofthequeue ndallitsnextID'sandaddthemtothe backofthequeue.
 
AcceptifyoueverreachanIDwithan acceptingstate.
3
NotethatthequeuedisciplineiimportantsothattheDTMeventuallreacheseveryIDthattheNTMcanenter.
3
Incontrastifweusedastackdiscipline theNTMmightreachacceptancebutthe 

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->