<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.formulasearchengine.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=49.249.130.152</id>
	<title>formulasearchengine - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://en.formulasearchengine.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=49.249.130.152"/>
	<link rel="alternate" type="text/html" href="https://en.formulasearchengine.com/wiki/Special:Contributions/49.249.130.152"/>
	<updated>2026-08-11T01:28:11Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.47.0-wmf.7</generator>
	<entry>
		<id>https://en.formulasearchengine.com/w/index.php?title=Law_of_demand&amp;diff=5711</id>
		<title>Law of demand</title>
		<link rel="alternate" type="text/html" href="https://en.formulasearchengine.com/w/index.php?title=Law_of_demand&amp;diff=5711"/>
		<updated>2014-01-17T17:46:01Z</updated>

		<summary type="html">&lt;p&gt;49.249.130.152: /* Assumptions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In [[number theory]], a branch of [[mathematics]], the &#039;&#039;&#039;special number field sieve&#039;&#039;&#039; (SNFS) is a special-purpose [[integer factorization]] algorithm. The [[general number field sieve]] (GNFS) was derived from it.&lt;br /&gt;
&lt;br /&gt;
The special number field sieve is efficient for integers of the form &#039;&#039;r&#039;&#039;&amp;lt;sup&amp;gt;&#039;&#039;e&#039;&#039;&amp;lt;/sup&amp;gt; &amp;amp;plusmn; &#039;&#039;s&#039;&#039;, where &#039;&#039;r&#039;&#039; and &#039;&#039;s&#039;&#039; are small (for instance [[Mersenne number]]s).&lt;br /&gt;
&lt;br /&gt;
[[Heuristic]]ally, its [[Computational complexity theory|complexity]] for factoring an integer &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; is of the form:&amp;lt;ref&amp;gt;{{Citation|last=Pomerance|first=Carl|author-link=Carl Pomerance|date=December 1996|title=A Tale of Two Sieves|periodical=Notices of the AMS|volume=43|issue=12|pages=1473–1485|url=http://www.ams.org/notices/199612/pomerance.pdf}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\exp\left(\left(1+o(1)\right)\left(\tfrac{32}{9}\log n\right)^{1/3}\left(\log\log n\right)^{2/3}\right)=L_n\left[1/3,(32/9)^{1/3}\right]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in [[Big O notation|O]] and [[L-notation]]s.&lt;br /&gt;
&lt;br /&gt;
The SNFS has been used extensively by NFSNet (a volunteer [[distributed computing]] effort), [http://escatter11.fullerton.edu/nfs/ NFS@Home] and others to factorise numbers of the [[Cunningham project]]; for some time the [[Integer factorization records|records for integer factorisation]] have been numbers factored by SNFS.&lt;br /&gt;
&lt;br /&gt;
==Overview of method==&lt;br /&gt;
&lt;br /&gt;
The SNFS is based on an idea similar to the much simpler [[rational sieve]]; in particular, readers may find it helpful to read about the [[rational sieve]] first, before tackling the SNFS.&lt;br /&gt;
&lt;br /&gt;
The SNFS works as follows. Let &#039;&#039;n&#039;&#039; be the integer we want to factor. As in the [[rational sieve]], the SNFS can be broken into two steps:&lt;br /&gt;
*First, find a large number of multiplicative relations among a &#039;&#039;factor base&#039;&#039; of elements of [[Modular arithmetic#Ring of congruence classes|&#039;&#039;&#039;Z&#039;&#039;&#039;/&#039;&#039;n&#039;&#039;&#039;&#039;&#039;Z&#039;&#039;&#039;]], such that the number of multiplicative relations is larger than the number of elements in the factor base.&lt;br /&gt;
*Second, multiply together subsets of these relations in such a way that all the exponents are even, resulting in congruences of the form &#039;&#039;a&#039;&#039;&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&amp;amp;equiv;&#039;&#039;b&#039;&#039;&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; ([[modular arithmetic|mod]] &#039;&#039;n&#039;&#039;). These in turn immediately lead to factorizations of &#039;&#039;n&#039;&#039;: &#039;&#039;n&#039;&#039;=[[greatest common divisor|gcd]](&#039;&#039;a&#039;&#039;+&#039;&#039;b&#039;&#039;,&#039;&#039;n&#039;&#039;)×gcd(&#039;&#039;a&#039;&#039;-&#039;&#039;b&#039;&#039;,&#039;&#039;n&#039;&#039;). If done right, it is almost certain that at least one such factorization will be nontrivial.&lt;br /&gt;
&lt;br /&gt;
The second step is identical to the case of the [[rational sieve]], and is a straightforward [[linear algebra]] problem. The first step, however, is done in a different, more [[algorithmic efficiency|efficient]] way than the rational sieve, by utilizing [[algebraic number field|number fields]].&lt;br /&gt;
&lt;br /&gt;
==Details of method==&lt;br /&gt;
&lt;br /&gt;
Let &#039;&#039;n&#039;&#039; be the integer we want to factor. We pick an [[irreducible polynomial]] &#039;&#039;f&#039;&#039; with integer coefficients, and an integer &#039;&#039;m&#039;&#039; such that &#039;&#039;f&#039;&#039;(&#039;&#039;m&#039;&#039;)&amp;amp;equiv;0 ([[modular arithmetic|mod]] &#039;&#039;n&#039;&#039;) (we will explain how they are chosen in the next section). Let &#039;&#039;&amp;amp;alpha;&#039;&#039; be a [[Root of a function|root]] of &#039;&#039;f&#039;&#039;; we can then form the [[ring (mathematics)|ring]] &#039;&#039;&#039;[[integer|Z]]&#039;&#039;&#039;[&amp;amp;alpha;]. There is a unique [[ring homomorphism]] &amp;amp;phi; from &#039;&#039;&#039;Z&#039;&#039;&#039;[&#039;&#039;&amp;amp;alpha;&#039;&#039;] to [[Modular arithmetic#Ring of congruence classes|&#039;&#039;&#039;Z&#039;&#039;&#039;/n&#039;&#039;&#039;Z&#039;&#039;&#039;]] that maps &#039;&#039;&amp;amp;alpha;&#039;&#039; to &#039;&#039;m&#039;&#039;. For simplicity, we&#039;ll assume that &#039;&#039;&#039;Z&#039;&#039;&#039;[&#039;&#039;&amp;amp;alpha;&#039;&#039;] is a [[unique factorization domain]]; the algorithm can be modified to work when it isn&#039;t, but then there are some additional complications.&lt;br /&gt;
&lt;br /&gt;
Next, we set up two parallel &#039;&#039;factor bases&#039;&#039;, one in &#039;&#039;&#039;Z&#039;&#039;&#039;[&#039;&#039;&amp;amp;alpha;&#039;&#039;] and one in &#039;&#039;&#039;Z&#039;&#039;&#039;. The one in &#039;&#039;&#039;Z&#039;&#039;&#039;[&#039;&#039;&amp;amp;alpha;&#039;&#039;] consists of all the prime  ideals in &#039;&#039;&#039;Z&#039;&#039;&#039;[&#039;&#039;&amp;amp;alpha;&#039;&#039;] whose norm is bounded by a chosen value &amp;lt;math&amp;gt;N_{\max}&amp;lt;/math&amp;gt;. The factor base in &#039;&#039;&#039;Z&#039;&#039;&#039;, as in the rational sieve case, consists of all prime integers up to some other bound.&lt;br /&gt;
&lt;br /&gt;
We then search for [[relatively prime]] pairs of integers (&#039;&#039;a&#039;&#039;,&#039;&#039;b&#039;&#039;) such that:&lt;br /&gt;
*&#039;&#039;a&#039;&#039;+&#039;&#039;bm&#039;&#039; is [[smooth number|smooth]] with respect to the factor base in &#039;&#039;&#039;Z&#039;&#039;&#039; (i.e., it is a product of elements in the factor base).&lt;br /&gt;
*&#039;&#039;a&#039;&#039;+&#039;&#039;b&amp;amp;alpha;&#039;&#039; is smooth with respect to the factor base in &#039;&#039;&#039;Z&#039;&#039;&#039;[&#039;&#039;&amp;amp;alpha;&#039;&#039;]; given how we chose the factor base, this is equivalent to the norm of &#039;&#039;a&#039;&#039;+&#039;&#039;b&amp;amp;alpha;&#039;&#039; being divisible only by primes less than &amp;lt;math&amp;gt;N_{\max}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
These pairs are found through a sieving process, analogous to the [[Sieve of Eratosthenes]]; this motivates the name &amp;quot;Number Field Sieve&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
For each such pair, we can apply the ring homomorphism &amp;amp;phi; to the factorization of &#039;&#039;a&#039;&#039;+&#039;&#039;b&amp;amp;alpha;&#039;&#039;, and we can apply the canonical ring homomorphism from &#039;&#039;&#039;Z&#039;&#039;&#039; to &#039;&#039;&#039;Z&#039;&#039;&#039;/n&#039;&#039;&#039;Z&#039;&#039;&#039; to the factorization of &#039;&#039;a&#039;&#039;+&#039;&#039;bm&#039;&#039;. Setting these equal gives a multiplicative relation among elements of a bigger factor base in &#039;&#039;&#039;Z&#039;&#039;&#039;/n&#039;&#039;&#039;Z&#039;&#039;&#039;, and if we find enough pairs we can proceed to combine the relations and factor &#039;&#039;n&#039;&#039;, as described above.&lt;br /&gt;
&lt;br /&gt;
==Choice of parameters==&lt;br /&gt;
&lt;br /&gt;
Not every number is an appropriate choice for the SNFS: you need to know in advance a polynomial &#039;&#039;f&#039;&#039; of appropriate degree (the optimal degree is conjectured to be &amp;lt;math&amp;gt;\left(3 \frac{\log N}{\log \log N}\right) ^{1/3}&amp;lt;/math&amp;gt;, which is 4, 5, or 6 for the sizes of N currently feasible to factorise) with small coefficients, and a value &#039;&#039;x&#039;&#039; such that &amp;lt;math&amp;gt;f(x) \equiv 0 \pmod N&amp;lt;/math&amp;gt; where N is the number to factorise.  There is an extra condition: &#039;&#039;x&#039;&#039; must satisfy &amp;lt;math&amp;gt;ax+b \equiv 0 \pmod N&amp;lt;/math&amp;gt; for a and b no bigger than &amp;lt;math&amp;gt;N^{1/d}&amp;lt;/math&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
One set of numbers for which such polynomials exist are the &amp;lt;math&amp;gt;a^b \pm 1&amp;lt;/math&amp;gt; numbers from the [[Cunningham project|Cunningham tables]]; for example, when NFSNET factored 3^479+1, they used the polynomial x^6+3 with x=3^80, since (3^80)^6+3 = 3^480+3, and &amp;lt;math&amp;gt;3^{480}+3 \equiv 0 \pmod {3^{479}+1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Numbers defined by linear recurrences, such as the [[Fibonacci number|Fibonacci]] and [[Lucas number|Lucas]] numbers, also have SNFS polynomials, but these are a little more difficult to construct. For example, &amp;lt;math&amp;gt;F_{709}&amp;lt;/math&amp;gt; has polynomial &amp;lt;math&amp;gt;n^5 + 10n^3 + 10n^2 + 10n + 3&amp;lt;/math&amp;gt;, and the value of &#039;&#039;x&#039;&#039; satisfies &amp;lt;math&amp;gt;F_{142} x - F_{141} = 0&amp;lt;/math&amp;gt;.&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  | last = Franke&lt;br /&gt;
  | first = Jens&lt;br /&gt;
  | title = Installation notes for ggnfs-lasieve4&lt;br /&gt;
  | url=http://stuff.mit.edu/afs/sipb/project/pari-gp/ggnfs/Linux/src/lasieve4/INSTALL.and.USE&lt;br /&gt;
  | publisher =[[MIT]] Massachusetts Institute of Technology}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you already know some factors of a large SNFS-number, you can do the SNFS calculation modulo the remaining part; for the NFSNET example above, 3^479+1 = (4*158071*7167757*7759574882776161031) times a 197-digit composite number (the small factors were removed by [[elliptic curve method|ECM]]), and the SNFS was performed modulo the 197-digit number.  The number of relations required by SNFS still depends on the size of the large number, but the individual calculations are quicker modulo the smaller number.&lt;br /&gt;
&lt;br /&gt;
==Limitations of algorithm==&lt;br /&gt;
&lt;br /&gt;
This algorithm, as mentioned above, is very efficient for numbers of the form &#039;&#039;r&#039;&#039;&amp;lt;sup&amp;gt;&#039;&#039;e&#039;&#039;&amp;lt;/sup&amp;gt;&amp;amp;plusmn;&#039;&#039;s&#039;&#039;, for &#039;&#039;r&#039;&#039; and &#039;&#039;s&#039;&#039; relatively small. It is also efficient for any integers which can be represented as a polynomial with small coefficients.  This includes integers of the more general form &#039;&#039;a&#039;&#039;&#039;&#039;r&#039;&#039;&amp;lt;sup&amp;gt;&#039;&#039;e&#039;&#039;&amp;lt;/sup&amp;gt;&amp;amp;plusmn;&#039;&#039;b&#039;&#039;&#039;&#039;s&#039;&#039;&amp;lt;sup&amp;gt;&#039;&#039;f&#039;&#039;&amp;lt;/sup&amp;gt;, and also for many integers whose binary representation has low Hamming weight.  The reason for this is as follows: The Number Field Sieve performs sieving in two different fields.&lt;br /&gt;
The first field is usually the rationals. The second is a higher degree field.  The efficiency of the algorithm strongly depends on the norms of certain elements in these fields.  When an integer can be represented as a polynomial with small coefficients, the norms that arise are much smaller than those that arise when an integer is represented by a general polynomial.  The reason is that a general polynomial will have much larger coefficients, and the norms will be correspondingly larger.  The algorithm attempts to factor these norms over a fixed set of prime numbers.  When the&lt;br /&gt;
norms are smaller, these numbers are more likely to factor.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[General number field sieve]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
{{reflist}}&lt;br /&gt;
&lt;br /&gt;
==Further reading==&lt;br /&gt;
*{{Citation |last=Byrnes |first=Steven |lastauthoramp= |date=May 18, 2005 |title=The Number Field Sieve |journal=Math 129 |volume= |issue= |pages= |url=http://modular.fas.harvard.edu/129-05/final_papers/Steve_Byrnes.pdf |issn= }}&lt;br /&gt;
*{{Citation |doi=10.1090/S0025-5718-1993-1182953-4 |last=Lenstra |first=A. K. |authorlink=Arjen Lenstra |last2=Lenstra |first2=H. W., Jr. |authorlink2=Hendrik Lenstra |last3=Manasse |first3=M. S. |last4=Pollard |first4=J. M. |lastauthoramp=yes |year=1993 |title=The Factorization of the Ninth Fermat Number |journal=Mathematics of Computation |volume=61 |issue=203 |pages=319–349 |url=http://www.std.org/~msm/common/f9paper.ps |issn= }}&lt;br /&gt;
*{{citation |editor-last=Lenstra |editor-first=A. K. |editor2-last=Lenstra |editor2-first=H. W., Jr. |title=The Development of the Number Field Sieve |series=Lecture Notes in Mathematics |volume=1554 |year=1993 |publisher=Springer-Verlag |location=New York |isbn=3-540-57013-6 |pages= |url= }}&lt;br /&gt;
*{{citation |last=Silverman |first=Robert D.  |title=Optimal Parameterization of SNFS |journal=J. Mathematical Cryptology |volume=1 |year=2007 |publisher=de Gruyter  |pages= 105–124 |doi=10.1515/JMC.2007.007}}&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* http://www.nfsnet.org/&lt;br /&gt;
&lt;br /&gt;
{{number theoretic algorithms}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Integer factorization algorithms]]&lt;/div&gt;</summary>
		<author><name>49.249.130.152</name></author>
	</entry>
</feed>