Download presentation
Presentation is loading. Please wait.
1
Fall 2003Costas Busch - RPI1 Decidability
2
Fall 2003Costas Busch - RPI2 Recall: A language is decidable (recursive), if there is a Turing machine (decider) that accepts the language and halts on every input string Turing Machine Input string Accept Reject Decider for Decision On Halt: Decidable Languages
3
Fall 2003Costas Busch - RPI3 Is number prime? Corresponding language: Problem:
4
Fall 2003Costas Busch - RPI4 On input number : Divide with all possible numbers between and If any of them divides Then reject Else accept Decider for :
5
Fall 2003Costas Busch - RPI5 We also say that the corresponding prime number problem is solvable: we can give an answer (positive or negative) for every input instance of the problem Thus, PRIMES is decidable
6
Fall 2003Costas Busch - RPI6 (Input string) Accept Reject is number prime? Decider for PRIMES Input number YES NO the decider for the language solves the corresponding problem (Accept) (Reject)
7
Fall 2003Costas Busch - RPI7 Problem: Does DFA accept the empty language ? Corresponding Language: Description of DFA as a string (For example, we can represent as a binary string, as we did for Turing machines)
8
Fall 2003Costas Busch - RPI8 Determine whether there is a path from the initial state to any accepting state Decider for : On input : DFA Reject Decision: Accept
9
Fall 2003Costas Busch - RPI9 Problem: Does DFA accept a finite language? Corresponding Language: Decidable language
10
Fall 2003Costas Busch - RPI10 Decider for : On input : DFA Reject Decision: Accept Check if there is a walk with cycle from the initial state to an accepting state infinitefinite
11
Fall 2003Costas Busch - RPI11 Problem: Does DFA accept string ? Corresponding Language: Decidable language
12
Fall 2003Costas Busch - RPI12 Decider for : On input string : Run DFA on input string If accepts Then accept (and halt) Else reject (and halt)
13
Fall 2003Costas Busch - RPI13 Problem: Do DFAs and accept the same language? Corresponding Language: Decidable language
14
Fall 2003Costas Busch - RPI14 Let be the language of DFA Decider for : On input : Construct DFA such that: (combination of DFAs)
15
Fall 2003Costas Busch - RPI15 and
16
Fall 2003Costas Busch - RPI16 or
17
Fall 2003Costas Busch - RPI17 Therefore, we only need to determine whether which is a solvable problem for DFAs:
18
Fall 2003Costas Busch - RPI18 Undecidable Languages there is no Turing Machine that reaches a decision (halts) for all input strings of the language undecidable language = language is not decidable There is no decider for the language: (decision may be reached for some strings)
19
Fall 2003Costas Busch - RPI19 For an undecidable language, the corresponding problem is unsolvable: there is no Turing Machine (Algorithm) that gives an answer (solves the problem) for all input instances of the problem (answer may be given for some input instances)
20
Fall 2003Costas Busch - RPI20 We have shown before that there are undecidable languages: Decidable Turing recognizable is Turing recognizable but not decidable
21
Fall 2003Costas Busch - RPI21 We will prove that two particular problems are unsolvable: Membership problem Halting problem
22
Fall 2003Costas Busch - RPI22 Membership Problem Input:Turing Machine String Question: Does accept ? Corresponding language:
23
Fall 2003Costas Busch - RPI23 Theorem: (The membership problem is unsolvable) Proof: We will assume that is decidable; We will then prove that every decidable language is also Turing recognizable is undecidable Basic idea: A contradiction!
24
Fall 2003Costas Busch - RPI24 Suppose that is decidable YES accepts NO rejects Decider for Input string
25
Fall 2003Costas Busch - RPI25 Let be a Turing recognizable language Let be the Turing Machine that accepts We will prove that is also decidable: we will build a decider for
26
Fall 2003Costas Busch - RPI26 NO YES accept reject Decider for (and halt) Decider for Input string accepts ?
27
Fall 2003Costas Busch - RPI27 Therefore,is decidable But there are Turing recognizable languages which are not decidable Contradiction!!!! Since is chosen arbitrarily, every Turing recognizable language is also decidable END OF PROOF
28
Fall 2003Costas Busch - RPI28 We have shown: Decidable Undecidable
29
Fall 2003Costas Busch - RPI29 We can actually show: Decidable Turing recognizable
30
Fall 2003Costas Busch - RPI30 Turing machine that accepts : Run on input If accepts then accept is Turing recognizable
31
Fall 2003Costas Busch - RPI31 Halting Problem Input:Turing Machine String Question: Does halt while processing input string ? Corresponding language:
32
Fall 2003Costas Busch - RPI32 Theorem: (The halting problem is unsolvable) Proof: Suppose that is decidable; we will prove that every decidable language is also Turing recognizable is undecidable Basic idea: A contradiction!
33
Fall 2003Costas Busch - RPI33 YES halts on input doesn’t halt on input NO Suppose that is decidable Decider for Input string
34
Fall 2003Costas Busch - RPI34 Let be a Turing recognizable language Let be the Turing Machine that accepts We will prove that is also decidable: we will build a decider for
35
Fall 2003Costas Busch - RPI35 halts and accepts halts on ?YES NO Run with input reject accept reject Decider for Input string Decider for and halt halts and rejects and halt
36
Fall 2003Costas Busch - RPI36 Thereforeis decidable But there are Turing recognizable languages which are not decidable Contradiction!!!! Since is chosen arbitrarily, every Turing recognizable language is also decidable END OF PROOF
37
Fall 2003Costas Busch - RPI37 Theorem: Proof: Assume for contradiction that the halting problem is decidable; (The halting problem is unsolvable) is undecidable we will obtain a contradiction using a diagonilization technique An alternative proof Basic idea:
38
Fall 2003Costas Busch - RPI38 YEShalts on doesn’t halt on NO Suppose that is decidable Decider for Input string
39
Fall 2003Costas Busch - RPI39 Input string: YES NO Looking inside Decider for halts on ?
40
Fall 2003Costas Busch - RPI40 NO Loop forever YES Construct machine : If halts on input Then Loop Forever Else Halt halts on ?
41
Fall 2003Costas Busch - RPI41 Construct machine : Copy on tape If halts on input Then loop forever Else halt
42
Fall 2003Costas Busch - RPI42 Run with input itself Copy on tape If halts on input Then loops forever on input Else halts on input END OF PROOF CONTRADICTION!!!
43
Fall 2003Costas Busch - RPI43 We have shown: Decidable Undecidable
44
Fall 2003Costas Busch - RPI44 We can actually show: Decidable Turing recognizable
45
Fall 2003Costas Busch - RPI45 Turing machine that accepts : Run on input If halts on then accept is Turing recognizable
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.