<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5 plus MathML//EN" "http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_mathml.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="id2389047">
  <name>Timing of the Lindsey-Fox  Algorithm</name>
  <metadata>
  <md:version>1.6</md:version>
  <md:created>2007/09/03 22:06:42 GMT-5</md:created>
  <md:revised>2008/02/20 22:13:11.512 US/Central</md:revised>
  <md:authorlist>
      <md:author id="cburrus">
      <md:firstname>C.</md:firstname>
      <md:othername>Sidney</md:othername>
      <md:surname>Burrus</md:surname>
      <md:email>csb@rice.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist>
    <md:maintainer id="cburrus">
      <md:firstname>C.</md:firstname>
      <md:othername>Sidney</md:othername>
      <md:surname>Burrus</md:surname>
      <md:email>csb@rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist>
    <md:keyword>factor</md:keyword>
    <md:keyword>polynomial</md:keyword>
    <md:keyword>root</md:keyword>
    <md:keyword>timing of factoring</md:keyword>
    <md:keyword>zero</md:keyword>
  </md:keywordlist>

  <md:abstract>Timing of the factoring of polynomials with the Lindsey-Fox algorithm.</md:abstract>
</metadata>
  <content>
    <section id="id-180261868634">
      <name>Timings</name>
      <para id="id6319971">A large number of polynomials with random coefficients were factored with the <cnxn document="m15573"> Lindsey-Fox</cnxn> program on a 2.6 MHz Pentium with 1 GB RAM in August 2003. The following table shows the average time required for different polynomial degrees.   The first column is the polynomial length (degree plus one), the second column is the time in seconds required by Matlab using "roots", and the third column is the time in seconds using the Lindsey-Fox program "lroots" written in Matlab.  The polynomial coefficients were random numbers generated by Matlab.</para>
      <table id="id6319978">
        <tgroup cols="3">
          <colspec colnum="1" colname="c1"/>
          <colspec colnum="2" colname="c2"/>
          <colspec colnum="3" colname="c3"/>
          <tbody>
            <row>
              <entry>Polynomial Degree</entry>
              <entry>Time using roots()</entry>
              <entry>Time using lroots()</entry>
            </row>
            <row>
              <entry>50</entry>
              <entry>0.004</entry>
              <entry>0.04</entry>
            </row>
            <row>
              <entry>100</entry>
              <entry>0.020</entry>
              <entry>0.06</entry>
            </row>
            <row>
              <entry>200</entry>
              <entry>0.140</entry>
              <entry>0.10</entry>
            </row>
            <row>
              <entry>500</entry>
              <entry>3.110</entry>
              <entry>0.23</entry>
            </row>
            <row>
              <entry>1,000</entry>
              <entry>24.750</entry>
              <entry>0.50</entry>
            </row>
            <row>
              <entry>2,000</entry>
              <entry>250.740</entry>
              <entry>1.20</entry>
            </row>
            <row>
              <entry>5,000</entry>
              <entry>13,891.000</entry>
              <entry>6.34</entry>
            </row>
            <row>
              <entry>6,000</entry>
              <entry>"Out of memory"</entry>
              <entry>7.49</entry>
            </row>
            <row>
              <entry>10,000</entry>
              <entry>"Out of memory"</entry>
              <entry>21.45</entry>
            </row>
            <row>
              <entry>100,000</entry>
              <entry>"Out of memory"</entry>
              <entry>1,769.00</entry>
            </row>
            <row>
              <entry>150,000</entry>
              <entry>"Out of memory"</entry>
              <entry>4,822.00</entry>
            </row>
            <row>
              <entry>250,000</entry>
              <entry>"Out of memory"</entry>
              <entry>9,875.00</entry>
            </row>
            <row>
              <entry>500,000</entry>
              <entry>"Out of memory"</entry>
              <entry>45,574.00</entry>
            </row>
            <row>
              <entry>1,000,000</entry>
              <entry>"Out of memory"</entry>
              <entry>353,848.00</entry>
            </row>
          </tbody>
        </tgroup>
      </table>
      <para id="id4852125">In order to better understand the Lindsey-Fox program, the individual times required by the three stages algorithm factoring a 2,080,000 degree random coefficient polynomial on a 3 GHz Pentium with 4 GB RAM (run on 1/6/2006) was measured and is presented in the table below.  Note the efficient search stage, the time consuming second stage (which can be easily parallelized), and the moderately demanding third stage which can be partially parallelized and which is not always needed.</para>
      <table id="id4852132">
        <tgroup cols="4">
          <colspec colnum="1" colname="c1"/>
          <colspec colnum="2" colname="c2"/>
          <colspec colnum="3" colname="c3"/>
          <colspec colnum="4" colname="c4"/>
          <tbody>
            <row>
              <entry>Operation</entry>
              <entry>Time in seconds</entry>
              <entry>Time in days</entry>
              <entry>Percent of total run time</entry>
            </row>
            <row>
              <entry>Grid search</entry>
              <entry>16,692</entry>
              <entry>0.2</entry>
              <entry>3.2%</entry>
            </row>
            <row>
              <entry>Polish</entry>
              <entry>295,388</entry>
              <entry>3.4</entry>
              <entry>58.0%</entry>
            </row>
            <row>
              <entry>Unfactor &amp; Deflate</entry>
              <entry>196,675</entry>
              <entry>2.3</entry>
              <entry>38.8%</entry>
            </row>
          </tbody>
        </tgroup>
      </table><para id="element-93">The references for the Lindsey-Fox algorithm can be found <cnxn document="m15576"> here </cnxn></para>
    </section>
  </content>
</document>
