





















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






















Easy Problems
Impossible Problems
Hard Problems
All languages
The following machines can be simulated by a TM with one tape and alphabet { 0 , 1 }: TMs with more than one tape TMs tapes infinite in both directions TMs with 2-dimensional tape (or more!) TMs with several read/write heads on each tape Non-deterministic TMs Random Access Machines
Any function which can be computed by any well-defined procedure can be computed by a Turing machine.
(Also called Church’s Hypothesis, Sequential Computing Hypothesis)
Definition A language L is decidablea^ if there exists an acceptor TM T (with 2 final states qA and qR ), such that If x ∈ L then T (x) halts in state qA If x 6 ∈ L then T (x) halts in state qR aalso known as recursive
T is said to decide the language L — it gives a yes or no answer for each possible string from Σ∗.
The following languages are decidable: Σ∗ ∅ {x | |x| = 20 } {x | |x| is prime} {x | x encodes a graph G, and a Hamiltonian circuit of G} {x | x is a valid encoding of a TM} (see next slide) all language accepted by finite automata (see Sipser) all languages generated by context-free grammars (see Sipser) Are there undecidable languages? To answer this question we need some preparation ...
Now we can code the elements of the transition function:
[(q 0 , s 2 ), (q 1 , s 3 , L)] ⇒ 01001001000100 [(q 2 , 4 ), (q 3 , s 3 , S)] ⇒ 000110000100010 ... ... ...
Now we can code the whole machine by giving the whole transition function:
1 01001001000100︸ ︷︷ ︸ [(q 0 ,s 2 ),(q 1 ,s 3 ,L)]
[(q 2 , 4 ),(q 3 ,s 3 ,S)]
Instance : A Turing machine T and an input string x. Question: Does T (x) halt?
Once we choose an encoding for Turing machines, the corresponding language is: LHALTING = {“T ; x” | T (x) terminates} The HALTING problem is undecidable (see Models of Computation)
Instance : A Turing machine T Question: Is L(T ) empty?
Instance : Two Turing machines T 1 and T 2 Question: Is it true that L(T 1 ) = L(T 2 )?
Diophantine equations, Penrose tilings; Undecidable problems in software engineering: see http://tinyurl.com/o9e
We have seen that decision problems (and their associated languages) can be classified into decidable and undecidable.
Easy Problems Hard Problems
All languages
Decidable languages
Undecidable languages
A dynamic complexity measure is a numerical function that measures the maximum resources used by an algorithm to compute the answer to a given instance. To define a dynamic complexity measure we have to define for each possible algorithm M a numerical function φM on the same inputs.
Blum proposed^2 that any useful dynamic complexity measure should satisfy the following properties: φM (x) is defined exactly when M(x) is defined. The problem: for given M, x, r , does φM (x) = r , is decidable.
(^2) see “A machine-independent theory of the complexity of recursive functions”, Blum, Journal of the ACM 14, pp 322-336, (1967)
Another important computational resource is the amount of memory used by an algorithm, that is, space. The corresponding complexity measure is called space complexity. Definition The space complexity of a Turing Machine T is the function SpaceT such that SpaceT (x) is the number of distinct tape cell visited during the computation T (x) (Note that if T (x) does not halt, then SpaceT (x) is undefined.)
Time complexity of decision problems — 6 lectures Space complexity of decision problems — 4 lectures