<s>
In	O
number	O
theory	O
,	O
a	O
branch	O
of	O
mathematics	O
,	O
the	O
special	B-Algorithm
number	I-Algorithm
field	I-Algorithm
sieve	I-Algorithm
(	O
SNFS	B-Algorithm
)	O
is	O
a	O
special-purpose	O
integer	O
factorization	O
algorithm	O
.	O
</s>
<s>
The	O
general	B-Algorithm
number	I-Algorithm
field	I-Algorithm
sieve	I-Algorithm
(	O
GNFS	B-Algorithm
)	O
was	O
derived	O
from	O
it	O
.	O
</s>
<s>
The	O
special	B-Algorithm
number	I-Algorithm
field	I-Algorithm
sieve	I-Algorithm
is	O
efficient	B-General_Concept
for	O
integers	O
of	O
the	O
form	O
re	O
s	O
,	O
where	O
r	O
and	O
s	O
are	O
small	O
(	O
for	O
instance	O
Mersenne	O
numbers	O
)	O
.	O
</s>
<s>
The	O
SNFS	B-Algorithm
has	O
been	O
used	O
extensively	O
by	O
NFSNet	O
(	O
a	O
volunteer	O
distributed	B-Architecture
computing	I-Architecture
effort	O
)	O
,	O
and	O
others	O
to	O
factorise	O
numbers	O
of	O
the	O
Cunningham	O
project	O
;	O
for	O
some	O
time	O
the	O
records	B-Algorithm
for	I-Algorithm
integer	I-Algorithm
factorization	I-Algorithm
have	O
been	O
numbers	O
factored	O
by	O
SNFS	B-Algorithm
.	O
</s>
<s>
The	O
SNFS	B-Algorithm
is	O
based	O
on	O
an	O
idea	O
similar	O
to	O
the	O
much	O
simpler	O
rational	B-Algorithm
sieve	I-Algorithm
;	O
in	O
particular	O
,	O
readers	O
may	O
find	O
it	O
helpful	O
to	O
read	O
about	O
the	O
rational	B-Algorithm
sieve	I-Algorithm
first	O
,	O
before	O
tackling	O
the	O
SNFS	B-Algorithm
.	O
</s>
<s>
The	O
SNFS	B-Algorithm
works	O
as	O
follows	O
.	O
</s>
<s>
As	O
in	O
the	O
rational	B-Algorithm
sieve	I-Algorithm
,	O
the	O
SNFS	B-Algorithm
can	O
be	O
broken	O
into	O
two	O
steps	O
:	O
</s>
<s>
The	O
second	O
step	O
is	O
identical	O
to	O
the	O
case	O
of	O
the	O
rational	B-Algorithm
sieve	I-Algorithm
,	O
and	O
is	O
a	O
straightforward	O
linear	B-Language
algebra	I-Language
problem	O
.	O
</s>
<s>
The	O
first	O
step	O
,	O
however	O
,	O
is	O
done	O
in	O
a	O
different	O
,	O
more	O
efficient	B-General_Concept
way	O
than	O
the	O
rational	B-Algorithm
sieve	I-Algorithm
,	O
by	O
utilizing	O
number	O
fields	O
.	O
</s>
<s>
The	O
factor	O
base	O
in	O
Z	O
,	O
as	O
in	O
the	O
rational	B-Algorithm
sieve	I-Algorithm
case	O
,	O
consists	O
of	O
all	O
prime	O
integers	O
up	O
to	O
some	O
other	O
bound	O
.	O
</s>
<s>
These	O
pairs	O
are	O
found	O
through	O
a	O
sieving	O
process	O
,	O
analogous	O
to	O
the	B-Algorithm
Sieve	I-Algorithm
of	I-Algorithm
Eratosthenes	I-Algorithm
;	O
this	O
motivates	O
the	O
name	O
"	O
Number	B-Algorithm
Field	I-Algorithm
Sieve	I-Algorithm
"	O
.	O
</s>
<s>
Not	O
every	O
number	O
is	O
an	O
appropriate	O
choice	O
for	O
the	O
SNFS	B-Algorithm
:	O
you	O
need	O
to	O
know	O
in	O
advance	O
a	O
polynomial	O
f	O
of	O
appropriate	O
degree	O
(	O
the	O
optimal	O
degree	O
is	O
conjectured	O
to	O
be	O
,	O
which	O
is	O
4	O
,	O
5	O
,	O
or	O
6	O
for	O
the	O
sizes	O
of	O
N	O
currently	O
feasible	O
to	O
factorise	O
)	O
with	O
small	O
coefficients	O
,	O
and	O
a	O
value	O
x	O
such	O
that	O
where	O
N	O
is	O
the	O
number	O
to	O
factorise	O
.	O
</s>
<s>
Numbers	O
defined	O
by	O
linear	O
recurrences	O
,	O
such	O
as	O
the	O
Fibonacci	B-Algorithm
and	O
Lucas	B-Algorithm
numbers	I-Algorithm
,	O
also	O
have	O
SNFS	B-Algorithm
polynomials	O
,	O
but	O
these	O
are	O
a	O
little	O
more	O
difficult	O
to	O
construct	O
.	O
</s>
<s>
If	O
you	O
already	O
know	O
some	O
factors	O
of	O
a	O
large	O
SNFS-number	O
,	O
you	O
can	O
do	O
the	O
SNFS	B-Algorithm
calculation	O
modulo	O
the	O
remaining	O
part	O
;	O
for	O
the	O
NFSNET	O
example	O
above	O
,	O
times	O
a	O
197-digit	O
composite	O
number	O
(	O
the	O
small	O
factors	O
were	O
removed	O
by	O
ECM	B-Algorithm
)	O
,	O
and	O
the	O
SNFS	B-Algorithm
was	O
performed	O
modulo	O
the	O
197-digit	O
number	O
.	O
</s>
<s>
The	O
number	O
of	O
relations	O
required	O
by	O
SNFS	B-Algorithm
still	O
depends	O
on	O
the	O
size	O
of	O
the	O
large	O
number	O
,	O
but	O
the	O
individual	O
calculations	O
are	O
quicker	O
modulo	O
the	O
smaller	O
number	O
.	O
</s>
<s>
This	O
algorithm	O
,	O
as	O
mentioned	O
above	O
,	O
is	O
very	O
efficient	B-General_Concept
for	O
numbers	O
of	O
the	O
form	O
res	O
,	O
for	O
r	O
and	O
s	O
relatively	O
small	O
.	O
</s>
<s>
It	O
is	O
also	O
efficient	B-General_Concept
for	O
any	O
integers	O
which	O
can	O
be	O
represented	O
as	O
a	O
polynomial	O
with	O
small	O
coefficients	O
.	O
</s>
<s>
The	O
reason	O
for	O
this	O
is	O
as	O
follows	O
:	O
The	O
Number	B-Algorithm
Field	I-Algorithm
Sieve	I-Algorithm
performs	O
sieving	O
in	O
two	O
different	O
fields	O
.	O
</s>
