• Keine Ergebnisse gefunden

by IBM Punched Card Methods

Im Dokument Com putation (Seite 98-103)

L. E. GROSH, JR. E. USDIN

1?urdue

[Jniversi~

THE 11 E THO D of determinant evaluation proposed here is essentially a scheme for the collection of terms with like coefficients and like powers of %, where these terms are polynomials with non-numerical coefficients. The method is based upon the termwise expansion of a determinant; thus, it is concerned with the evaluation of n! polynomials for an nth order determinant. If any zero elements appear in the determinant,a significant reduction in the number of cards handled may be made. The method works best when there are few distinct coefficients in the original determinant.

The inversion of a matrix with polynomial elements is based upon the expression for the general element of the inverse which involves the ratio of two determinants. Thus, for an nth order matrix, the inversion problem is reduced to the evaluation of n2. determinants of order (n - 1) and one nth order determinant. Most of the cards necessary for the evaluation of the n2 determinants are generated in the evaluation of the nth order determinant.

The equipment needed for the evaluation procedure is:

a card punch, sorter, reproducer, 602-A calculating punch, and 405 accounting machine-direct subtracting.

The use of the calculating punch is not absolutely necessary;

its role in the procedure could be performed by a sorting and gang punching operation. However, for a problem of any size, the sorting operation would become extremely complicated and impractical unless an IBM Type 101 Elec-tronic Statistical Machine were available.

EVALUATION OF DETERMINANTS

The Coding Problem

The heart of the evaluation scheme is a method of coding.

The coding is best understood when applied to a simple example. Consider the third order determinant shown below.

The termwise expansion of this· determinant is:

D = PU(%)P22(%)PSS(%)

+

P21(%)PS2 (X)P I3 (%)

+

PSI (% )PI2 (% )P2S(%) - P S l (% )P22 (% )PI3 (%) - P 21 (% )PI2 (Z )P33(%) - P u (% )PS2 (% )P2S (%) If the factors of each term are ordered on the column sub-script as above, these six terms may be represented by the permutations of the numbers 1, 2, 3, and an X punch to indicate a negative sign. Thus,

123 = Pn (% )P22 (% )Pss(x) 231 = P21(%)PS2(%)PI3(X) 312 = P31(%)PI2(%)P2S(X) 321X

=

-PSI(%)P22(Z)PIS(X) 213X

=

-P21 (%)P12(%)Pss(z) 132X = - P 11 ( % ) P 32 ( % ) P 2S ( %) .

Let each one of the six symbols 123, 321X, ... be called a permutation number.

Now consider one of the products, say P 21 (%)PI2(%)PSS(%) =

( ail %

+

a51) (a12 %

+

a~2) (afS %

+

a83) ail a12 a~3%S

+

(ail a12 a~s

+

ail a~2 a~s

+

a51 a}2 ais )%2

+

(ail a~2

a8

3

+

a51

a1

2

a8

3

+

a51 aA2 ai3)%

+

a51 a~2

a3s .

Note that there are 2(2) (2) = 8 different terms in the expanded polynomial. In general, there will be at most,

IT

n (kij

+

1) terms in this expansion, and there will be

j=l

exactly this number if all

a!!t

=1= 0 and are distinct, where kij

is the degree of P i j ( % ), and n is the order of the determi-Pl1 (%)

D

=

P21(%)

PSI (%)

P12(Z) P22(%) PS2(%)

PIS(%) P2S(%) P3S(%)

aFxS

+

aFx2

+

apz

+

abl af2%

+

aA2 ail%

+

a51 ai2%

+ a5

2

a8

1 a~2 x

+

a82

99

100

nant. Each of these three-factor coefficients may be repre-sented by a three-digit number-namely, the subscripts of the a~'s involved. Thus, to the coefficient of Xi from a polynomial in the first column;

the second digit j refers to the coefficient of xi from a poly-nomial in the second column; and the third digit k refers to the coefficient of Xk from a polynomial in the third column.

Also, the sum of the digits i+j+k is the power of x with which this three-factor product is associated.

The combination of a permutation number and a selection number allows us to code each term in the expansion of D; above third order determinant D.

D

I =

There are many ways in which the coefficient ± bob2b3 may arise, e.g.,

The main points of the coding scheme can be summarized as follows:

1. A three-digit permutation number indicates which three polynomials are multiplied together and indi-cates the sign of the resultant polynomial.

I N D U S T R I A L COMPUTATION 2. A three-digit selection number indicates which

co-efficient of each polynomial shall be multiplied to-gether to obtain a resultant coefficient. The power of

%, with which this resultant coefficient is associated, is the sum of the digits.

3. A four-digit number indicates the power of the origi-nal distinct coefficients as they appear in the resultant coefficient.

Card Generation

Although this coding scheme is relatively simple, it would be almost impossible to maintain 100% accuracy on even a medium-size problem if the coding were done by hand. Fortunately, all of the coding may be done by ma-chines with very little key punching. To accomplish this, four different decks of cards are used. These are:

1. Permutation deck 2. Selection deck

3. Master gang punching deck 4. Term deck

The term deck is the final product, and the other three decks are used in its generation. A typical card layout for the problem considered above is as follows:

Card Layout

4 X if permutation number is positive 5 X if permutation number is negative permutation and term numbers

