Page 23 - Compact Numerical Methods For Computers
P. 23

A starting point                        13
                         It should also be noted that I have taken pains to make it easy to save a ‘copy’ of
                       the screen output to a file by duplicating all the output statements, that is the ‘write’
                       and ‘writeln’ commands, so that output is copied to a file which the user may name.
                       (These statements are on the disk files, but deleted from the listings to reduce space
                       and improve readability.) Input is allowed from an input file to allow examples to be
                       presented without the user needing to type the appropriate response other than the
                       name of the relevant ‘example’ file.
                         Furthermore, I have taken advantage of features within the MS-DOS operating
                       system, and supported by compiler directives in Turbo Pascal, which allow for
                       pipelining of input and output. This has allowed me to use batch files to automate the
                       running of tests.
                         In the driver programs I have tried to include tests of the results of calculations, for
                       example, the residuals in eigenvalue computations. In practice, I believe it is
                       worthwhile to perform these calculations. When memory is at a premium, they can
                       be performed ‘off-line’ in most cases. That is. the results can be saved to disk
                       (backing storage) and the tests computed as a separate task, with data brought in
                       from the disk only as needed.
                         These extra features use many extra bytes of code, but are, of course, easily
                       deleted. Indeed, for specific problems, 75% or more of the code can be removed.


                                           1.5. CHOICE OF ALGORITHMS
                       The algorithms in this book have been chosen for their utility in solving a variety of
                       important problems in computational mathematics and their ease of implementation
                       to short programs using relatively little working storage. Many topics are left out,
                       despite their importance, because I feel that there has been insufficient development in
                       directions relevant to compact numerical methods to allow for a suitable algorithm
                       to be included. For example, over the last 15 years I have been interested in methods
                       for the mathematical programming problem which do not require a tableau to be
                       developed either explicitly or implicitly, since these techniques are generally quite
                       memory and code intensive. The appearance of the interior point methods associated
                       with the name of Karmarkar (1984) hold some hope for the future, but currently the
                       programs are quite complicated.
                         In the solution of linear equations, my exposition has been confined to Gauss
                       elimination and the Choleski decomposition. The literature on this subject is,
                       however, vast and other algorithms exist. These can and should be used if special
                       circumstances arise to make them more appropriate. For instance, Zambardino
                       (1974) presents a form of Gauss elimination which uses less space than the one
                       presented here. This procedure, in ALGOL, is called QUARTERSOLVE because only
                        2
                       n /4 elements are stored, though an integer vector is needed to store pivot
                       information and the program as given by Zambardino is quite complicated.
                         Many special methods can also be devised for matrices having special structures
                       such as diagonal bands. Wilkinson and Reinsch (1971) give several such al-
                       gorithms for both linear equations and the eigenvalue problem. The programmer
                       with many problems of a special structure should consider these. However, I have
                       found that most users want a reliable general-purpose method for linear equations
   18   19   20   21   22   23   24   25   26   27   28