Download presentation
Presentation is loading. Please wait.
1
CSCI 2670 Introduction to Theory of Computing
October 26, 2004
2
Agenda Last week Today Tomorrow
Decidability of languages involving DFA’s & CFG’s Non-decidability of the Turing machine acceptance problem ATM Today Revisit the ATM proof Finish Chapter 4 Problems Tomorrow Begin Chapter 5 (pp. 171 – 176) October 26, 2004
3
Announcements Announcements
Homework due next Tuesday (11/2) 4.4, 4.8, 5.1, 5.2, 5.13 No quiz this week Quiz next Tuesday No tutorials this week -- extra office hours instead Tuesday & Wednesday 3:00 – 5:00 Or by appointment October 26, 2004
4
Undecidability of ATM Theorem: ATM is undecidable
Proof: (By contradiction) Assume ATM is decidable and let H be a decider for ATM H(<M,w>) = { accept if M accepts w reject if M does not accept w October 26, 2004
5
Proof (cont.) Consider the TM D that submits the string <M> as input to the TM M D = “On input <M>, where M is a TM: Run H on input <M,<M>> If H accepts <M,<M>>, reject If H rejects <M,<M>>, accept” Since H is a decider, it must accept or reject Therefore, D is a decider as well D is a diagonalizing TM D rejects if M accepts <M> and accepts if M does not accept <M> October 26, 2004
6
Proof (cont.) What happens if D’s input is <D>? D(<D>) = {
D cannot exist! Therefore, H cannot exist – i.e., ATM is undecidable reject if D accepts <D> accept if D does not accept <D> October 26, 2004
7
Recap Assume H decides ATM Define D using H Consider D(<D>)
H(<M,w>) = accept if TM M accepts w, reject otherwise Define D using H D(<M>) returns opposite of H(<M,<M>>) Consider D(<D>) D accepts <D> if and only if D rejects <D> October 26, 2004
8
Apply this method to ADFA
Assume H decides ADFA H(<A,w>) = accept if DFA A accepts w, reject otherwise Define D using H D(<A>) returns opposite of H(<A,<A>>) Consider D(<D>) D only accepts DFA’s as input … D is a TM Method does not apply October 26, 2004
9
Apply this method to ATM-D
Assume H decides ATM-D H(<M,w>) = accept if decider TM M accepts w, reject otherwise Problem What if M is not a decider and just a regular TM? How can we test our input? ATM-D is not decidable October 26, 2004
10
Co-Turing recognizable
Definition: A language A is co-Turing-recognizable if Ā is Turing-recognizable. Example: EDFA = {<A> | A is a DFA and L(A) = } EDFA = {S | S does not describe a DFA or S describes a DFA with a non-empty language} How would we decide this language? October 26, 2004
11
Decidability and recognizability
Theorem: The language A is decidable if and only if it is both Turing-recognizable and co-Turing-recognizable Proof: In two parts If A is decidable then A and Ā are Turing-recognizable Follows from definitions If A and Ā are Turing-recognizable then A is decidable October 26, 2004
12
Decider for A Assume M1 recognizes A and M2 recognizes Ā
Consider the following TM M = “On input w: Run M1 and M2 on input w in parallel If M1 accepts, accept; if M2 accepts, reject” M must halt on w because at least on of the recognizers must halt on w If w A, M1 must halt; otherwise, M2 must halt October 26, 2004
13
Corollary ATM is not Turing-recognizable
Proof: ATM is Turing-recognizable, but not decidable. By previous theorem, ATM cannot be co-Turing-recognizable. October 26, 2004
14
Proving dedicability of L
Create a TM that decides L Your TM may invoke another TM that decides a language you know is decidable October 26, 2004
15
Languages we know are decidable
Input ADFA <D,w>, D is a DFA, w is a string ANFA <N,w>, N is an NFA, w is a string AREX <R,w>, R is an RE, w is a string EDFA <D>, D is a DFA EQDFA <C,D>, C and D are both DFA’s ACFG <G,w>, G is a CFG, w is a string ECFG <G>, G is a CFG L(G) G is a CFG October 26, 2004
16
Some decidable languages
FDFA = {<A> | A is a DFA and L(A) is finite} PRIME = { n | n is a prime number} CONN = {<G> | G is a connected graph} L10DFA = {D | D is a DFA that accepts every string w with |w| = 10} INTCFG = {<G1, G2, w> | G1 and G2 are CFG’s and w is accepted by both} INTLCFG = L(G1 G2), where G1 and G2 are CFG’s October 26, 2004
17
Group project 1 FDFA = {<A> | A is a DFA and L(A) is finite}
October 26, 2004
18
Group project 2 PRIME = { n | n is a prime number} October 26, 2004
19
Group project 3 CONN = {<G> | G is a connected graph}
October 26, 2004
20
Group project 4 L10DFA = {D | D is a DFA that accepts every string w with |w| = 10} October 26, 2004
21
Group project 5 INTCFG = {<G1, G2, w> | G1 and G2 are CFG’s and w is accepted by both} October 26, 2004
22
Group project 6 INTLCFG = L(G1 G2), where G1 and G2 are CFG’s
October 26, 2004
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.