<s>
Sierpiński	B-Algorithm
curves	I-Algorithm
are	O
a	O
recursively	O
defined	O
sequence	O
of	O
continuous	O
closed	O
plane	O
fractal	B-Algorithm
curves	I-Algorithm
discovered	O
by	O
Wacław	O
Sierpiński	O
,	O
which	O
in	O
the	O
limit	O
completely	O
fill	O
the	O
unit	O
square	O
:	O
thus	O
their	O
limit	O
curve	O
,	O
also	O
called	O
the	O
Sierpiński	B-Algorithm
curve	I-Algorithm
,	O
is	O
an	O
example	O
of	O
a	O
space-filling	B-Algorithm
curve	I-Algorithm
.	O
</s>
<s>
Because	O
the	O
Sierpiński	B-Algorithm
curve	I-Algorithm
is	O
space-filling	O
,	O
its	O
Hausdorff	O
dimension	O
(	O
in	O
the	O
limit	O
)	O
is	O
.	O
</s>
<s>
The	O
Sierpiński	B-Algorithm
curve	I-Algorithm
is	O
useful	O
in	O
several	O
practical	O
applications	O
because	O
it	O
is	O
more	O
symmetrical	O
than	O
other	O
commonly	O
studied	O
space-filling	B-Algorithm
curves	I-Algorithm
.	O
</s>
<s>
For	O
example	O
,	O
it	O
has	O
been	O
used	O
as	O
a	O
basis	O
for	O
the	O
rapid	O
construction	O
of	O
an	O
approximate	O
solution	O
to	O
the	O
Travelling	B-Algorithm
Salesman	I-Algorithm
Problem	I-Algorithm
(	O
which	O
asks	O
for	O
the	O
shortest	O
sequence	O
of	O
a	O
given	O
set	O
of	O
points	O
)	O
:	O
The	O
heuristic	O
is	O
simply	O
to	O
visit	O
the	O
points	O
in	O
the	O
same	O
sequence	O
as	O
they	O
appear	O
on	O
the	O
Sierpiński	B-Algorithm
curve	I-Algorithm
.	O
</s>
<s>
A	O
space-filling	B-Algorithm
curve	I-Algorithm
is	O
a	O
continuous	O
map	O
of	O
the	O
unit	O
interval	O
onto	O
a	O
unit	O
square	O
and	O
so	O
a	O
(	O
pseudo	O
)	O
inverse	O
maps	O
the	O
unit	O
square	O
to	O
the	O
unit	O
interval	O
.	O
</s>
<s>
Here	O
is	O
a	O
function	O
coded	O
in	O
Java	O
that	O
will	O
compute	O
the	O
relative	O
position	O
of	O
any	O
point	O
on	O
the	O
Sierpiński	B-Algorithm
curve	I-Algorithm
(	O
that	O
is	O
,	O
a	O
pseudo-inverse	O
value	O
)	O
.	O
</s>
<s>
The	O
Sierpiński	B-Algorithm
curve	I-Algorithm
can	O
be	O
expressed	O
by	O
a	O
rewrite	O
system	O
(	O
L-system	B-Language
)	O
.	O
</s>
<s>
Here	O
,	O
both	O
F	O
and	O
G	O
mean	O
“	O
draw	O
forward	O
”	O
,	O
+	O
means	O
“	O
turn	O
left	O
45°	O
”	O
,	O
and	O
−	O
means	O
“	O
turn	O
right	O
45°	O
”	O
(	O
see	O
turtle	B-Application
graphics	I-Application
)	O
.	O
</s>
<s>
The	O
Sierpiński	O
arrowhead	O
curve	O
is	O
a	O
fractal	B-Algorithm
curve	I-Algorithm
similar	O
in	O
appearance	O
and	O
identical	O
in	O
limit	O
to	O
the	O
Sierpiński	O
triangle	O
.	O
</s>
<s>
An	O
alternate	O
constriction	O
is	O
given	O
in	O
the	O
article	O
on	O
the	O
de	B-Algorithm
Rham	I-Algorithm
curve	I-Algorithm
:	O
one	O
uses	O
the	O
same	O
technique	O
as	O
the	O
de	B-Algorithm
Rham	I-Algorithm
curves	I-Algorithm
,	O
but	O
instead	O
of	O
using	O
a	O
binary	O
(	O
base-2	O
)	O
expansion	O
,	O
one	O
uses	O
a	O
ternary	O
(	O
base-3	O
)	O
expansion	O
.	O
</s>
<s>
The	O
Sierpiński	O
arrowhead	O
curve	O
can	O
be	O
expressed	O
by	O
a	O
rewrite	O
system	O
(	O
L-system	B-Language
)	O
.	O
</s>
<s>
Here	O
,	O
F	O
means	O
“	O
draw	O
forward	O
”	O
,	O
+	O
means	O
“	O
turn	O
left	O
60°	O
”	O
,	O
and	O
−	O
means	O
“	O
turn	O
right	O
60°	O
”	O
(	O
see	O
turtle	B-Application
graphics	I-Application
)	O
.	O
</s>
