Click here to Skip to main content
13,253,507 members (67,314 online)
Click here to Skip to main content
Add your own
alternative version

Stats

70.7K views
18 bookmarked
Posted 11 Nov 2002

Turing Machine (C++ Implementation)

, 12 Nov 2002
Rate this:
Please Sign up or sign in to vote.
The C++-program simulates a Turing Machine (TM). TM is defined by input files: metafile, states file, alphabet file, transition file, input word(s) file(s).

Introduction

The C++-program simulates a Turing Machine (TM).
TM is defined by input files: metafile, states file, alphabet file, transition file, input word(s) file(s):

  1. Each row of metafile contains data related to some Turing machine (number of tapes, names of states file, alphabet file, transition file, input word(s) file(s)).
  2. States file contains a list of initial, halting and internal states.
  3. Alphabet contains a list of empty, input and internal symbols.
  4. Each row of transition contains some transition rule.
  5. Each row of input word(s) contains input word for some tape.

A Turing Machine example (Recognition of Palindromes) from 'The Design and Analysis of Computer Algorithms [1976]' by A.V.Aho, J.E.Hopcroft, J.D.Ullman (See examples 1.8, 1.9) is used as a demo sample of Turing Machine.

</li />

    License

    This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Share

    About the Author

    Alex Vinokur
    Web Developer
    Israel Israel
    No Biography provided

    You may also be interested in...

    Comments and Discussions

     
    GeneralAhh Pin
    benjymous13-Nov-02 6:20
    memberbenjymous13-Nov-02 6:20 
    GeneralRe: Ahh Pin
    Alex Vinokur13-Nov-02 7:26
    memberAlex Vinokur13-Nov-02 7:26 
    GeneralRe: Ahh Pin
    benjymous13-Nov-02 7:29
    memberbenjymous13-Nov-02 7:29 
    GeneralRe: Ahh Pin
    Ernesto Perales Soto18-Nov-02 11:56
    memberErnesto Perales Soto18-Nov-02 11:56 
    GeneralRe: Ahh Pin
    Bilby18-Nov-02 22:59
    memberBilby18-Nov-02 22:59 

    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

    Permalink | Advertise | Privacy | Terms of Use | Mobile
    Web01 | 2.8.171114.1 | Last Updated 13 Nov 2002
    Article Copyright 2002 by Alex Vinokur
    Everything else Copyright © CodeProject, 1999-2017
    Layout: fixed | fluid