From 85b3c4475e448b5e382eac0d56132388fe71a90d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Guti=C3=A9rrez=20Alonso?= Date: Tue, 8 Dec 2020 11:55:46 +0100 Subject: [PATCH] Renamed folder (data -> Examples) --- {data => Examples}/Example1.tm | 52 +++++++-------- {data => Examples}/Example2.tm | 52 +++++++-------- {data => Examples}/Example3.tm | 70 ++++++++++----------- {data => Examples}/Example4.tm | 72 ++++++++++----------- {data => Examples}/Example5.tm | 112 ++++++++++++++++----------------- 5 files changed, 179 insertions(+), 179 deletions(-) rename {data => Examples}/Example1.tm (92%) rename {data => Examples}/Example2.tm (93%) rename {data => Examples}/Example3.tm (94%) rename {data => Examples}/Example4.tm (93%) rename {data => Examples}/Example5.tm (94%) diff --git a/data/Example1.tm b/Examples/Example1.tm similarity index 92% rename from data/Example1.tm rename to Examples/Example1.tm index b071bae..af1ddb2 100644 --- a/data/Example1.tm +++ b/Examples/Example1.tm @@ -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); \ No newline at end of file diff --git a/data/Example2.tm b/Examples/Example2.tm similarity index 93% rename from data/Example2.tm rename to Examples/Example2.tm index 764da45..b8fdf87 100644 --- a/data/Example2.tm +++ b/Examples/Example2.tm @@ -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); \ No newline at end of file diff --git a/data/Example3.tm b/Examples/Example3.tm similarity index 94% rename from data/Example3.tm rename to Examples/Example3.tm index 863c124..a38b4cc 100644 --- a/data/Example3.tm +++ b/Examples/Example3.tm @@ -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); \ No newline at end of file diff --git a/data/Example4.tm b/Examples/Example4.tm similarity index 93% rename from data/Example4.tm rename to Examples/Example4.tm index 8306bca..816d95d 100644 --- a/data/Example4.tm +++ b/Examples/Example4.tm @@ -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); \ No newline at end of file diff --git a/data/Example5.tm b/Examples/Example5.tm similarity index 94% rename from data/Example5.tm rename to Examples/Example5.tm index 3c73ce8..3673263 100644 --- a/data/Example5.tm +++ b/Examples/Example5.tm @@ -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); \ No newline at end of file