CS 758/858: Algorithms

celerymoldwarpSecurity

Dec 3, 2013 (3 years and 8 months ago)

100 views

CS758/858:Algorithms
■Break
TuringMachines
Undecidability
WheelerRuml(UNH)Class23,CS758–1/20
http://www.cs.unh.edu/~ruml/cs758
1handout:slides
Break
■Break
TuringMachines
Undecidability
WheelerRuml(UNH)Class23,CS758–2/20
■asst12
■asst13
■wildcardtopic
◆encryption(RSA)
◆linearprogramming
◆#PandPSPACE
◆randomnumbergeneration
◆quantumcomputingalgorithms
◆FFT
◆parallelalgorithms
◆real-timealgorithms,egPIDcontrol
◆bitcoin
◆proceduralgeneration
◆moreDP
◆heuristicsearch
TuringMachines
■Break
TuringMachines
■‘Computing’
■A.M.Turing
■Thesetup
■Insummary
■Extensions
■Thethesis
■Othermodels
■Universality
■Minsky’smachine
Undecidability
WheelerRuml(UNH)Class23,CS758–3/20
Whatis‘informationprocessing’?
■Break
TuringMachines
■‘Computing’
■A.M.Turing
■Thesetup
■Insummary
■Extensions
■Thethesis
■Othermodels
■Universality
■Minsky’smachine
Undecidability
WheelerRuml(UNH)Class23,CS758–4/20
Takesomeinput,processit,rendersomeoutput.
Wouldlikeanabstractmodelforthis,independentofrealization.
Nohomunculi!‘Process’stepsmustbeclearandunambiguous.
AlanMathisonTuring(1912-1954)
■Break
TuringMachines
■‘Computing’
■A.M.Turing
■Thesetup
■Insummary
■Extensions
■Thethesis
■Othermodels
■Universality
■Minsky’smachine
Undecidability
WheelerRuml(UNH)Class23,CS758–5/20
Thesetup
■Break
TuringMachines
■‘Computing’
■A.M.Turing
■Thesetup
■Insummary
■Extensions
■Thethesis
■Othermodels
■Universality
■Minsky’smachine
Undecidability
WheelerRuml(UNH)Class23,CS758–6/20
ATuringmachinehas:
■aprocessorthatcanbeinoneofafinitenumberofstates
■aninfinitetapeofsymbols(fromfinitealphabet)
■aheadthatreadsandwritesthetape,onesymbolatatime
...
baba
...
q8q0
q5
q4
q2
q1
q3
q6
q7
Thesetup
■Break
TuringMachines
■‘Computing’
■A.M.Turing
■Thesetup
■Insummary
■Extensions
■Thethesis
■Othermodels
■Universality
■Minsky’smachine
Undecidability
WheelerRuml(UNH)Class23,CS758–6/20
ATuringmachinehas:
■aprocessorthatcanbeinoneofafinitenumberofstates
■aninfinitetapeofsymbols(fromfinitealphabet)
■aheadthatreadsandwritesthetape,onesymbolatatime
...
baba
...
q8q0
q5
q4
q2
q1
q3
q6
q7
Theprocessorlooksat
1.thesymbolunderthehead
2.itscurrentstate
andthen
3.writesasymbol(couldbesameasold)
4.movestheheadleft,right,orstaysstill
5.putsitselfinanextstate(couldbesameasold)
Insummary
■Break
TuringMachines
■‘Computing’
■A.M.Turing
■Thesetup
■Insummary
■Extensions
■Thethesis
■Othermodels
■Universality
■Minsky’smachine
Undecidability
WheelerRuml(UNH)Class23,CS758–7/20
ATuringmachineis:
1.afinitealphabetofpossibletapesymbols(including✷)
2.aninfinitetapeofsymbols
3.astartingheadposition
4.afinitesetofpossibleprocessorstates
5.astartingprocessorstate
6.asetof‘final’processorstates
7.asetoftransitionrulesfortheprocessor
Oneofthefirst(andstillmostpopular)abstractmodelsof
computation.
Extensions
■Break
TuringMachines
■‘Computing’
■A.M.Turing
■Thesetup
■Insummary
■Extensions
■Thethesis
■Othermodels
■Universality
■Minsky’smachine
Undecidability
WheelerRuml(UNH)Class23,CS758–8/20
■tapeinfiniteinonlyonedirection
■multipletapesatonce
■multipleheadsatonce
■2-D”tape”
Allpolytimerelated!
Church-TuringThesis
■Break
TuringMachines
■‘Computing’
■A.M.Turing
■Thesetup
■Insummary
■Extensions
■Thethesis
■Othermodels
■Universality
■Minsky’smachine
Undecidability
WheelerRuml(UNH)Class23,CS758–9/20
Any
‘effectivecomputingprocedure’canbe
representedasaTuringmachine.
Othermodels
■Break
TuringMachines
■‘Computing’
■A.M.Turing
■Thesetup
■Insummary
■Extensions
■Thethesis
■Othermodels
■Universality
■Minsky’smachine
Undecidability
WheelerRuml(UNH)Class23,CS758–10/20
equivalenttoTuringmachines(computetimemayvary):
■Postrewritingsystems(grammars)
■recursivefunctions
■λcalculus
■parallelcomputers
■cellularautomata
■certainartificialneuralnetworks(mostareweaker)
■quantumcomputers
Theremustbesomethingsubstantiveaboutthis!
Universalmachines
■Break
TuringMachines
■‘Computing’
■A.M.Turing
■Thesetup
■Insummary
■Extensions
■Thethesis
■Othermodels
■Universality
■Minsky’smachine
Undecidability
WheelerRuml(UNH)Class23,CS758–11/20
CanrepresentTuringmachineasatable
state,symbol→symbol,action,state
state,symbol→symbol,action,state
.
.
.
Canwritethetableonaninputtape
Universalmachine:inputismachineandmachine’sinput
‘Storedprogram’computation
Minsky’suniversalmachine
■Break
TuringMachines
■‘Computing’
■A.M.Turing
■Thesetup
■Insummary
■Extensions
■Thethesis
■Othermodels
■Universality
■Minsky’smachine
Undecidability
WheelerRuml(UNH)Class23,CS758–12/20
Undecidability
■Break
TuringMachines
Undecidability
■Haltingproblem
■Asimplerproblem
■Aparadox
■Undecidability
■Rice
■Summary
■EOLQs
WheelerRuml(UNH)Class23,CS758–13/20
Thehaltingproblem
■Break
TuringMachines
Undecidability
■Haltingproblem
■Asimplerproblem
■Aparadox
■Undecidability
■Rice
■Summary
■EOLQs
WheelerRuml(UNH)Class23,CS758–14/20
H:givenManditsinputi,doesMhaltoni?
Thehaltingproblem
■Break
TuringMachines
Undecidability
■Haltingproblem
■Asimplerproblem
■Aparadox
■Undecidability
■Rice
■Summary
■EOLQs
WheelerRuml(UNH)Class23,CS758–14/20
H:givenManditsinputi,doesMhaltoni?
decidingH:outputYorN
acceptingH:halting(=Y)orcomputingforever(=N)
AnyuniversalmachinecanacceptH.
Butcanamachinedecideit?
Asimplerproblem
■Break
TuringMachines
Undecidability
■Haltingproblem
■Asimplerproblem
■Aparadox
■Undecidability
■Rice
■Summary
■EOLQs
WheelerRuml(UNH)Class23,CS758–15/20
H:givenManditsinputi,doesMhaltoni?
SH:givenM,doesMhaltonitsownencoding?
Butcanamachinedecidethissimplerproblem?
Reminder:
decidingH:outputYorN
acceptingH:halting(=Y)orcomputingforever(=N)
Asimplerproblem
■Break
TuringMachines
Undecidability
■Haltingproblem
■Asimplerproblem
■Aparadox
■Undecidability
■Rice
■Summary
■EOLQs
WheelerRuml(UNH)Class23,CS758–15/20
H:givenManditsinputi,doesMhaltoni?
SH:givenM,doesMhaltonitsownencoding?
ISH:givenM,doesMnothaltonitsownencoding?
‘CanamachinedecideSH?’isfundamentallythesameas
‘CanamachinedecideISH?’whichiseasierthan
‘CanamachineacceptISH?’
Reminder:
decidingH:outputYorN
acceptingH:halting(=Y)orcomputingforever(=N)
Aparadox
■Break
TuringMachines
Undecidability
■Haltingproblem
■Asimplerproblem
■Aparadox
■Undecidability
■Rice
■Summary
■EOLQs
WheelerRuml(UNH)Class23,CS758–16/20
H:givenManditsinputi,doesMhaltoni?
SH:givenM,doesMhaltonitsownencoding?
ISH:givenM,doesMnothaltonitsownencoding?
Let’sassume
wehaveamachineSthatacceptsISH.
WhathappenswhenSisgivenitselfasinput?Doesithalt?
Reminder:
decidingH:outputYorN
acceptingH:halting(=Y)orcomputingforever(=N)
Aparadox
■Break
TuringMachines
Undecidability
■Haltingproblem
■Asimplerproblem
■Aparadox
■Undecidability
■Rice
■Summary
■EOLQs
WheelerRuml(UNH)Class23,CS758–16/20
H:givenManditsinputi,doesMhaltoni?
SH:givenM,doesMhaltonitsownencoding?
ISH:givenM,doesMnothaltonitsownencoding?
Let’sassume
wehaveamachineSthatacceptsISH.
WhathappenswhenSisgivenitselfasinput?Doesithalt?
IfShaltsonS,thedefinitionofISHmeansSdoesn’thaltonS.
IfSdoesn’thaltonS,thatmeansthatSdoeshaltonS.
Reminder:
decidingH:outputYorN
acceptingH:halting(=Y)orcomputingforever(=N)
Aparadox
■Break
TuringMachines
Undecidability
■Haltingproblem
■Asimplerproblem
■Aparadox
■Undecidability
■Rice
■Summary
■EOLQs
WheelerRuml(UNH)Class23,CS758–16/20
H:givenManditsinputi,doesMhaltoni?
SH:givenM,doesMhaltonitsownencoding?
ISH:givenM,doesMnothaltonitsownencoding?
Let’sassume
wehaveamachineSthatacceptsISH.
WhathappenswhenSisgivenitselfasinput?Doesithalt?
IfShaltsonS,thedefinitionofISHmeansSdoesn’thaltonS.
IfSdoesn’thaltonS,thatmeansthatSdoeshaltonS.
Contradiction!
Reminder:
decidingH:outputYorN
acceptingH:halting(=Y)orcomputingforever(=N)
Implication:undecidability
■Break
TuringMachines
Undecidability
■Haltingproblem
■Asimplerproblem
■Aparadox
■Undecidability
■Rice
■Summary
■EOLQs
WheelerRuml(UNH)Class23,CS758–17/20
AssumingwehaveamachineSthatacceptsISHleadstoa
contradiction.
SonosuchScanexist.
ISHis‘notTuring-acceptable.’
Implication:undecidability
■Break
TuringMachines
Undecidability
■Haltingproblem
■Asimplerproblem
■Aparadox
■Undecidability
■Rice
■Summary
■EOLQs
WheelerRuml(UNH)Class23,CS758–17/20
AssumingwehaveamachineSthatacceptsISHleadstoa
contradiction.
SonosuchScanexist.
ISHis‘notTuring-acceptable.’
SHisundecidable.(OtherwisewecoulddecideISH.)
Implication:undecidability
■Break
TuringMachines
Undecidability
■Haltingproblem
■Asimplerproblem
■Aparadox
■Undecidability
■Rice
■Summary
■EOLQs
WheelerRuml(UNH)Class23,CS758–17/20
AssumingwehaveamachineSthatacceptsISHleadstoa
contradiction.
SonosuchScanexist.
ISHis‘notTuring-acceptable.’
SHisundecidable.(OtherwisewecoulddecideISH.)
Hisharderandthuscertainlyundecidable.
Implication:undecidability
■Break
TuringMachines
Undecidability
■Haltingproblem
■Asimplerproblem
■Aparadox
■Undecidability
■Rice
■Summary
■EOLQs
WheelerRuml(UNH)Class23,CS758–17/20
AssumingwehaveamachineSthatacceptsISHleadstoa
contradiction.
SonosuchScanexist.
ISHis‘notTuring-acceptable.’
SHisundecidable.(OtherwisewecoulddecideISH.)
Hisharderandthuscertainlyundecidable.
NoTuringmachinecancomputeH.
ByChurch-Turing,noprocedureforHexistsinanymedium.
Thereareproblemsforwhichnoalgorithmcanexist.
Rice’sTheorem
■Break
TuringMachines
Undecidability
■Haltingproblem
■Asimplerproblem
■Aparadox
■Undecidability
■Rice
■Summary
■EOLQs
WheelerRuml(UNH)Class23,CS758–18/20
fromUNH
anynon-trivialpropertyisundecidable
Summary
■Break
TuringMachines
Undecidability
■Haltingproblem
■Asimplerproblem
■Aparadox
■Undecidability
■Rice
■Summary
■EOLQs
WheelerRuml(UNH)Class23,CS758–19/20
Turingmachines
■modelwhatwemeanbycomputation,independentof
hardware
■arenotsomethingyouwanttoprogrammuchyourself
■arethoughttobeabletoexpressanyalgorithm
■provideanexampleofstored-programinterpretation
■illustratelimitsonwhatcanbecomputed
■providethefoundationforcomputationalcomplexity
EOLQs
■Break
TuringMachines
Undecidability
■Haltingproblem
■Asimplerproblem
■Aparadox
■Undecidability
■Rice
■Summary
■EOLQs
WheelerRuml(UNH)Class23,CS758–20/20
Forexample:
■What’sstillconfusing?
■Whatquestiondidn’tyougettoasktoday?
■Whatwouldyouliketohearmoreabout?
Pleasewritedownyourmostpressingquestionaboutalgorithms
andputitintheboxonyourwayout.
Thanks!