(Algorithms are syntactically approximated; T is a tape, or a row, consisting of n blocs)

Coloured rule 90 garble

*invoke graph and colour libraries
bin k;
int h,i;
int r=1,g=1,b=1;
*create m x n matrix
n=ln(T);
m=count(T);
for h=1 to m
{
for i=1 to n
{
if h=1:
{
val(kh,i)=rand(0,1);
else:
if i=1: val(kh,i)=val(kh-1,i+1);
if i<n: val(kh,i)=XOR(val(kh-1,i-1), val(kh-1,i+1));
if i=n: val(kh,i)=val(kh-1,i-1), 1);
}
}
next i;
}
next h;
*represent the modified m x n matrix on a graph
for h=1 to m
{
for i=1 to n
{
putcolour(kh,i)=RGB(r,g,b)
r=r+1; g=g+1; b=b+1;
}
next i;
}
next h;

Coloured Sierpinksi triangle

*invoke graph and colour libraries
bin k;
int h,i;
int r=1,g=1,b=1;
*create m x n matrix
n=ln(T);
m=count(T);
val(kh/2,1)=1;
for h=2 to m
{
for i=2 to n
{
if i<n: val(kh,i)=XOR(val(kh-1,i-1), val(kh-1,i+1));
if i=n: val(kh,i)=val(kh-1,i-1);
}
next i;
}
next h;
*represent the modified m x n matrix on a graph
for h=1 to m
{
for i=1 to n
{
putcolour(kh,i)=RGB(r,g,b)
r=r+1; g=g+1; b=b+1;
}
next i;
}
next h;

XORsweeper

*invoke graph and colour libraries
bin k;
int h,i;
int a,b;
int r=1,g=1,b=1;
bin g=1;
*create m x n matrix
n=ln(T);
m=count(T);
if g=1: forwardsweep(h,i);
if g=0: reversesweep(h,i);
def forwardsweep(h,i):
{
for h=1 to m
{
for i=1 to n
{
if h=1:
{
val(kh,i)=rand(0,1);
else:
if i=1: val(kh,i)=val(kh-1,i+1);
if i<n: val(kh,i)=XOR(val(kh-1,i-1), val(kh-1,i+1));
if i=n: val(kh,i)=val(kh-1,i-1), 1);
}
}
next i;
colour(h);
}
next h;
return g=0;
}
def reversesweep(h,i):
{
for h=m to 1, h–
{
for i=n to 1, i–
{
if h=1:
{
val(kh,i)=rand(0,1);
else:
if i=1: val(kh,i)=val(kh+1,i+1);
if i<n: val(kh,i)=XOR(val(kh+1,i-1), val(kh+1,i+1));
if i=n: val(kh,i)=val(kh+1,i-1), 1);
}
}
next i;
colour(h);
}
next h;
return g=0;
}
*represent the modified m x n matrix on a graph
def colour(a):
{
for b=1 to n
{
putcolour(ka,b)=RGB(r,g,b)
r=r+1; g=g+1; b=b+1;
}
next i;
return φ;
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s