Click here to Skip to main content
Licence CPOL
First Posted 11 Nov 2002
Views 52,860
Downloads 0
Bookmarked 18 times

Turing Machine (C++ Implementation)

By | 12 Nov 2002 | Article
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.

License

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

About the Author

Alex Vinokur

Web Developer

Israel Israel

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralAhh Pinmemberbenjymous5:20 13 Nov '02  
GeneralRe: Ahh PinmemberAlex Vinokur6:26 13 Nov '02  
GeneralRe: Ahh Pinmemberbenjymous6:29 13 Nov '02  
GeneralRe: Ahh PinmemberErnesto Perales Soto10:56 18 Nov '02  
GeneralRe: Ahh PinmemberBilby21:59 18 Nov '02  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    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 | Mobile
Web04 | 2.5.120517.1 | Last Updated 13 Nov 2002
Article Copyright 2002 by Alex Vinokur
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid