Experiments/Benchmarks

We have experimented cloopD on Niemelä's encoding of the Hamiltonian circuit problem and DLV's encoding of the Hamiltonian circuit problem, and consider graphs with the special structure. Specifically, we create some copies of a complete graph, and then randomly add some arcs to connect these copies into a strongly connected graph such that Hamiltonian circuit for this graph must go through these special arcs. The problems are first grounded by gringo (version 3.0.1, The result is similar when programs are grounded by Lparse (version 1.1.2)), then computed by different ASP solvers. For these programs, information from cloopD makes clasp (version 1.3.4), claspD (version 1.1) and cmodels (version 3.79) run much faster when looking for an answer set, as demonstrated in Table 1 and 2.

Our experiments were done on a 4XAMD Opteron 844 (1.8GHz) CPU and 8GB RAM. The reported times are in CPU seconds as reported by Linux "/usr/bin/time" command.

In Table 1 and 2,   NxM stands for a graph with M copies of the complete graph with N nodes: C1, ..., CM,  and with exactly one arc from Ci to Ci+1,   for each 1iM ( CM+1 is defined to be C1 ).  We randomly created 20 different graphs for each NxM, and the times reported in the table refers the average times for these corresponding 20 problems. ">2h" indicates the run didn't return in two hour, "cmodels with cloopD", "clasp with cloopD", and "claspD with cloopD" stand for the running time for cmodels, clasp, and claspD after adding constraints returned from cloopD to the program. Note that,  cloopD returns literals that can be computed by an iterative procedure based on unit propagation from the program completion and the loop formulas of loops with at most one external support rule, i.e. the function T1(P) in the paper. Thus "cmodels with cloopD", "clasp with cloopD", and "claspD with cloopD" used here refer to "comdelsT1", "claspT1", and "claspDT1".

 

Table 1: Run-time Data for Normal Logic Programs.

  Problem      cmodels      cmodels with cloopD     clasp    clasp with cloopD     cloopD   

10x10

9.93 0.70   0.07   0.05  0.29
10x20 18.24 2.50 0.24 0.13 0.63
10x30 38.66 5.16 0.57 0.25 1.03
10x40 85.15 7.98 1.05 0.38 1.52
10x50 73.31 14.12 2.10 0.48 1.97
15x10 586.57 5.42 0.46 0.19 1.02
15x20 >2h 12.62 1.24 0.52 2.26
15x30 >2h 25.07 6.46 0.68 3.64
15x40 >2h 45.24 100.80 1.58 5.47
15x50 >2h 72.09 234.00 2.33 7.14
20x10 2080.62 19.62 0.73 0.44 2.47
20x20 >2h 67.38 25.04 1.19 5.59
20x30 >2h 147.72 85.82 2.81 8.85
20x40 >2h 219.62 465.13 4.36 13.01
20x50 >2h 352.35 2940.28 6.20 17.36

 

Table 2: Run-time Data for Disjunctive Logic Programs.

  Problem      cmodels      cmodels with cloopD     claspD    claspD with cloopD     cloopD   

10x10

1194.90* 2.44   0.14   0.12 0.38
10x20 1318.68* 5.48 0.61 0.35 1.23
10x30 580.491 16.01 2.63 0.85 2.53
10x40 2318.57* 32.27 8.42 2.64 4.53
10x50 1864.36* 57.06 13.40 4.55 6.59
15x10 >2h 9.86 0.66 0.54 1.76
15x20 >2h 33.67 4.56 1.56 6.04
15x30 >2h 60.76 14.99 3.41 12.81
15x40 >2h 122.00 40.02 9.15 22.56
15x50 >2h 211.29 96.31 17.13 35.08
20x10 >2h 16.03 2.04 1.54 5.20
20x20 >2h 75.38 13.68 4.49 19.21
20x30 >2h 189.10 58.17 8.86 39.19
20x40 >2h 416.63 120.32 22.03 73.75
20x50 >2h 728.85 251.15 36.86 136.77

                                                                             *The program does not terminate in 2 hours for some instances, we count their time as 2 hours.

 


Jianmin Ji
Last modified: Thursday December 9 2010