a Fortran program from BTL and converted it to 

 operate on a Univac^ 1108 system at the National 

 Aeronautics and Space Administration Computer 

 Complex, Slidell, La. 



Modifications to the BTL algorithm were made 

 to satisfy requirements of the groundfish survey 

 program. Most internal modifications were fairly 

 general so that the program could be used for other 

 areas and purposes. Specifics of grid locations and 

 random selection requirements were stored on 

 magnetic tape in a separate master file. The pro- 

 gram, as presently configured, can handle up to 

 150 stations; however, 300 stations could be han- 

 dled using extended core storage. 



Algorithm Description 



Assume a number of stations (n) have been 

 selected, either randomly or specifically. There are 

 a total ofnin - l)/2 links between the n stations. 

 The object is to find an n -subset of these links such 

 that (a) each station is sampled exactly one time, 

 and (b) the total distance traveled is a minimum. A 

 sequence of links satisfying (a) is called a tour; if it 

 also satisfies (b), it is the optimum tour. 



The optimization algorithm begins by comput- 

 ing all nin - l)/2 distances and storing them in a 

 matrix. A completely random tour is generated to 

 use as a starting point. An attempt is then made to 

 find two sets of links A' = .Vj , .V2 • • • ^'/,. o''<^ Y - v, , 

 y.2 . . . V;, such that if the links in X are replaced 

 with the links in Y, the result gives a tour of a 

 shorter distance. This is done by identifying^ j and 

 yi as the "most-out-of-place" pair, setting them 

 aside, then proceeding with .t^ and y2, x^ and y^, 

 and so on. 



A criterion is then used to determine how many 

 pairs of links are to be exchanged. This criterion 

 can be explained as follows: Let the length of.r, and 

 y, be dx, and dy,, and g, = dx, - dy^. This deter- 

 mines the gain (shorter distance) by exchanging x, 

 withy,. After examining a sequence of proposed 

 exchanges x^ , X2  • . a:^ and y 1 , Vg . . . y^ with their 



corresponding gains §1,^2 • • -Sk^ the actual value 

 of ^ that defines the number of sets to exchange is 

 the one for which §, + g2 + . . . +g^ is always zero 

 or negative. This indicates the solution is a local 



(n - 1 ) factorial possible cruise tracks that satisfy the criterion of 

 sampling all stations once and returning to starting position 

 (e.g., if n = 101, the number of possible solutions is 9.3326 x 

 10'"). 



^Reference to trade names does not imply endorsement by the 

 National Marine Fisheries Service, NOAA. 



optimum based on the fact that if a sequence of 

 numbers has a positive sum, there is a cyclic per- 

 mutation of these numbers such that every partial 

 sum is positive. Hence, the algorithm looks for 

 sequences ofg/s whose partial sum is always posi- 

 tive, reducing the number of sequences that need 

 to be examined. This means that the value of ^, 

 which gives the number of links to be exchanged, 



IS determined when G* = S g-^Q, i.e. 



when the 



partial sum of the gains fails to remain positive. 

 These links are then exchanged and the process of 

 selecting new links to be exchanged begins again 

 ati = 1. When all possibilities have been tried, the 

 tour length is recorded. The program generates a 

 new random initial tour and the entire process 

 begins again. Eleven distinct solutions are pro- 

 duced in this manner, and the tour with the short- 

 est length is considered the optimum solution. 

 Program operation can best be understood by a 

 simple example. 



Assume that n stations are selected and a ran- 

 dom tour generated (Figure la5. The black dots 

 represent the stations and the circle represents 

 the random tour. Any station S 1 is selected and S2 

 is designated as an adjacent station in the tour. 

 The link connecting the two stations is designated 



Figure 1. — Example of the algorithm operation (modified from 

 Lin and Kemighan 1973). 



707 



