Format Descriptions

Please consider in in addition to the specifications below that the file should have unix-style line termination (LF only) in order to support a proper handling.


Text-file Format .mc for Maximum Cut on a Graph G=(V,E)

A file adheres to the ``mc'' file format if:

  • It is a plain ASCII file with extension ``.mc''.
  • Its comment lines begin with ``#'' and appear only at the beginning of the file.
  • Its first non-comment line contains exactly two positive integers nnodes and nedges in this order and separated by a single whitespace. These specify the number of nodes |V| and edges |E| of the defined graph, respectively.
  • Its first non-comment line is succeeded by nedges lines that contain two positive integers en1 and en2, and one decimal number weight, each separated by a single whitespace. Here, en1 and en2 specify the two endnodes of the respective edge which may be in any order, but must be different (no self-loops allowed) and from the interval [1, nnodes]. The entry weight specifies the edge weight according to the maximization objective (1.0 for no, i.e., unit weights) which must be non-zero.
  • No two of the nedges lines just prescribed refer to the same two endpoints.


Text-file Format .bq specifying Q for Binary Quadratic Optimization (min x^TQx subject to x in {0,1}^n)

A file adheres to the ``bq'' file format if:

  • It is a plain ASCII file with extension ``.bq''.
  • Its comment lines begin with ``#'' and appear only at the beginning of the file.
  • Its first non-comment line contains exactly two positive integers dim and nnz in this order and separated by a single whitespace. These specify the dimension (of the variable vector x, or equivalently, of the number of rows and columns of the matrix Q in the function f(x) = x^TQx to be minimized), and the number of non-zero entries in Q respectively.
  • Its first non-comment line is succeeded by nnz lines that contain two positive integers row and col, and one decimal number entry, each separated by a single whitespace. Here, row and col specify a row and a column index of Q, i.e., must be from the interval [1, dim], and entry is the coefficient for that position which must be non-zero.
  • For any fixed i in [1, dim], at most one of the nnz lines just prescribed has both row and col equal to i.
  • For any fixed pair i,j in [1, dim] such that i < j, at most one of the nnz lines just prescribed has row equal to i and col equal to j.
  • For any fixed pair i,j in [1, dim] such that i < j, at most one of the nnz lines just prescribed has row equal to j and col equal to i.