{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

MATH 245 CH8 - DISCRETE MATHEMATICS W W L CHEN c W W L Chen...

Info icon This preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
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 = { 0 , 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
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Discrete Mathematics c W W L Chen, 1991, 2008 represents the alphabet ( i.e. the entries in the boxes): 0 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 non-existent state. Example 8.1.2. Suppose that A = { 0 , 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: 0 1 0 1 R 0 1 R 4 1 0 R 3 0 R 0 2 1 R 3 1 R 1 3 0 L 1 1 L 2 Then the following happens successively: 3 . . . 011011 . . . 2 . . . 011011 . . . 1 . . . 011011 . . . 0 . . . 010011 . . . Chapter 8 : Turing Machines page 2 of 9
Image of page 2
Discrete Mathematics c W W L Chen, 1991, 2008 0 . . . 010111 . . . 4 . . . 010111 . . . The Turing machine now halts. On the other hand, suppose that we start from the situation below: 3 . . . 001011 . . .
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern