6 



MISC. PUB. 1178, U.S. DEPT. OF AGRICULTURE 



had been made, results in the expansion, con- 

 sisting of the 256 sets in the case of four genes, 

 had to be checked to determine if a particular 

 identification number had previously appeared 

 in the expansion. When the expansion was com- 

 pleted, a variable (IRES) was set equal to the 

 first member of the set. A second variable 

 (ADDER) was set to zero. Each member of the 

 set was then compared to IRES. If a matching 

 member was found, ADDER was incremented by 

 1, and the member of the set on which the match 

 had been made was set to zero to prevent fur- 

 ther matchings. After all members had been 

 checked against IRES, the variable ADDER 

 was stored in a table at a location corresponding 

 to the location in the table where the result of 

 the multiplication (identification number) had 

 been stored. The variables Pi and P2 were also 

 stored in corresponding table locations in order 

 to determine what matings had contributed the 

 previously stored fractions to the F 2 generation. 



Control was then returned to checking the 

 remainder of the 256 sets. The variable IRES 

 was set equal to the next nonzero member of 

 the set, ADDER was set to zero, and the pre- 

 viously described program steps were executed 

 until all 256 sets had been accounted for. Con- 

 trol was then returned to the original expansion 

 process, and the variable P2 was increased by 1. 

 This process continued until all possible com- 

 binations of the Fi genotypes had been made. 

 This completed the first step of the program. 



The second phase was to generate from the 

 previous results similar tables that would be 

 used in making the final computations for the 

 F 3 and F 4 generations. Since all possible geno- 

 types had already appeared, their generation for 

 the next set of tables was not necessary. All 

 combinations of the F 2 genotypes could be made, 

 and each member could be directly checked 

 against the existing table until a location rel- 

 ative to the first position was found by match- 

 ing. Because of the massive number of com- 

 binations and resulting fractional contributions 

 (up to 2.5 million), we could not store these 

 numbers in core memory. The tables were writ- 

 ten on direct-access storage devices, commonly 

 called disk storage or disk files. 



To minimize the number of searches required 

 to find a particular matching, the existing table 



was first sorted into numerical ascending order. 

 Matchings were found by executing a binary 

 search on the table. This reduced the average 

 number of searches from 41 (81 maximum, one 

 minimum) to four (seven maximum, one mini- 

 mum) and considerably increased our execution 

 speed. 



As before, two pointers, P3 and P4, were in- 

 troduced and the process of expansion was be- 

 gun. The results were intermediately stored in 

 core memory buffer areas. When a buffer was 

 filled, the entire contents were written into the 

 proper disk file location, and this again resulted 

 in increased execution speed. When this phase 

 of the program was completed, the only re- 

 maining step was to actually compute the num- 

 ber of offspring or relative frequency for a 

 particular genotype. A set of variables consist- 

 ing of release ratios, numbers of offspring per 

 mating, and levels of sterility were read into 

 core memory on punched cards. The values for 

 numbers of offspring for the Fi generation were 

 then computed from formulas that were entered 

 at the time the source program was compiled. 



The process of computing the F 2 and higher 

 generations was then accomplished by referring 

 to the previously generated tables. Three point- 

 ers were again introduced, Pi to 1 and the re- 

 maining two (P 2 and P3) to zero. Pointer Pi was 

 used to point to the table location of the particu- 

 lar genotype that was to be generated, whereas 

 P2 and P3 were set equal to the previously stored 

 table values that identified which two genotypes 

 had been crossed to produce a particular frac- 

 tional contribution to the genotype being gener- 

 ated. Since the values for the number of Fi off- 

 spring were generated in the same order and the 

 same relative storage locations were maintained 

 as in the previously generated tables, the follow- 

 ing formula could be applied: 



Offspring (F 2 ) (relative location in mem- 

 ory determined by Pi) = (contribution/ 

 256) (fractional contribution stored in 

 core memory and accessed by Pi) X (Fi off- 

 spring (P 2 ) ) (P2 used to locate appropriate 

 Fi value) X (Fi offspring (P 3 ) ) (P 3 used 

 to locate second appropriate Fi value) 



Therefore offspring (F 2 ) = (contribution (Pi)/ 

 256) X (Fi (P 2 )) X (Fi(Ps)). The value for 



