Download presentation

Presentation is loading. Please wait.

Published byDontae Andros Modified over 2 years ago

1
Fall 2006Costas Busch - RPI1 A Universal Turing Machine

2
Fall 2006Costas Busch - RPI2 Turing Machines are hardwired they execute only one program A limitation of Turing Machines: Real Computers are re-programmable

3
Fall 2006Costas Busch - RPI3 Solution: Universal Turing Machine Reprogrammable machine Simulates any other Turing Machine Attributes:

4
Fall 2006Costas Busch - RPI4 Universal Turing Machine simulates any Turing Machine Input of Universal Turing Machine: Description of transitions of Input string of

5
Fall 2006Costas Busch - RPI5 Universal Turing Machine Description of Tape Contents of State of Three tapes Tape 2 Tape 3 Tape 1

6
Fall 2006Costas Busch - RPI6 We describe Turing machine as a string of symbols: We encode as a string of symbols Description of Tape 1

7
Fall 2006Costas Busch - RPI7 Alphabet Encoding Symbols: Encoding:

8
Fall 2006Costas Busch - RPI8 State Encoding States: Encoding: Head Move Encoding Move: Encoding:

9
Fall 2006Costas Busch - RPI9 Transition Encoding Transition: Encoding: separator

10
Fall 2006Costas Busch - RPI10 Turing Machine Encoding Transitions: Encoding: separator

11
Fall 2006Costas Busch - RPI11 Tape 1 contents of Universal Turing Machine: binary encoding of the simulated machine Tape 1

12
Fall 2006Costas Busch - RPI12 A Turing Machine is described with a binary string of 0s and 1s The set of Turing machines forms a language: each string of this language is the binary encoding of a Turing Machine Therefore:

13
Fall 2006Costas Busch - RPI13 Language of Turing Machines L = { 010100101, 00100100101111, 111010011110010101, …… } (Turing Machine 1) (Turing Machine 2) ……

14
Fall 2006Costas Busch - RPI14 Countable Sets

15
Fall 2006Costas Busch - RPI15 Infinite sets are either: Countable or Uncountable

16
Fall 2006Costas Busch - RPI16 Countable set: There is a one to one correspondence of elements of the set to Natural numbers (Positive Integers) (every element of the set is mapped to a number such that no two elements are mapped to same number)

17
Fall 2006Costas Busch - RPI17 Example: Even integers: (positive) The set of even integers is countable Positive integers: Correspondence: corresponds to

18
Fall 2006Costas Busch - RPI18 Example:The set of rational numbers is countable Rational numbers:

19
Fall 2006Costas Busch - RPI19 Naïve Approach Rational numbers: Positive integers: Correspondence: Doesnt work: we will never count numbers with nominator 2: Nominator 1

20
Fall 2006Costas Busch - RPI20 Better Approach

21
Fall 2006Costas Busch - RPI21

22
Fall 2006Costas Busch - RPI22

23
Fall 2006Costas Busch - RPI23

24
Fall 2006Costas Busch - RPI24

25
Fall 2006Costas Busch - RPI25

26
Fall 2006Costas Busch - RPI26 Rational Numbers: Correspondence: Positive Integers:

27
Fall 2006Costas Busch - RPI27 We proved: the set of rational numbers is countable by describing an enumeration procedure (enumerator) for the correspondence to natural numbers

28
Fall 2006Costas Busch - RPI28 Definition An enumerator for is a Turing Machine that generates (prints on tape) all the strings of one by one Let be a set of strings (Language) and each string is generated in finite time

29
Fall 2006Costas Busch - RPI29 Enumerator Machine for Finite time: strings output (on tape)

30
Fall 2006Costas Busch - RPI30 Enumerator Machine Configuration Time 0 Time prints

31
Fall 2006Costas Busch - RPI31 Time prints

32
Fall 2006Costas Busch - RPI32 If for a set there is an enumerator, then the set is countable Observation: The enumerator describes the correspondence of to natural numbers

33
Fall 2006Costas Busch - RPI33 Example: The set of strings is countable We will describe an enumerator for Approach:

