<!DOCTYPE html>
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>When working on the collatz project many of you are going to be
      tempted to create a massive array to hold, for example, all of the
      sequence lengths for the numbers over you integer range.  I am
      encouraging you NOT to do this because I could easily cause you
      code to fail if I picked a range of [1,2000000000]. Yes -- I might
      do that.</p>
    <p>Here is what I recommend -- maintain table of numbers and
      sequence lengths.  You could do this parallel arrays of 10
      elements (numbers, and sequence lengths) or some sort of array
      structure where you are keeping up with ten numbers and their
      sequence length.  After each sequence length you compute see if
      you can update the numbers in your table (i.e. -- is the new
      sequence length longer than anything else in your table?)</p>
    <p>This type of coding, where you are using a minimal amount of
      memory and relying just on integer calculations and comparisons
      should be very fast.   <br>
    </p>
    <div class="moz-signature">-- <br>
      <b><em>Andrew J. Pounds, Ph.D.</em></b><br>
      <em>Professor of Chemistry and Computer Science</em><br>
      <em>Director of the Computational Science Program</em><br>
      <em>Mercer University</em><br>
      <em>1501 Mercer University Drive, Macon, GA 31207 </em><br>
      <em>(478) 301-5627</em><br>
    </div>
  </body>
</html>