Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
Renamed folder (data -> Examples)
Browse files Browse the repository at this point in the history
  • Loading branch information
margual56 committed Dec 8, 2020
1 parent 8476b4d commit 85b3c44
Show file tree
Hide file tree
Showing 5 changed files with 179 additions and 179 deletions.
52 changes: 26 additions & 26 deletions data/Example1.tm → Examples/Example1.tm
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
{q011101111};

#define F = {f};

(q0, 1, 0, R, q1);

(q1, 1, 1, R, q1);
(q1, 0, 0, R, q2);//1

(q2, 0, 1, L, q3);
(q2, 1, 1, R, q2);

(q3, 1, 0, L ,q4);

(q4, 1, 1, L, q4);
(q4, 0, 0, L, q5);//2

(q5, 1, 1, L, q5);
(q5, 0, 0, R, q0);

(q0, 0, 0, R, q6);//3

(q6, 0, 0, R, q6);
(q6, 1, 0, H, f);//4

(f, 0, 0, H, f);
{q011101111};

#define F = {f};

(q0, 1, 0, R, q1);

(q1, 1, 1, R, q1);
(q1, 0, 0, R, q2);//1

(q2, 0, 1, L, q3);
(q2, 1, 1, R, q2);

(q3, 1, 0, L ,q4);

(q4, 1, 1, L, q4);
(q4, 0, 0, L, q5);//2

(q5, 1, 1, L, q5);
(q5, 0, 0, R, q0);

(q0, 0, 0, R, q6);//3

(q6, 0, 0, R, q6);
(q6, 1, 0, H, f);//4

(f, 0, 0, H, f);
(f, 1, 1, H, f);
52 changes: 26 additions & 26 deletions data/Example2.tm → Examples/Example2.tm
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
//Number x2

{p01111};

#deq0ine F = {q0};

(p0, 1, 0, R, p1);
(p0, 0, 0, L, p5);

//Move to the end of the number
(p1, 1, 1, R, p1);
(p1, 0, 0, R, p2);

(p2, 1, 1, R, p2);
(p2, 0, 1, L, p3);

(p3, 1, 1, L, p3);
(p3, 0, 0, L, p4);

(p4, 1, 1, L, p4);
(p4, 0, 1, R, p0);

(p5, 1, 1, L, p5);
(p5, 0, 0, R, q0);

(q0, 0, 0, H, q0);
//Number x2

{p01111};

#deq0ine F = {q0};

(p0, 1, 0, R, p1);
(p0, 0, 0, L, p5);

//Move to the end of the number
(p1, 1, 1, R, p1);
(p1, 0, 0, R, p2);

(p2, 1, 1, R, p2);
(p2, 0, 1, L, p3);

(p3, 1, 1, L, p3);
(p3, 0, 0, L, p4);

(p4, 1, 1, L, p4);
(p4, 0, 1, R, p0);

(p5, 1, 1, L, p5);
(p5, 0, 0, R, q0);

(q0, 0, 0, H, q0);
(q0, 1, 1, H, q0);
70 changes: 35 additions & 35 deletions data/Example3.tm → Examples/Example3.tm
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
{0q01110111100}; //(x, y)

#define F = {f};

//Search for the separator
(q0, 1, 1, R, q0);
(q0, 0, 0, R, q1);

//Go to the end of y
(q1, 1, 1, R, q1);
(q1, 0, 0, L, q2);

//Substracting 1 from y
(q2, 1, 0, L, q3);

//If there is no more y, we stop
(q2, 0, 0, H, f);

//Find the separator
(q3, 1, 1, L, q3);
(q3, 0, 0, L, q4);

//Go to the beginning of x
(q4, 1, 1, L, q4);
(q4, 0, 0, R, q5);

//Start all over again
(q5, 1, 0, R, q0);
(q5, 0, 0, R, q6); //This means that x>y

//Find all the ones and delete them
(q6, 1, 0, R, q6);
(q6, 0, 0, H, f);

(f, 0, 0, H, f);
{0q01110111100}; //(x, y)

#define F = {f};

//Search for the separator
(q0, 1, 1, R, q0);
(q0, 0, 0, R, q1);

//Go to the end of y
(q1, 1, 1, R, q1);
(q1, 0, 0, L, q2);

//Substracting 1 from y
(q2, 1, 0, L, q3);

//If there is no more y, we stop
(q2, 0, 0, H, f);

//Find the separator
(q3, 1, 1, L, q3);
(q3, 0, 0, L, q4);

//Go to the beginning of x
(q4, 1, 1, L, q4);
(q4, 0, 0, R, q5);

//Start all over again
(q5, 1, 0, R, q0);
(q5, 0, 0, R, q6); //This means that x>y

//Find all the ones and delete them
(q6, 1, 0, R, q6);
(q6, 0, 0, H, f);