34
Fall 2006Costas Busch - RPI34 Naive enumerator: Produce the strings in lexicographic order: Doesnt work: strings starting with will never be produced

35
Fall 2006Costas Busch - RPI35 Better procedure: 1. Produce all strings of length 1 2. Produce all strings of length 2 3. Produce all strings of length 3 4. Produce all strings of length 4.......... Proper Order (Canonical Order)

36
Fall 2006Costas Busch - RPI36 Produce strings in Proper Order: length 2 length 3 length 1

37
Fall 2006Costas Busch - RPI37 Theorem: The set of all Turing Machines is countable Proof: Find an enumeration procedure for the set of Turing Machine strings Any Turing Machine can be encoded with a binary string of 0s and 1s

38
Fall 2006Costas Busch - RPI38 1. Generate the next binary string of 0s and 1s in proper order 2. Check if the string describes a Turing Machine YES: if YES: print string on output tape NO: if NO: ignore string Enumerator: Repeat

39
Fall 2006Costas Busch - RPI39 Binary stringsTuring Machines End of Proof

40
Fall 2006Costas Busch - RPI40 Uncountable Sets

41
Fall 2006Costas Busch - RPI41 We will prove that there is a language which is not accepted by any Turing machine Technique: Turing machines are countable Languages are uncountable (there are more languages than Turing Machines)

42
Fall 2006Costas Busch - RPI42 A set is uncountable if it is not countable Definition: We will prove that there is a language which is not accepted by any Turing machine

43
Fall 2006Costas Busch - RPI43 Theorem: If is an infinite countable set, then the powerset of is uncountable. (the powerset is the set whose elements are all possible sets made from the elements of )

44
Fall 2006Costas Busch - RPI44 Proof: Since is countable, we can write Elements of

45
Fall 2006Costas Busch - RPI45 Elements of the powerset have the form: ……

46
Fall 2006Costas Busch - RPI46 We encode each element of the powerset with a binary string of 0s and 1s Powerset element Binary encoding (in arbitrary order)

47
Fall 2006Costas Busch - RPI47 Observation: Every infinite binary string corresponds to an element of the powerset: Example: Corresponds to:

48
Fall 2006Costas Busch - RPI48 Lets assume (for contradiction) that the powerset is countable Then: we can enumerate the elements of the powerset

49
Fall 2006Costas Busch - RPI49 Powerset element Binary encoding suppose that this is the respective

50
Fall 2006Costas Busch - RPI50 Binary string: (birary complement of diagonal) Take the binary string whose bits are the complement of the diagonal

51
Fall 2006Costas Busch - RPI51 The binary string corresponds to an element of the powerset :

52
Fall 2006Costas Busch - RPI52 Thus, must be equal to some However, the i-th bit in the encoding of is the complement of the bit of, thus: Contradiction!!! i-th

53
Fall 2006Costas Busch - RPI53 Since we have a contradiction: The powerset of is uncountable End of proof

54
Fall 2006Costas Busch - RPI54 An Application: Languages The set of all Strings: infinite and countable Consider Alphabet : (we can enumerate the strings in proper order)

55
Fall 2006Costas Busch - RPI55 The set of all Strings: infinite and countable Any language is a subset of : Consider Alphabet :

56
Fall 2006Costas Busch - RPI56 Consider Alphabet : The set of all Strings: infinite and countable The powerset of contains all languages: uncountable

57
Fall 2006Costas Busch - RPI57 Turing machines: Languages accepted By Turing Machines: accepts Denote: countable Note: countable Consider Alphabet :

58
Fall 2006Costas Busch - RPI58 countable uncountable Languages accepted by Turing machines: All possible languages: Therefore:

59
Fall 2006Costas Busch - RPI59 There is a language not accepted by any Turing Machine: (Language cannot be described by any algorithm) Conclusion:

60
Fall 2006Costas Busch - RPI60 Turing-Acceptable Languages Non Turing-Acceptable Languages

61
Fall 2006Costas Busch - RPI61 Note that: is a multi-set (elements may repeat) since a language may be accepted by more than one Turing machine However, if we remove the repeated elements, the resulting set is again countable since every element still corresponds to a positive integer

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google