• No results found

6.2 IP model and experiments for SPA ST

6.2.3 Experimental evaluation

6.2.3.2 Experimental results

Experimental results can be seen in Figures 6.2, 6.3 and 6.4, and in Tables D.1, D.2, D.3, D.4, D.5, D.6 and D.7 of Appendix D.

Figures 6.2, 6.3 and 6.4 (with associated Tables D.1, D.2 and D.3) show plots comparing the size of matching returned by the approximation algorithm with the sizes of minimum and maximum stable matchings and a 32 bound, for Experiments 1, 2 and 3 respectively. In each of these Figures, the median values of the size of stable matchings are plotted and a 90% confidence interval is displayed using the 5th and 95th percentile measurements.

Tables D.4, D.5 and D.6 show additional results for Experiments 1, 2 and 3 respectively. From this point onwards an optimal matching refers to a maximum stable matching. In these tables, ‘A’ represents statistics relating to the approximation algorithm, and ‘Min’ and ‘Max’ represent statistics relating to the IP models to find a minimum and maximum stable matching, respectively. Column ‘Minimum A/Max’ gives the minimum ratio of approxima- tion algorithm matching size to optimal matching size that occurred, ‘% A=Max’ displays the percentage of times the approximation algorithm achieved an optimal result, and ‘% A≥ 0.98Max’ shows the percentage of times the approximation algorithm achieved a result at least 98% of optimal. The ‘Mean size’ columns are somewhat self explanatory, with sub- columns ‘A/Max’ and ‘Min/Max’ showing the mean approximation algorithm matching size and minimum stable matching size as a fraction of optimal. Finally, the mean time taken in milliseconds to run each algorithm per instance is given in the last three columns. Table D.7 shows the scalability results for increasing instance sizes (Experiment 4) and increasing pref- erence list lengths (Experiment 5). The ‘Instances completed’ column indicates the number of instances that completed before timeout occurred. The mean time taken is also shown,

where instances that did not complete within the timeout time were said to have taken the maximum time of 30 minutes.

The main findings are summarised below.

• The approximation algorithm consistently far exceeds its 3

2 bound. Considering the

column labelled ‘Minimum A/Max’ in Tables D.4, D.5 and D.6, we see that the small- est value was within the SIZE1 instance set with a ratio of 0.9286. This is well above the required bound of 23.

• Approximation algorithm matchings are closer in size to the maximum stable match- ings than to the minimum stable matchings. The columns ‘A/Max’ and ‘Min/Max’ of Tables D.4, D.5 and D.6 show that, on average, for each instance set, the approx- imation algorithm produces a solution that is within 98% of maximum and far closer to the maximum size than to the minimum size. This may also be seen each of the Figures 6.2, 6.3 and 6.4, where in general, the size of a stable matching output by the approximation algorithm, indicated in blue, is far closer to the size of a maximum stable matching (red) than the size of a minimum stable matching (green), in all cases. • Divergence in sizes of minimum and maximum stable matchings when increasing the probability of ties. Unlike in Figures 6.2 and 6.4 which show similar trends for mean matching sizes produced by the approximation algorithm, and the minimum and max- imum sized stable matchings, Figure 6.3 shows a marked divergence of the minimum stable matching size as the probability of ties increases. With no ties in the preference lists, all matchings are the same size (namely 284), as expected from the theory. As the probability of ties increases, the maximum stable matching size and size of matching from the approximation algorithm increase steadily to 294.8 and 299.5 respectively. However, the minimum stable matching size decreases steadily to 254.8. This be- haviour may be explained by noticing that the higher the probability of ties, the larger the number of stable matchings that will exist. Hence there is a higher probability that the sizes of minimum and maximum stable matchings will diverge. Interestingly however, the decrease in size of minimum stable matchings does not have a noticeable effect on the approximation algorithm output, as matching sizes from this algorithm closely align with optimal.

• In Table D.7, Experiment 4 (SCALS) shows the number of instances solved within the 30-minute timeout reduced from 10 to 0 for the IP-based algorithm forMAX-SPA-ST.

However, even for the largest instance set sizes the approximation algorithm was able to solve each instance on average within 21 seconds. For Experiment 5 (SCALP), with a higher probability of ties and increasing preference list lengths, the IP-based algo- rithm to find a maximum stable matching was only able to solve all the instances of one

6.2. IP model and experiments forSPA-ST 164 0 200 400 600 800 1000 n 200 400 600 800 1000

Size of stable matching

Max Approx Min 2/3 of Max

Figure 6.2: Plot of the size of stable matching returned by the approximation algorithm, and the minimum and maximum stable matching sizes, with increasing n, where n is the number of men or women. A second-order polynomial has been assumed for all best-fit lines.

instance set (SCALP2) within 30 minutes each, however the approximation algorithm took less than 0.3 seconds on average to return a solution for each instance. This shows that the approximation algorithm is useful for either larger or more complex instances than the IP-based algorithm can handle, motivating its use for real world scenarios.

0.0 0.1 0.2 0.3 0.4 0.5 ts= tl 180 200 220 240 260 280 300

Size of stable matching

Max Approx Min 2/3 of Max

Figure 6.3: Plot of the size of stable matching returned by the approximation algorithm, and the minimum and maximum stable matching sizes, with increasing probability of ties. A second-order polynomial has been assumed for all best-fit lines.

1 2 3 4 5 6 7 8 9 10 lmin= lmax 150 175 200 225 250 275 300

Size of stable matching

Max Approx Min 2/3 of Max

Figure 6.4: Plot of the size of stable matching returned by the approximation algorithm, and the minimum and maximum stable matching sizes, with increasing student preference list length. A second-order polynomial in log(lmin) has been assumed for all best-fit lines.