Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Turing Machines. 2 A Turing Machine...... Tape Read-Write head Control Unit.

Similar presentations


Presentation on theme: "1 Turing Machines. 2 A Turing Machine...... Tape Read-Write head Control Unit."— Presentation transcript:

1 1 Turing Machines

2 2 A Turing Machine Tape Read-Write head Control Unit

3 3 The Tape Read-Write head No boundaries -- infinite length The head moves Left or Right

4 Read-Write head The head at each time step: 1. Reads a symbol 2. Writes a symbol 3. Moves Left or Right

5 Example: Time Time 1 1. Reads 2. Writes 3. Moves Left

6 Time Time 2 1. Reads 2. Writes 3. Moves Right

7 7 The Input String Blank symbol head Head starts at the leftmost position of the input string Input string

8 Blank symbol head Input string Remark: the input string is never empty

9 9 States & Transitions Read Write Move Left Move Right

10 10 Example: Time 1 current state

11 Time Time 2

12 Time Time 2 Example:

13 Time Time 2 Example:

14 14 Determinism Allowed Not Allowed No lambda transitions allowed Turing Machines are deterministic

15 15 Partial Transition Function Example: No transition for input symbol Allowed:

16 16 Halting The machine halts if there are no possible transitions to follow

17 17 Example: No possible transition HALT!!!

18 18 Final States Allowed Not Allowed Final states have no outgoing transitions In a final state the machine halts

19 19 Acceptance Accept Input If machine halts in a final state Reject Input If machine halts in a non-final state or If machine enters an infinite loop

20 20 Turing Machine Example A Turing machine that accepts the language:

21 21 Time 0

22 22 Time 1

23 23 Time 2

24 24 Time 3

25 25 Time 4 Halt & Accept

26 26 Rejection Example Time 0

27 27 Time 1 No possible Transition Halt & Reject

28 28 Infinite Loop Example A Turing machine for language

29 29 Time 0

30 30 Time 1

31 31 Time 2

32 32 Time 2 Time 3 Time 4 Time 5 Infinite loop

33 33 Because of the infinite loop: The final state cannot be reached The machine never halts The input is not accepted

34 34 Another Turing Machine Example Turing machine for the language

35 35 Time 0

36 36 Time 1

37 37 Time 2

38 38 Time 3

39 39 Time 4

40 40 Time 5

41 41 Time 6

42 42 Time 7

43 43 Time 8

44 44 Time 9

45 45 Time 10

46 46 Time 11

47 47 Time 12

48 48 Halt & Accept Time 13

49 49 If we modify the machine for the language we can easily construct a machine for the language Observation:

50 50 Formal Definitions for Turing Machines

51 51 Transition Function

52 52 Transition Function

53 53 Turing Machine: States Input alphabet Tape alphabet Transition function Initial state blank Final states

54 54

55 Assignment (10%) Form a group consist <= 4 members. Find the implementation/usage/ function/benefit of: 1.FA/NFA 2.Content Free Language/Grammar 3.Pushdown Automata 4.Turing Machine Due date: during next week class 55


Download ppt "1 Turing Machines. 2 A Turing Machine...... Tape Read-Write head Control Unit."

Similar presentations


Ads by Google