This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: DISCRETE MATHEMATICS W W L CHEN c W W L Chen, 1991, 2008. This chapter is available free to all individuals, on the understanding that it is not to be used for financial gain, and may be downloaded and/or photocopied, with or without permission from the author. However, this document may not be kept on any information storage and retrieval system without permission from the author, unless such system is not accessible to any individuals other than its owners. Chapter 8 TURING MACHINES 8.1. Introduction A Turing machine is a machine that exists only in the mind. It can be thought of as an extended and modified version of a finite state machine. Imagine a machine which moves along an infinitely long tape which has been divided into boxes, each marked with an element of a finite alphabet A . Also, at any stage, the machine can be in any of a finite number of states, while at the same time positioned at one of the boxes. Now, depending on the element of A in the box and depending on the state of the machine, we have the following: The machine either leaves the element of A in the box unchanged, or replaces it with another element of A . The machine then moves to one of the two neighbouring boxes. The machine either remains in the same state, or changes to one of the other states. The behaviour of the machine is usually described by a table. Example 8.1.1. Suppose that A = { , 1 , 2 , 3 } , and that we have the situation below: 5 ... 003211 ... Here the diagram denotes that the Turing machine is positioned at the box with entry 3 and that it is in state 5. We can now study the table which describes the bahaviour of the machine. In the table below, the column on the left represents the possible states of the Turing machine, while the row at the top Chapter 8 : Turing Machines page 1 of 9 Discrete Mathematics c W W L Chen, 1991, 2008 represents the alphabet ( i.e. the entries in the boxes): 1 2 3 . . . 5 1 L 2 . . . The information 1 L 2 can be interpreted in the following way: The machine replaces the digit 3 by the digit 1 in the box, moves one position to the left, and changes to state 2. We now have the following situation: 2 ... 001211 ... We may now ask when the machine will halt. The simple answer is that the machine may not halt at all. However, we can halt it by sending it to a nonexistent state. Example 8.1.2. Suppose that A = { , 1 } , and that we have the situation below: 2 ... 001011 ... Suppose further that the behaviour of the Turing machine is described by the table below: 1 1 R 1 R 4 1 R 3 R 2 1 R 3 1 R 1 3 L 1 1 L 2 Then the following happens successively: 3 ... 011011 ... 2 ... 011011 ... 1 ... 011011 ......
View
Full
Document
This note was uploaded on 12/20/2009 for the course MATH 245 taught by Professor ramaswamy during the Spring '08 term at San Diego State.
 Spring '08
 RAMASWAMY
 Math

Click to edit the document details