Generating Ising spin glass problems

Problems with any total edge weight

These problems are generated using the fortran program initpgen1-1write.f. This program calls random.f as a subroutine. You can compile them using
f77 initpgen1-1write.f random.f -o initpgen1-1write
for example. If you are using SunOS 5.6 (Solaris), you can download the executable directly.

A sample input file is contained in fort.7; this produces the output contained in fort.9. The output produced by my cutting plane code for this problem is contained in out40. In general, an input file must be placed in fort.7, and the generated problem will be sent to the standard output.

The problems are generated on a square grid, embedded on a torus. Thus, every vertex has four neighbours. The input file fort.7 contains two parameters: the size of the grid and the seed. The first row of output gives the number of vertices, the number of edges, and the seed. Subsequent rows list the endpoints of each edge together with the cost of the edge. The objective is to choose a cut that minimizes the sum of the weights of the edges appearing in the cut. Every edge has cost +1 or -1, evenly distributed.

The sum of the edge weights produced by this generator may be anything. For a generator where the edge weights are forced to sum to zero, look here.

Seeds and energies for several problems are available (there are 100 problems of each size):

Note that

energy = (2*(value of optimal cut) - (sum of edge weights)) / (number of vertices)

Back to my homepage.