Index of /~sudheer/dnaCA
Name Last modified Size Description
Parent Directory -
Action.cpp 04-Jun-2005 22:49 42K
README 05-Mar-2005 00:32 2.5K
a.out 04-Jun-2005 22:49 79K
index.html.backup 06-Jun-2005 23:14 1.5K
input 06-May-2005 20:00 4.3K
make 05-Mar-2005 00:32 91
rule.cpp 03-May-2005 02:10 782
rule.input 03-May-2005 02:07 9
screenshots/ 26-May-2005 00:33 -
screenshots_new/ 05-Jun-2005 01:05 -
tn/ 26-May-2005 00:04 -
--------------------------------
SOURCE CODE AND COMPILATION
----------------------------------
The file for source code is Action.cpp, written in C++. It uses Xlib. It can be compiled using
the command :
g++ -O -Wall -Wno-deprecated -g Action.cpp -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lm
-------------------------------------
RUN
------------------------------------
To run the code just type :
./a.out input_file_name
-----------------------------------------
SAMPLE INPUT FILES
-----------------------------------------
There are a few input sample files in this directory:
input.a.dir
Turing machine makes only 1 directional motion changing the color on the tape as it passes by.
input.bi.dir
Turing machine just moves forward-backward doing nothing.
input.counter_base2.2
Turing machine does counting in base 2. Its just a 2-digit counter.
input.counter_base3.2
Turing machine does counting in base 3. Its just a 2-digit counter.
input.univ
Universal turing machine with 2 states and 5-symbols (given by S.Wolfram).
----------------------------------------------------
HOW TO MAKE YOUR OWN INPUT FILE ???
----------------------------------------------------
First line is No. of head molecules.
Then you specify each head molecule in the following way:
1st strand of head-molecule in 5' to 3' direction.
2nd strand of head-molecule in 3' to 5' direction.
Offset of the 2nd strand wrt the 1st strand, from the left.
-1 to show that the head molecule is free from one end.
You repeat this for all the head-molecules.
Then No. of symbol molecules.
Then you specify each symbol molecule in the following way:
1st strand of symbol molecule in 5' to 3' direction.
2nd strand of symbol molecule in 3' to 5' direction.
Offset of the 2nd strand wrt the 1st strand, from the left.
-1 to show that the symbol molecule is free from the other end.
You repeat this for all the symbol molecules.
Then No. of freely floating molecules.
Then you specify each floating molecule in the following way:
1st strand of floating molecule in 5' to 3' direction.
2nd strand in 5' to 3' direction.
Offset of the 2nd strand wrt the 1st strand, from the left.
Number of instances of this molecule available.
You repeat this for all the floating molecules.
It should be noted that among the floating molecules, the assisting molecules remain same for
any turing machine. The floating molecules that need to be changed are the rule molecules
(Refer to the manual on how to construct the rule molecules. Available with this package.)