MACHINE COMPUTING the limitations
human computing stealing brain cycles of the masses word recognition: to digitize all printed writing language education: to translate web content games with a purpose labeling game: labeling images basing image search on image content word game: common-sense facts locating objects in images: generating a large data base for computer vision algorithms zooming in on labeled objects in general, taking a seemingly difficult problem, solve it with by-products of otherwise motivated (human) actions but what is "difficult"?
what is difficult? depends on the intelligence (of humans) human age and health training (expertise) motivation depends on the degree of smartness (of hardware) speed of operation (time complexity) size of background memory (space complexity) resource support depends on viewpoint any contribution counts (or only the total) many solutions are ok (or just one) acceptable answer (or the exact answer) is needed
what is difficult for a computer? most famous "undecidable" problem : the halting problem given a piece of code and an input, does processing terminate while x is not do if x is even do x:=x/2 else do x:=3x+ chip library problem
chip library problem
dna self-assembly problems T S
other undecidable problems given two groups of indexed strings over the same alphabet same cardinality, is there a sequence of indices, yielding the same string is a given first-order logic statement universally valid? first order logic includes quantifiers equality of two real numbers given a formula on integers formula may have arithmetic operations, logarithms and exponential functions indefinite integration does a given function have a anti-derivative? is a piece of software a virus?
what is a computer? suppose we have a problem of an instance x, some data y and an algorithm A this is a state machine combinatorial circuit M A pc state x y workspace output
state machine specification state tables mealy state tables inputs inputs inputs current states next states outputs current states next states outputs state transition diagrams c state outp "inp" n state outp mealy state transition diagrams curr state "inp" "outp" next state arcs leaving a state must be: ) mutually exclusive: no more than one choice for each input 2) collectively exhaustive: a transition for each output
concept of the state machine example: odd parity checker assert output whenever input bit stream has odd # of 's reset reset even [] odd [] state transition diagram present state even even odd odd input next state even odd odd even output symbolic state transition table present state input next state output encoded state transition table
finite state machines a finite state machine has k states (one is the initial state) m inputs n outputs transition rules for each state and input output rules for each state
can fsm's solve all common problems? NO, there exist common problems that cannot be "effectively computed" by finite state machines!!! for example: multiplying two arbitrary binary numbers doubling a sequence of ""s checking for palindromes checking for balanced parenthesis (()(()())) - okay (()())) - no good! )(()((())) - no good! problem: for arbitrarily long paren sequences, arbitrarily many states are required q ( q q2 ( q3 ) ) ) q* ),( ( ( ) a finite state machine can only keep track of a finite number of objects.
unbounded-space computation during 92s and 3s, much of the "science" part of computer science was being developed (long before actual electronic computers existed). many different "models of computation" were proposed, and the classes of "functions" which could be computed by each were analyzed. one of these models was the turing machine named after Alan Turing a "turing machine" is just a finite state machine which receives its inputs from and writes outputs onto a tape with unlimited extendability... solving "finiteness" problem of finite state machines.
turing machine specification a tape discrete symbol positions that can be extended at both sides (without bound) finite alphabet say {, } finite state machine control inputs: symbol under the reading head outputs: write / move left/right initial starting state {S O } halt state {Halt}
a turing parity counter E evenodd even evenodd eveneveneven halt odd the transition diagram H E even R H odd R E find the parity of the symbols between the head and the symbol "E", and replace that symbol by the parity any turing machine can be specified by a table of "quintuples" current state read even even odd odd even E odd E next state write direction even right odd right odd right even right halt halt stop stop
a turing parenthesis checker E ( ( ) ) ( ) ( ( ) ) ) ( ( ) E q R E ( ( ) ) ( ) ( ( ) ) ) ( ( ) E q R E ( ( ) ) ( ) ( ( ) ) ) ( ( ) E q R E ( ( X ) ( ) ( ( ) ) ) ( ( ) E q L E ( X X ) ( ) ( ( ) ) ) ( ( ) E q R next sheet
a turing parenthesis checker E ( X X ) ( ) ( ( ) ) ) ( ( ) E q R E ( X X X ( ) ( ( ) ) ) ( ( ) E q L E ( X X X ( ) ( ( ) ) ) ( ( ) E q L E ( X X X ( ) ( ( ) ) ) ( ( ) E q L E X X X X ( ) ( ( ) ) ) ( ( ) E q R etc., etc.
a turing parenthesis checker this shows the superiority of turing machines over finite state machines remarks: the next state and direction are - in "q2" the situation with ")" will never occur not exactly a moore machine, but almost... current state q q q q q q q q q2 q2 q2 q2 read ) ( E X ) ( E X ) ( E X next state write direction q X left q ( right q2 E left q X right q ) left q X right halt stop q X left dc dc dc halt stop halt stop q2 X left H E q L ( ),X X X ) q R E (,X E X q2 ( L E H H
finite state machines: limitations because of recurrent states the state of affairs turing machines: can compute any computable function solid engineering available for synthesis unlimited tape extendability difficult to realize pragmatic compromise: finite state machine with very many states programmable finite state machines: datapath with data-dependent control universal turing machines: can emulate any turing machine general purpose processors
what is difficult for a computer? not computable (undecidable) if computable, what does it take? how much time? how much memory space? how many processors? time complexity space complexity computer science answer: complexity classes
decidable class structures ExpSpace ExpTime Pspace a decision problem is decidable if there exists a single algorithm that always leads to a correct yes-or-no answer. co-np P Log Space Log Time searching sorting linear programming shortest paths