(f, 0, 0, H, f);
(f, 1, 1, H, f);
72 changes: 36 additions & 36 deletions data/Example4.tm → Examples/Example4.tm
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
//SUMATORY FROM 1 TO X

{q01111};

#define F = {f};

//Eliminate the first one
(q0, 1, 0, R, q1);

//Slip a one
(q1, 1, 1, R, q2);

//STOP
(q1, 0, 0, H, f);

//Leave a mark
(q2, 1, 0, R, q3);
(q2, 0, 0, R, q1);

//Go to the end of x
(q3, 1, 1, R, q3);
(q3, 0, 0, R, q4);

//Go to the end and add 1
(q4, 0, 1, L, q5);
(q4, 1, 1, R, q4);

//Go to the separator
(q5, 1, 1, L, q5);
(q5, 0, 0, L, q6);

//Search for the mark, remove it and start over
(q6, 1, 1, L, q6);
(q6, 0, 1, R, q2);

(f, 0, 0, H, f);
//SUMATORY FROM 1 TO X

{q01111};

#define F = {f};

//Eliminate the first one
(q0, 1, 0, R, q1);

//Slip a one
(q1, 1, 1, R, q2);

//STOP
(q1, 0, 0, H, f);

//Leave a mark
(q2, 1, 0, R, q3);
(q2, 0, 0, R, q1);

//Go to the end of x
(q3, 1, 1, R, q3);
(q3, 0, 0, R, q4);

//Go to the end and add 1
(q4, 0, 1, L, q5);
(q4, 1, 1, R, q4);

//Go to the separator
(q5, 1, 1, L, q5);
(q5, 0, 0, L, q6);

//Search for the mark, remove it and start over
(q6, 1, 1, L, q6);
(q6, 0, 1, R, q2);

(f, 0, 0, H, f);
(f, 1, 1, H, f);
112 changes: 56 additions & 56 deletions data/Example5.tm → Examples/Example5.tm
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
//SUMATORY FROM 1 TO X

{q01111};

#define F = {f};

//Eliminate the first one
(q0, 1, 0, R, q1);

//Slip a one
(q1, 1, 1, R, q2);

//STOP
(q1, 0, 0, R, r0);

//Leave a mark
(q2, 1, 0, R, q3);
(q2, 0, 0, R, q1);

//Go to the end of x
(q3, 1, 1, R, q3);
(q3, 0, 0, R, q4);

//Go to the end and add 1
(q4, 0, 1, L, q5);
(q4, 1, 1, R, q4);

//Go to the separator
(q5, 1, 1, L, q5);
(q5, 0, 0, L, q6);

//Search for the mark, remove it and start over
(q6, 1, 1, L, q6);
(q6, 0, 1, R, q2);

//Move all the ones together

//Move to the end of the numbers
(r0, 0, 0, R, r1);
(r0, 1, 1, R, r0);
(r1, 0, 0, R, r2);
(r1, 1, 1, R, r0);

//Go to the beggining of the last number
(r2, 0, 0, L, r2);
(r2, 1, 1, L, r3);
(r3, 1, 1, L, r3);

//Replace the spacing with a 1 and go right to delete the first one
(r3, 0, 1, R, r4);
(r4, 1, 0, R, r0); //And repeat

//Check if finished
(r4, 0, 0, H, f);

(f, 0, 0, H, f);
//SUMATORY FROM 1 TO X

{q01111};

#define F = {f};

//Eliminate the first one
(q0, 1, 0, R, q1);

//Slip a one
(q1, 1, 1, R, q2);

//STOP
(q1, 0, 0, R, r0);

//Leave a mark
(q2, 1, 0, R, q3);
(q2, 0, 0, R, q1);

//Go to the end of x
(q3, 1, 1, R, q3);
(q3, 0, 0, R, q4);

//Go to the end and add 1
(q4, 0, 1, L, q5);
(q4, 1, 1, R, q4);

//Go to the separator
(q5, 1, 1, L, q5);
(q5, 0, 0, L, q6);

//Search for the mark, remove it and start over
(q6, 1, 1, L, q6);
(q6, 0, 1, R, q2);

//Move all the ones together

//Move to the end of the numbers
(r0, 0, 0, R, r1);
(r0, 1, 1, R, r0);
(r1, 0, 0, R, r2);
(r1, 1, 1, R, r0);

//Go to the beggining of the last number
(r2, 0, 0, L, r2);
(r2, 1, 1, L, r3);
(r3, 1, 1, L, r3);

//Replace the spacing with a 1 and go right to delete the first one
(r3, 0, 1, R, r4);
(r4, 1, 0, R, r0); //And repeat

//Check if finished
(r4, 0, 0, H, f);

(f, 0, 0, H, f);
(f, 1, 1, H, f);

0 comments on commit 85b3c44

Please sign in to comment.