| OCR Text |
Show 260 the problem size increases, the percentage of the contributed backtracks (in Table 7.20) decreases rapidly and a great amount of backtracks was wasted (in Table 7.21). 7 .4.3 Fail-First Principle The fail-first principle was also applied in our CLP backtracking search case study. Although there are many situations where fail-first principle has been quite successful (see Tables 7.29 and 7.31), none of the real performance improvement (in terms of execution time) was observed when optimizing horizontal label ordering. From an information-theoretic point of view, it can be shown that on average a choice from the smallest set (optimizing vertical object ordering) is more efficient. This strategy, however, does not pay off for the n-queens problem (also see [87]) and examples shown in Table 7.24 indicate its advantage soon disappears as the problem size increases. This example indicates that although a heuristic is theoretically elegant, its real performance should solely be determined by various complicated factors including real algorithm, data structure, programmer, and relative percentage within total execution time. The reasons for fail-first principle's failure (in this example) can be analyzed. The improvement of efficiency with the decrease in the amount of arc consistency checking is due mainly to the introduction of many redundant, artifi- Table 7.24. Relative Execution Time Statistics of Normal Search and Search with Fail-First Techniques. I Number of Queens n I 4 I 5 I 6 I 7 I 8 I 9 I 10 I I t(fail-first) / t(normal) I 0.57 I 0.93 I 0. 75 I 0.96 I 0.98 I 0.983 11.00 I |