bo = 0 bl = 1 b2 = 2 b3

=

3 12 term number representing the power of 13 the various bm's as they appear in the

The master gang punching deck will have a distinguish-ing X punch, say in column 80, and is divided into three parts:

1. punching in columns 1, 6, and 9 2. punching in columns 2, 7, and 10 3. punching in columns 3, 8, and 11.

This deck is used to facilitate the punching of columns 9, quite simple, but is a very important part of the coding oper-ation. The perm~tation deck for an nth order determinant is generated from the permutation deck for a determinant of the (n -1) st order. If the generation scheme is carried out correctly, it is only necessary to handle n! cards for this operation. While it is possible to generate the permutation deck for any order determinant from a single key punched card, it is more practical to select some moderate-size order, say 4th, key punch the required 24 permutation cards, and cards for an nth order determinant. Thus, for our example, the sign will be in the 4th and 5th columns. If the generation procedure is started with permutation cards for an mth

5. For larger n, this procedure of interchanging columns is repeated until the n gang punched in step 2 in the nth columns has been moved over to the first column.

Thus, there are (n - 1) interchanges.

The six cards we have generated are:

123X- 132-X

312X--213-X 231X- 321-X,

and are all the permutation cards necessary for a 3rd order determinant.

The steps in the generation of the selection cards are:

1. Determine the highest degree appearing in each

8. The operations of gang punching and reproducing are repeated until/?nj has been gang punched into column (2n+2).

The 24 cards generated for the determinant D by the above procedure are:

000 010 100 110 200 210 300 310 001 011 101 111 201 211 301 311 002 012 102 112 202 212 302 312 The next step in the evaluation procedure is the genera-tion of the term cards. The general procedure to be followed here is to place the selection cards in the reproducing hopper and a blank deck of cards preceded by a single permutation card in the gang punch hopper. Then, gang punch the per-mutation number and reproduce the selection number into the blank deck, column-for-column. This procedure would

n

yield n !

IT

(kij

+

1) term cards, many of which would have

j = l

no meaning unless all elements of the same column had the same degree. Referring to the example above, 3 ! (24)

=

144 term cards would be generated by the unmodified repro-ducing and gang punching procedure. By a study of the degree of the polynomial represented by each permutation card, it is easily seen that only 60 term cards are needed for the above example.

102

'fotal number of term cards 60

The extraneous term cards can be eliminated and much the a~ s appearing in that element. From this symbolic form it is easily seen which selection numbers are needed for any permutation number. The sorting procedure to be followed for each permutation number is:

The selection cards left after this sorting procedure are the ones to be used in punching the term cards.

Machine Operations

After the generation of the term cards, the following ma-chine operations must be performed:

1. U sing the master gang punch deck, gang punch in the appropriate columns (9 to 11) the coded values of the bi'S.

2. Using the 602-A calculating punch, count the number of times the various b/s appear in columns 9 to 11 and punch this information in columns 12 to 15.

3. On the 602-A, crossfoot columns 6, 7, and 8 to sub-tracting 1 for each negative term card. Either column 4 or 5 may be used for this purpose. Naturally, the determi-nant methods to evaluate this expression. The evaluation of det (aij) needs no explanation; only the cofactor Aij must be considered here. We can write

det ( aij) =

L

aijAij . Be-cause we are considering polynomial elements,

aij = P ij ( %) , correspond-ing to d~ which can be done automatically by the accounting machine itself.

This technique will not give us all the cofactors we need if some of the ails in the original matrix are zero, because in the evaluation of det(aij) we have not punched the term cards corresponding to the aij

=

0. In the case where there master gang punching step use a 12 punch to identify those term cards corresponding to an aij = 0.

4. Use these new cards to obtain Aij corresponding to aij

=

0. It is no longer necessary to factor out the aij because the 12 punch will be the extra punch, and it does not correspond to any coefficient.

EXAMPLE

The following determinant arose m the evaluation of the integral:

Ao 0

D=

0 Al

0 0 where

A2 A4 A6 Ao A2 A4 0 Ao A2 As A5 A7 Al As A5 0 Al As

J'

Ar

= L

av%r-tl

v=o

0 0 A6 0 A4 A6 0 0 A7 0 A5 A7

If the above evaluation method were applied to the determi-nant in this form, approximately 130,000 term cards and

24,576 selection cards would be required. However, by judicious manipulation of rows and columns, D can be written in the form:

ao a2

+

al% a4

+

as% a6

+

a5% 0 0

0 ao a2

+

al% a4

+

asx A6 0

D=

0 0 ao a2

+

alx A4 A6

al as - aIx2 a5 asx2 a7 a5x2 0 0

0 al as al%2 a5 asx2 a7 0

0 0 al as al%2 a5 a7

This form of D was evaluated by the above procedure.

Notice that the zero elements are the same in both forms but that the degree of the elements appearing in the first four columns has been reduced. In this form, approximately 3,000 term cards and 576 selection cards were required.

The negative signs in columns 2, 3, and 4 were handled quite easily in the master gang punching step by double punching an X in the corresponding position of the term number. An extra crossfooting operation was used to de-termine the correct sign of the term card. The final answer involved about 340 terms associated with 19 different pow-ers of .x. The entire problem required about 13 hours of machine time.

Im Dokument Com putation (Seite 98-103)