Presentation is loading. Please wait.

Presentation is loading. Please wait.

COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.

Similar presentations


Presentation on theme: "COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University."— Presentation transcript:

1 COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University pursuant to Part VB of the Copyright Act 1968 (the Act). The material in this communication may be subject to copyright under the Act. Any further reproduction or communication of this material by you may be the subject of copyright protection under the Act. Do not remove this notice.

2 Non-Computable Languages CSE2303 Formal Methods I Lecture 17

3 Overview Other Machines CFG and Turing Machines Computable Languages Recursive Languages ALAN ALAN ’ Halting Problem and other problems

4 Definitions For a Turing Machine T Accept(T) –The set of strings leading to a HALT state. –Called the language accepted by T. Reject(T) –The set of strings that crash during execution. Loop(T) –The set of strings that loop forever.

5 Example HALT 2START 1 3 ( , , R) (b, b, R) (a, a, R) (b, b, R) Accept(T) = strings with a double aa Reject(T) = strings without a double aa that end in a Loop(T) =  or strings without a double aa that end in b

6 Other Machines Post Machine –Like a deterministic PDA, but uses a Queue. 2PDA –Like a deterministic PDA, but with 2 Stacks. NTM –A Nondeterministic Turing Machine. kTM –A Turing Machine with k Tapes.

7 Theorems Any language which a Turing machines can accept can also be defined by any of these machines, and visa-versa. There are algorithms to convert all these machines (including Turing Machines) into each other.

8 CFG and Turing Machines For every CFG there exists a Turing Machine which accepts the language generated by the grammar. Proof: Take a PDA which accepts the language. Convert the PDA into a NTM, using the algorithm which converts PDA2 into NTM. Convert the NTM into TM

9 Computable Languages A language L is called computable or recursive enumerable (r.e.) if there exist a Turing Machine T such that: Accept(T) = L

10 Examples Regular Languages Context Free Languages a n b n a n Church’s Thesis Any language which can be defined by an algorithm.

11 Recursive A language L is called recursive if there exists a Turing Machine T such that Accept(T) = L Reject(T) = L ’ Loop(T) = 

12 Examples Regular Languages Context Free Languages a n b n a n

13 Questions Are all languages computable? Are all computable languages recursive?

14 ALAN All strings in CWL that either 1. Do not represent a Turing Machine 2. Are not accepted by the Turing Machine they represent.

15 Examples aababaaaaa aaabaabaaaaa abaaabaaaabaaabaaabaaaabaaabaabababa ababababbabaaabaaabbaaabaaabaaabaaaabaabbaaba

16 Examples aababaaaaa –In ALAN aaabaabaaaaa –In ALAN abaaabaaaabaaabaaabaaaabaaabaabababa –Not in ALAN ababababbabaaabaaabbaaabaaabaaabaaaabaabbaaba –In ALAN

17 Is ALAN computable ? Assume ALAN is computable. Let T be the Turing Machine which accepts ALAN. Let C be a word in CWL which encodes T. Question: Does T accept C?

18 Assume T accepts C. Then C is in ALAN Then the Turing Machine C represents cannot accept C. C represents T. Therefore T cannot accept C. Assume T cannot accept C C represents T So the Turing Machine C represents does not accept C. Therefore C is in ALAN. Therefore T accepts C.

19 Conclusions ALAN is not computable. Therefore there exists languages which cannot be described by a Turing Machine.

20 ALAN ’ Contains: All the strings not in CWL All the strings in CWL which are accepted by the Turing Machine they represent. It is computable.

21 Theorems If L is recursive then L ’ is also recursive. ALAN ’ is not recursive. There exists languages which are computable but not recursive. If L and L ’ are computable then L is recursive.

22 Halting Problem Does there exist an algorithm which given: A Turing Machine, and Input can decided whether this machine halts on the input?

23 Other Problems Can we tell whether two different CFGs define the same language? Can we tell whether a CFG is ambiguous? Can we tell whether there exists an unambiguous CFG for a given CFL? Does a given TM have an equivalent FA?

24 Revision Know the definition of computable languages. Know the definition of Recursive languages. Know examples of recursive and computable languages. Know the definition of language ALAN. Know and understand the Halting Problem.


Download ppt "COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University."

Similar presentations


Ads by Google