Escolar Documentos
Profissional Documentos
Cultura Documentos
Decision problems
They answer to question like 'Is a graph cyclic?’, etc. So the answer of a decision problem could be yes or no.
Research problems
They answer to real problems, like ‘solve an equation’, ‘find a path for a graph’, etc.
Formalization
A necessary step to solve a decidability problem is formalize our problem.
For example, we could think about formalize an arithmetic expression as a problem. The expression has to be
defined in a formal way and encoded as a language.
φ is an arithmetic expression
<φ> is a suitable encoding (one of the possible encodings)
For example, a good encoding could be a binary encoding over a ternary alphabet.
Symbol Encoding
0 000
1 001
+ 010
- 011
* 100
÷ 101
% 110
Example
1. we use Q because we use also the division (so we need rational numbers). Otherwise we can use Z.
2. φ = n means that the value of the equation has to be correct.
Γ = {+, 1, 0, −, ∗, ÷, %, ), (, #}
Example
3
The number 3 can be seen as + 1 , so it can be encoded as (+, 11, 1).
2
The number 2 can be seen as + 1 , so it can be encoded as (+, 10, 1).
5
The number 5 can be seen as + 1 , so it can be encoded as (+, 101, 1).
So..
(+, 11, 1) + (+, 10, 1) # (+, 101, 1) ∈ L
Now it belongs to L !
L captures all the strings that are good-encoded, and the expression represented is equal to the number after the
#.
Example
+
L = L(a b ) ∈ REG
We can define a procedure to check if we can reach a final state:
and we can use this to compute our result solving an arithmetic expression
Sometime we could have a bound and our procedure will not loop infinitely, for example in the case of finding a
prime number (we iterate from 1 to the sqrt of n).
Every research problem can be solved if we have a language associated to the problem and a
solution of the form
L = {< in > # < out > | relation}, where 'relation' is a relation between the input and the output.
We don’t use this brute-force enumeration in real problems, but we know that if there’s a decisional version
of a problem, there’s an algorithm that in a finite time will solve the research version of the
problem.
Turing machine
There’s some differences between a Final state machine and a Touring machine:
+
L (ab )
Example of FSM
Example of TM
At the beginning the cursor is under the blank cell before the first input, then it moves.