-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
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.
Metadata
Metadata
Assignees
Labels
No labels