Patent GB-1104407-A (GB)
Title: Digital calculating arrangements
Inventor: GOLDSTEIN ALAN JAY
IPC: G06F7/76
Filed: 1965-09-15
Abstract: 1,104,407. Electric digital computer. WESTERN ELECTRIC CO. Inc. 15 Sept., 1965 [30 Sept., 1964], No. 39325/65. Heading G4A. A digital calculating arrangement comprises a digital store, means responsive to a plurality of input quantities having been written into the store for generating a plurality of partitions of said quantities into a sequence of disjoint subsets, means responsive to each such partitioning for effecting a plurality of permutations of the quantities included in the first sub-set and means responsive to each such permutation for generating a plurality of permutations of the  quantities included in each succeeding sub-set. Preferably for a number of input quantities N two sub-sets are obtained each containing equal or nearly equal quantities. In operation (Fig. 3) N input items are read into a store 20 (Fig. 2, not shown) and then, if the sub-sets each contain N/2 items then (N/2) 1 interchange characters are read into the store in storage locations a 0  - (a(N/2)! - 1. An interchange character a operates on the data stored to interchange the data in positions a and a + 1 and hence a #N/2-1. The input items are then partitioned into sub-sets S1and S2 and stored in locative adjacent location S1 i.e. in S1 + 1 to S1 + N/2 and S2 + 1 to S2 + N/2 (Fig. 2, not shown), e.g. for input data 1, 2, 3, 4, 5, 6 sub-set S1 may contain 1, 2, 3 and S2 contain 4, 5, 6. Six interchange characters are stored 2,1,2,1,2,1. A permutation of sub-set S1 is generated i.e. 1,2,3 is operated. on by interchange character 2 to form 1,3,2: The first permutation of S2 is performed. Therefore 4,5,6 is operated on by interchange character 2 to form 4,6,5. The desired task is performed, thus if the permutations represented. the order of arrival at different cities visited by a traveller than total distance travelled in visiting in the particular order permuted would be calculated. A counter holding the value (N/2)! for set S2 i.e. 6 for the first permutation is examined to see if it is greater than 1. If it is then it is decreased by 1 and the operation returns to generate the next permutation of S2 by operating with character 1 to form 6,4,5. The desired task is performed again and the loop continued until the counter reads 1 when examined, at which point the loop is left and a counter holding the value (n/2)! for set S1 is examined. If this is greater than 1 then the number is decreased by one and the next permutation of S1 is generated i.e. operating by character 1 to form 321. The (N/2)! permutations of S2 are repeated (loop 1) and the larger loop 2 is performed until the S1 counter reads 1 whereon loop 2 is left and a counter containing is examined and if it contains more than 1 it is decreased by 1 and the next partition of the input list into S1 and S2 sub-sets is generated and the values (N/2)! returned to the S1 and S2 counters. For the example, given loop 3 is traversed N! / (N/2)!(N/2)! times = 20 times. (N/2)-!(N/2)!  Loop 2 is traversed (N/2)! times for each loop of loop 3 = 6 and loop 1 is traversed 6 times for each loop of loop 2 giving a total of 20 x 6 x 6 = 6! permutations. The programme for obtaining the interchange of two adjacent characters is described.