2.2. Bases Teóricas
2.2.2. Marco teórico de Inteligencia Emocional.
First, we investigate active Negation Reformulation that is discussed in Sec. 4.3.3. We start by investigating the difference in instance size when applying the reformulation.
Auxiliary Variable Reduction with Active Negation Reformulation
We first consider the impact of the active negation reformulation on the instance sizes of problems where the reformulation fired. In particular, it fired on English Peg Solitaire State, Peaceful Armies of Queens model 3 and Plotting. Fig. 8.6 depicts the reduction of auxiliary variables due to the reformulation (which corresponds to the increase of identical common subexpressions). Thex-axis represents the number of auxiliary variables in the respective instancewithactive negation reformulation and they-axis the auxiliary variable reduction factor wrt the reformulation. Hence, all instances below y = 1 contain fewer auxiliary
variables due to the active negation reformulation.
In Plotting, the active negation reformulation reduces the overall number of auxiliary vari- ables by ca.8%, for instance, from 11,714 to 11,109 in a medium-sized instance. This means that about 7% of all subexpressions that required to be flattened could be reduced to an identical representation due to the active negation reformulation. In the Peaceful Armies of Queens model 3, the reduction is even greater, where the negation reformulation saves
0.7 0.8 0.9 1
5 10 100 1000 10000 20000
Auxiliary Variable Reduction Factor compared to basic CSE
Number of Auxiliary Variables with Active Negation Reformulation (sec)
Problem Classes (Group C) golomb (Minion) pegState (Minion) pegAction (Minion) plotting (Minion) knights (Minion) nQueensNaive (Minion) paq1 (Minion) paq3 (Minion) 10 % less aux variables 30 % less aux variables same number of auxiliary variables
0.01 0.05 0.1 0.5 1 1 10 100 1000 10000 40000
Auxiliary Variable Reduction Factor
Number of Auxiliary Variables (with BASIC CSE+NEG) (sec)
Problem Classes (Group C) golomb (Minion) pegState (Minion) pegAction (Minion) plotting (Minion) knights (Minion) nQueensNaive (Minion) paq1 (Minion) paq3 (Minion) 10% of aux variables 5% aux variables 1% of aux variables same number of auxiliary variables
Figure 8.6: Reduction of Auxiliary Variables by tailoring using the active negation re-
formulationcompared to the reduction achieved by basic CSE (top) and compared to no
enhancement (bottom). They-axis represents the factor with which the tailoring time dif- fers between both tailoring options: points below y = 1 depict cases where the number
of auxiliary variables was reduced when applying the active negation reformulation, the further down, the larger the reduction.
around 25% of auxiliary variables. For instance, in a medium-sized example, basic CSE reduces the number of auxiliary variables from 8610 to 324 auxiliary variables, which the active negation reformulation can further reduce to 243 auxiliary variables. In the state- centric model of English Peg Solitaire, we observe the greatest reduction of about 28%, where in a typical instance, first, basic CSE yields a reduction from 19,313 auxiliary vari- ables to 7,533, which the active negation reformulation further reduces to 5,425 auxiliary variables.
In summary, we observe a considerable reduction of auxiliary variables in three problem classes, whose effect on solving time we investigate in the following.
0.65 0.8 0.9 1 1.1 1.2 1.35 0.05 0.1 0.5 1 5 10 80
Tailoring Time Factor
Tailoring Time with active Negation Reformulation (sec)
Problem Classes (Group A) langford2 (Minion) langfordN (Minion) nQueens (Minion) bibd (Minion) quasiGroup3I (Minion) quasiGroup5I (Minion) quasiGroup5NI (Minion) quasiGroup7 (Minion) 10% less time with neg-ref 10% more time with neg-ref same tailoring time
0.65 0.8 0.9 1 1.1 1.2 1.35 0.05 0.1 0.5 1 5 10 80
Tailoring Time Factor
Tailoring Time with active Negation Reformulation (sec)
Problem Classes (Group B) cc (Minion) cwM1 (Minion) cwHerald (Minion) knightsXCSP (Minion) queensKnightsMul (Minion) queenAttacking (Minion) sokoban1 (Minion) sokoban2 (Minion) quasiGroup3NI (Minion) quasiGroup4I (Minion) quasiGroup4NI (Minion) paq2 (Minion) 10% less time with neg-ref 10% more time with neg-ref same tailoring time
0.65 0.8 0.9 1 1.1 1.2 1.35 0.05 0.1 0.5 1 5 10 80
Tailoring Time Factor
Tailoring Time with active Negation Reformulation (sec)
Problem Classes (Group C) golomb (Minion) pegState (Minion) pegAction (Minion) plotting (Minion) knights (Minion) nQueensNaive (Minion) paq1 (Minion) paq3 (Minion) 10% less time with neg-ref 10% more time with neg-ref same tailoring time
Figure 8.7: Tailoring Time Comparison between tailoring with basic CSE and tailor- ing with basic CSE and the active negation reformulation on problem groups A(top), B(middle) and C(bottom). The y-axis represents the factor with which the tailoring time differs between both tailoring options: points above y = 1 depict cases where tailoring
time wasdecreasedwhen applying the active negation reformulation, points below depict cases where tailoring time wasincreased.
Tailoring Time with Active Negation Reformulation
Fig. 8.7 depicts the increase and decrease in tailoring time when applying the negation reformulationin additionto the basic CSE procedure. It shows three graphs, one for each problem group. In each graph, the x-axis represents the tailoring time with the active negation reformulation and the y-axis depicts the time factor with which tailoring time has been reduced due to the reformulation: all points above y = 1 represent instances
that have been tailored in less timewith the active negation reformulation and all points
belowy = 1represent instances that took longer to tailor with the negation reformulation.
The factor illustrates the percentage of the increase or reduction, respectively. For instance, instances that are positioned at 1.2 have been tailored using 20% less time with the negation reformulation than those tailored only with basic CSE.
Problem Group A The top graph shows tailoring time for Problem Group A, that con-
tains problems that can not be further enhanced. The instances are spread equally below and abovey= 1and most are positioned between 1.1 and 0.9, i.e. the tailoring time differs
mostly around∓10% which is a small difference (in particular since the main overall tai-
loring time lies in between 0.1-0.5 seconds) that is to be expected between separate runs on the Java virtual machine. Therefore, we conclude that adding the negation reformulation to the tailoring process has no significant impact on the overall tailoring time of problems without scope for enhancement.
Problem Group B The middle graph in Fig. 8.7 shows the tailoring time difference for
problems that have a fair to medium scope for enhancement. Note, that none of these prob- lems actually profit from the negation reformulation. Similar to Problem Group B, there is no significant overhead from adding the negation reformulation: instances are positioned in a balanced way below and above y = 1 with the majority within the ∓10% range of 1.1 to 0.9. Hence, we conclude that adding the negation reformulation to tailoring does not affect the overall tailoring time of problems in class B.
Problem Group C Problem group C consists of those problems that have the largest
scope for enhancement and the respective tailoring time is given in the bottom graph of Fig. 8.7. Most interestingly, the tailoring time does not change notably in those cases where the active negation reformulation applies (Peaceful Army of Queens 3, Peg Solitaire State and Plotting) and, similar to groups A and B, the overall tailoring time is quite the same with or without the negation reformulation.
0.8 1 1.2 1.5 2 2.5 0.001 0.01 1 10 100 1000
Solving Speedup Factor
Solving Time active Negation Reformulation (sec)
Problem Classes (Group C) pegState (Minion)
plotting (Minion) paq3 (Minion) solved in 50% less time solved in half the time solved in same time
1.1 2 5 10 20 40 100 300 500 1000 2000 3000 5000 0.01 1 10 100 1000
Solving Speedup Factor
Solving Time active Negation Reformulation (sec)
Problem Classes (Group C) golomb (Minion) pegState (Minion) pegAction (Minion) plotting (Minion) knights (Minion) nQueensNaive (Minion) paq1 (Minion) paq3 (Minion) solved in 100x less time solved in 10x less time solved in 5x less time solved in same time
Figure 8.8:Solving Time Speedupin solver Minion using theactive negation reformula- tionduring tailoring, compared to the reduction achieved by basic CSE (top) and compared to no enhancement (bottom). They-axis represents the solving time speedup factor, for ex- ample, points aty= 3have been solved 3 timesfasterwith CSE then without.
Solving Time with Active Negation Reformulation
Finally, we consider the impact on solving time in the three problem classes where the ac- tive negation reformulation managed to achieve an enhancement. Fig. 8.8 shows the impact of the active negation reformulation in solver Minion. The top graph depicts the speedup obtained in comparison to basic CSE (i.e. how much the active negation reformulation can improve the speedupon top of basic CSE). Here we observe that the active negation reformulation can achieve a speedup of 2.2, i.e. instances can be solved in less than half the time than those where only basic CSE is performed. The speedup is also proportional to the number of reduced auxiliary variables - in Plotting, where we have only a reduction
of 7%, the speedup is marginal, while in the peaceful armies of queens, where the active negation reformulation gains a reduction of almost 30%, we observe the largest speedup. The bottom graph shows the overall enhancement, comparing basic CSE combined with the active negation reformulation to tailoring without any optimisations. The benefits we ob- serve are very significant, reaching speedup factors of almost 3,500. These figures demon- strate that the combination of basic CSE and the negation reformulation can be extremely beneficial.
Summary: Active Negation Reformulation
In summary, our experiments have given evidence that the active negation reformulation does not add any notable overhead to the tailoring process (independent of whether if the respective reformulation is applicable to the instance) and can achieve impressive speedups in problem classes where the reformulation can reduce the number of auxiliary variables. Therefore, we conclude that the active negation reformulation is an effective and important instance optimisation technique that should be integrated into every tailoring tool.