Solutions to problem 8

  • Authors:
  • A. C. Norman

  • Affiliations:
  • University Computer Laboratory, Cambridge, England

  • Venue:
  • ACM SIGSAM Bulletin
  • Year:
  • 1975

Quantified Score

Hi-index 0.00

Visualization

Abstract

In Problem 8 Fitch asks for solutions to a two-term recurrence formula. Only part of the full solution is needed, and the problem reduces to expanding a fairly complex function as a power series in one of its variables. Expressed in this way the problem is a direct application for the new SCRATCHPAD power series package (described elsewhere in this issue). The SCRATCHPAD program required is just that shown as Figure 1. Working through the zero order terms in the expansions shows that r will take the value sqrt(4q2) and so to simplify further working a line r=2q occurs immediately after the line defining r in general: this extra statement is present solely to make sure that the answer is not found unsimplified in terms of sqrt(4q2). Running on an IBM 370/168 in 1536Kbytes and using this program, SCRATCHPAD gets as far as the 8th term: timings and garbage collection counts are shown in Table 1. To show how the same algorithm can be used on other algebra system the problem was coded for an experimental assertional algebra system with a SCRATCHPAD-like input language. The program, reproduced as Figure 2, was gotten by hand simulating the SCRATCHPAD power series pre-processor. As can be seen, the program is fairly messy: it took quite a few trial runs and access to a set of expected answers to get the signs and temporary variables right! This program was run on the Cambridge University IBM 370/165 in the maximum partition allowed (400Kbytes) and got up to order 7 taking times shown in Table 2. As a final experiment the above algorithm was transcribed into CAMAL. The general system (H) was used, and arrays were used to store the power series coefficients. The program involved was even more unreadable than Figure 2, being slightly over 100 lines long, and is not given here. CAMAL was run on the 370/165, again in 400Kbytes: Table 3 give the relevant timing information.