1 / 97

CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012

Understanding countable sets, enumeration procedures, and the distinction between countable and uncountable sets in formal languages and automata theory. Learn about Turing machines, rational numbers, powersets, and recursive languages.

tuyen
Download Presentation

CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012 1

  2. Countable Sets Based on course materials by Prof. Costas Busch

  3. Infinite sets are either: • Countable • Uncountable

  4. Countable set: There is a one to one correspondence between elements of the set and positive integers

  5. Example: The set of even integers is countable Even integers: Correspondence: Positive integers: corresponds to

  6. Example: The set of rational numbers is countable Rational numbers:

  7. Naive Approach Rational numbers: Correspondence: Positive integers: Doesn’t work: we will never count numbers with nominator 2

  8. Better Approach

  9. Rational Numbers: Correspondence: Positive Integers:

  10. We proved: the set of rational numbers is countable by giving an enumeration procedure

  11. Definition Let be a set of strings An enumeration procedure for is a Turing machine that generates any string of in finite number of steps.

  12. strings Enumeration Machine for output Finite time:

  13. Enumeration Machine Configuration Time 0 Time

  14. Time Time

  15. A set is countable if there is an enumeration procedure for it

  16. Example: The set of all strings is countable. We will describe the enumeration procedure.

  17. Naive procedure: Produce the strings in lexicographic order: Doesn’t work! Strings starting with will never be produced.

  18. Better procedure: Proper Order Produce all strings of length 1 Produce all strings of length 2 Produce all strings of length 2 ..........

  19. Length 1 Produce strings: Length 2 Proper Order Length 3

  20. Theorem: The set of all Turing Machines is countable. Proof: Any Turing machine is a finite string Encoded with a sequence of 0’s and 1’s. Find an enumeration procedure for the set of Turing Machine strings.

  21. Enumeration Procedure: Repeat 1. Generate the next string of 0’s and 1’s in proper order 2. Check if the string defines a Turing Machine if YES: print string on output if NO: ignore string

  22. Uncountable Sets

  23. Definition: A set is uncountable if it is not countable

  24. Theorem: Let be an infinite countable set. The powerset of is uncountable. The power set of naturalnumbershasthe same cardinalityastheset of real numbers. (Usingthe Cantor–Bernstein–Schröder theorem, itis easy toprovethatthereexists a bijectionbetweentheset of reals and the power set of thenaturalnumbers).

  25. Proof: Since is countable, we can write Element of

  26. Elements of the powerset have the form:

  27. We encode each element of the power set with a string of 0’s and 1’s * Encoding Powerset element *Cantor’s diagonal argument

  28. Let’s assume the contrary, that the powerset is countable. We can enumerate the elements of the powerset.

  29. Powerset element Encoding

  30. Take the powerset element whose bits are the complements of the diagonal.

  31. New element: (Diagonal complement)

  32. The new element must be some This is impossible: The i-th bit must be the complement of itself.

  33. We have contradiction! Therefore the powerset is uncountable.

  34. Theorem: Let be an infinite countable set. The powerset of is uncountable.

  35. Application: Languages Alphabet: Set of Strings: infinite and countable Powerset: all languages uncountable

  36. Languages: uncountable Turing machines: countable There are infinitely many more languages than Turing machines!

  37. There are some languages not accepted by Turing Machines. These languages cannot be described by algorithms.

  38. Recursively Enumerable Languagesand Recursive Languages

  39. Definition: A language is recursively enumerable if some Turing machine accepts it.

  40. Let be a recursively enumerable language and be the Turing Machine that accepts it. For a string : if then halts in a final state if then halts in some state or loops forever

  41. Definition: A language is recursive if some Turing machine accepts it and halts on any input string. In other words: A language is recursive if there is a membership algorithm for it

  42. Let be a recursive language and be the Turing Machine that accepts it. For a string : if then halts in a final state. if then halts in a non-final state.

  43. We will prove: 1. There is a specific language which is not recursively enumerable. 2. There is a specific language which is recursively enumerable but not recursive.

  44. Non Recursively Enumerable Recursively Enumerable Recursive

  45. First we prove: • If a language is recursive then • there is an enumeration procedure for it. • A language is recursively enumerable • if and only if • there is an enumeration procedure for it.

More Related