Subject: hw5 programming part hints

From: Archisman Rudra <[email-masked]>
Date: Tue, 23 Nov 1999 11:40:22 -0500 (EST)

Dear Class,
     Here are some ideas about what to do for hw5:

  You will use the BigInteger class. You have to successively
generate random pairs of BigIntegers. So you have to have a
loop structure of the following form:

  for number of bits = low to high do
      for trial = 1 to number of trials do
	Generate random pairs of big numbers

	Calculate start time.

	multiply the two big numbers together

	calculate end time.

	Find the time taken for multiplication by subtraction.
    end do
    Find the average of the times for this number of bits.

    Calculate the exponent. (dimension)
 end do

  The easy (and inaccurate) way of calculating the exponent is the
following:

    Let T(n) be the average time for bitlength n.

    Then one estimate of the exponent is:

    (log T(n) - log T(min)) / (log n - log min) ....

  where min is the minimum bitlength. You could also try any other
value for min...

-- Archi