next up previous contents
Next: Conclusions Up: Solving Subset Sum Problems Previous: Using Seysen's Algorithm to

  
Empirical Tests Using Algorithm SL

We now present the results of our experimental attempts to solve subset sum problems using Algorithm SL as describes in Section 3.4 above. Following the tabulated results of Radziszowski and Kreher, we attempted to solve random subset sum problems of size n, where:

\begin{displaymath}n \in \{42, 50, 58, 66, 74, 82, 90, 98, 106\}.
\end{displaymath}

For each value of n, a set of b values (representing the number of bits in the binary representation of the weights ai) was chosen. Algorithm SL was then run on a number of randomly generated subset sum problems for each pair (n,b). Where possible, values of b were chosen to coincide with values used in [26,33]. Algorithm SL was implemented in FORTRAN and utilized Bailey's multiprecision floating-point package [4]. The Seysen reduction algorithm stored all lattice bases in multiprecision floating point and used both multiprecision and double-precision floating point operations. The size of the multiprecision floating-point representation was changed for each value of n so that b was at most one-half the size of the representation in bits. In many cases significantly more bits were available in the representation to help reduce rounding error. The LLL portion of Algorithm SL was also implemented in FORTRAN but used only integer and double precision operations. One advantage of the Seysen-LLL structure of Algorithm SL is that by the time the LLL stage is reached, the lattice basis to be reduced contains only relatively small integers. In all cases investigated, the input lattice basis to the LLL phase of the algorithm did not contain any single coefficient larger than 216. This meant that we could safely store the basis vector coefficients as 32-bit integers, and we could use integer and double-precision floating point to carry out all calculations necessary to run LLL. Avoiding multiprecision row moves during the LLL phase greatly decreases the execution time of Algorithm SL. For values of n < 90, these implementations of the Seysen and LLL algorithms were sufficient for our purposes. However, for $n \in \{90,
98, 106\}$, rounding error started to significantly alter the operation of the algorithm. Recall that the LLL algorithm stores the values of the $\mu_{i,j}$ coefficients as rational numbers; our implementation of LLL used double-precision floating point approximations to decrease the running time of the algorithm. Since such an approximation will introduce error, code was included to detect and attempt to correct errors resulting from rounding in double-precision calculations. In addition, while not changing the operation of the LLL algorithm, we performed a change of variables to reduce the rounding error which is necessarily introduced. LLL as defined in [27] uses two arrays of variables to hold information about the lattice being reduced:
\begin{align*}\mu_{i,j} & = \frac{(\bold{b_i},\bold{b_j^*})}{(\bold{b_i},\bold{b...
...\\
B_i & = \Vert\bold{b_i^*}\Vert = (\bold{b_i^*},\bold{b_i^*}).
\end{align*}
(Note that the $\bold{b_i^*}$ are orthogonalized versions of the $\bold{b_i}$ in LLL, not the basis vectors of the dual lattice as in Seysen's reduction algorithm.) Our version of LLL used three arrays of variables to maintain the same information:
\begin{alignat*}{2}
m_{i,j} & = \frac{(\bold{b_i},\bold{b_j^*})}{\Vert\bold{b_i...
...i^*}\Vert & & = \sqrt{B_i} \\
bb_i & = (\bold{b_i},\bold{b_i})
\end{alignat*}
It is not difficult to transform the LLL relations between values of $\mu_{i,j}$ and Bi into equations involving mi,j, ci and bbi. The advantage gained is that:
\begin{align*}m_{i,j} & = \frac{(\bold{b_i},\bold{b_j^*})}{\Vert\bold{b_i}\Vert ...
...old{b_i}\Vert \cdot \Vert\bold{b_j^*}\Vert}, \\
& = \cos \alpha,
\end{align*}
where $\alpha$ is the angle between the vectors $\bold{b_i}$ and $\bold{b_j^*}$. In the original version of LLL,

\begin{displaymath}\mu_{i,j} = \frac{\Vert\bold{b_i}\Vert}{\Vert\bold{b_j^*}\Vert} m_{i,j},
\end{displaymath}

and thus could take on a wide range of values, depending on the ratio of the lengths of $\bold{b_i}$ and $\bold{b_j^*}$. Limiting $m_{i,j} \in
[-1,1]$ and keeping the length information separate in ci and bbi reduces the error introduced by double-precision arithmetic operations. (Notice that bbi values are integers and can be regenerated at will from the integer basis vectors.) Of course, with sufficient multiprecision representation for all variables there is no need for this transformation. It is simply an implementation-specific modification which allowed us to use a fast, double-precision version of LLL to reduce the lattices which arose while solving 106-element subset sum problems.
 
Table 3.1: Test Results Using Algorithm SL for $42 \leq n \leq 58$
n b d = n/b $RM_{\text{S}}$ $RM_{\text{LLL}}$ TL $\text{S}_5 (\text{S}_1)$ % Solved Average Time
20 trials for each length b for each n
42 42 1.000 36907 420357 21 20 (19) 1.00 98.39
42 44 0.955 38955 276031 20 20 (20) 1.00 94.67
42 46 0.913 40264 362848 21 20 (19) 1.00 99.88
42 48 0.875 42288 234513 20 20 (20) 1.00 97.65
42 50 0.840 43826 222350 20 20 (20) 1.00 99.67
42 52 0.808 45144 178153 20 20 (20) 1.00 100.29
42 54 0.778 46405 209717 20 20 (20) 1.00 102.56
50 50 1.000 55122 3206204 42 20 ( 9) 1.00 283.93
50 52 0.962 56243 2672637 36 19 (10) 0.95 262.24
50 54 0.926 58249 2112480 31 20 (14) 1.00 243.22
50 56 0.893 59721 1596051 26 20 (16) 1.00 224.80
50 58 0.862 61594 1098460 21 20 (19) 1.00 208.40
50 60 0.833 63604 1220857 22 20 (18) 1.00 217.68
50 62 0.806 65563 978497 21 20 (19) 1.00 210.71
58 58 1.000 73587 15664277 83 7 ( 1) 0.35 808.68
58 60 0.967 77371 13477268 70 10 ( 5) 0.50 744.32
58 63 0.921 80574 13869151 74 13 ( 2) 0.65 837.96
58 66 0.879 82284 12949088 67 12 ( 5) 0.60 803.07
58 69 0.841 87569 7581281 43 19 (10) 0.95 594.55
58 72 0.806 90773 6234735 38 20 (10) 1.00 548.75
58 75 0.773 93896 4408841 29 20 (14) 1.00 480.70
58 78 0.744 98289 3411933 23 20 (18) 1.00 450.66
58 81 0.716 101104 3572104 25 20 (15) 1.00 463.48
58 84 0.690 105325 2090306 20 20 (20) 1.00 412.65
58 87 0.667 107711 1792670 20 20 (20) 1.00 406.44

Tables 3.1 through 3.3 show the results of experiments performed on random subset sum problems with $n
\leq 106$. For $n \leq 74$ twenty subset sum problems were attempted per b value. Only ten such problems were attempted per b value for $82 \leq n \leq 106$. For each problem, $\tfrac{1}{2}n$ elements were chosen from among the weights $a_1,\ldots{},a_n$ to be in the subset. During the LLL phase of the algorithm, parameter $\pi_1 = 5$ and $\pi_2 = 8$. Six distinct values of y were used for n < 90; nine were used for $n \geq 90$. All tests were run on Silicon Graphics 4D-220 workstations with four or eight MIPS Computers, Inc., R3000 processors per workstation. Each workstation was equipped with ( $32\text{Mbytes} \cdot \text{ \char93
processors}$) of main memory. As Algorithm SL requires significantly less than $32\text{Mbytes}$ of memory per process, all processors in a given workstation could be used simultaneously to work on different subset sum problems. The majority of the R3000 processors ran at 33MHz; the remainder operated with a clock frequency of 25MHz. All running times reported in Tables 3.1 through 3.3 have been adjusted to reflect the running time on a 33MHz processor. The columns in Tables 3.1 through 3.3 show the value of the following variables for each (n,b) pair: