IOHprofiler / IOHprofiler.github.io

This is the documentation repository for IOHprofiler
https://iohprofiler.github.io
Other
3 stars 2 forks source link

Check ISING Model Formula on PBO suite website #2

Open thomasWeise opened 4 years ago

thomasWeise commented 4 years ago

Hi.

On the Pseudo-Boolean Optimization (PBO) website (https://iohprofiler.github.io/Suites/PBO/), the ISING model is defined as: sum over x[i]x[j] - ((1-x[i])(1-x[j])):

$[ISING:] \sum\limits_{\{i,j\} \in {E}} \left[x_{i}x_{j} - \left(1-x_{i} \right)\left(1-x_{j} \right) \right] $,

However, it is implemented, e.g., in f_ising_1D.hpp, as x[i]x[j] + ((1-x[i])(1-x[j])):

        result += (x[i] *first_neig) + ((1- x[i])*(1- first_neig));
        result += (x[i] *second_neig) + ((1- x[i])*(1- second_neig));

Notice the difference between the + and the - in the middle.

I think the implementation is correct. The Ising model should have global optima at all-0 and all-1. You get this only with the +, because then, you have 1*1+(1-1)(1-1)=1+0=1 for the all-1 string and 0*0+(1-0)(1-0)=0+1=1 for the all-0 string (times N of course). Otherwise you would have get 0-1=-1 for the all-0 string.

thomasWeise commented 4 years ago

(Regarding "I think the implementation is correct" above, I now have second thoughts, but there I might be wrong. Please check: https://github.com/IOHprofiler/IOHexperimenter/issues/26)

thomasWeise commented 3 years ago

[See also newest comment on https://github.com/IOHprofiler/IOHexperimenter/issues/26]