Docsity

Understanding Decidability and Encodings of Decision Problems in Computer Science, Slides of Computer Science

Partial preview of the text

Download Understanding Decidability and Encodings of Decision Problems in Computer Science and more Slides Computer Science in PDF only on Docsity!

1

Algorithmic Problems

2

Agenda

Viewing algorithms as languages

Algorithmic Decision Problems

 ATM, ACFG , AREX, ETM, … etc.

4

Knowing the Unknowable

Accepting the Church-Turing thesis implies that these are the same question! Church-Turing thesis is usually recognized as applying to human computations, and therefore human thought processes.

Amazing Fact: It is possible to give precise examples of problems which are beyond the reach of mechanical computation as well as human intellect. We in fact “know the unknowable.”

5

A decision problem is a set of yes/no

questions, each called an instance. For the

decision problem to be interesting, the set of questions should be infinite.

EG: “Does z equal the sum of x and y ?” is a

good example. A computer program that can

give the correct solution for any possible x,y,z

intuitively must have figured out how to add numbers.

EG: “Does 8 equal the sum of 3 and 5?” is a bad example. Could easily write program for this instance without knowing how to add! Docsity.com

7

A: In the way defined above, the answer is

yes! We give two computer programs, both of which accept the input “Does God exist?”

One of these programs is correct! Therefore,

that computer program has solved the problem of deciding if God exists!

Q: Any misgivings?

A(String question){ return “No!” }

B(String question){ return “Yes!” }

8

A: Many possible misgivings. Here’s one:

“Solution” to existence of God surely not what is meant by solving the problem. We expected the solution to be arrived at by careful consideration of physical evidence, or by theological arguments, or some other intricate process.

CS viewpoint: Any algorithm which works only on a finite set of inputs is considered meaningless, as could always program a look- up table which gave correct solutions without using any insight. Docsity.com

10

Decision Problems as

Languages

To study what it means for a decision problem to be solvable, need a method of standardizing such problems and making them easily understood by computers. Can’t just come over to a computer and ask “Does 2 + 2 = 4?” and even if could, dealing with voice recognition, natural language processing, etc. takes us far afield to topics irrelevant to answering “is the problem solvable?”

Solution: represent each instance by a string:

Thus instance is the string “Does 2 + 2 = 4?” or

more simply “2+2=4”.

Q: Define solvability language theoretically? Docsity.com

11

Decision Problems as

Languages

A: A decision problem P is solvable if its encoding by strings admits a computer program which inputs such encodings, always halts, and always outputs the correct answer. Furthermore, the set of encodings should be computable in its own right.

Language theoretically: Let S be the alphabet in

which the encoded instances of P exist. Let E

be the set of encoded instance and let L be the

set corresponding to the YES instances.^1 Then

P is said to be decidable (or algorithmically

solvable or computable ) if L is decidable.

13

Sensible Encodings

Sensible encoding of sensible decision problem would never result in an undecidable

encoding set E but condition still needed so

don’t solve impossible problems unwittingly.

EG: “Does a given Java program with no infinite loops print out “I’m not loopy!” on some input?”

Natural encoding set E is over Unicode

alphabet, and is just the set of Java programs

with no infinite loops. But we’ll see that E is

itself undecidable so second part becomes meaningless. Docsity.com

14

Basic Problems

Before tackling fundamental decision problems of CS, start introspectively by considering if there are algorithms for… …telling if a given string is accepted by a given language of a fixed type C such as DFA’s,

NFA’s, PDA’s etc. Acceptance Problem A C

…telling if a given language of type is C empty.

Emptiness Problem E C

…telling if two given languages of the same

type C are equal. Equivalence Problem EQ C

Each in turn, is encoded by a language.

16

Encoding Example

Consider the DFA:

Q: How can you represent this by a

string?

b

a

0,1 (^) 0,

17

Encoding Example

A: DFA’s are 5-tuples,

so just write down the

5 tuple, spelling out all

details. Therefore

=

({a,b},{0,1},{(a,0,b),(a,1,b),(b,0,a),(b,1,a)},a,{a})

b

a

0,1 (^) 0,

19

Encoding Example

A: DFA’s are 5-tuples,

so just write down the

5 tuple, spelling out all

details. Therefore

=

({a,b},{0,1},{(a,0,b),(a,1,b),(b,0,a),(b,1,a)},a,{a})

S

b

a

0,1 (^) 0,

20

Encoding Example

A: DFA’s are 5-tuples,

so just write down the

5 tuple, spelling out all

details. Therefore

=

({a,b},{0,1},{(a,0,b),(a,1,b),(b,0,a),(b,1,a)},a,{a})

d

b

a

0,1 (^) 0,