/********** 
  ILPS (Iterated Local & Plateau Search) for
  the Minimum Independent Dominating Set Problem

  Copyright 2018 Kazuya Haraguchi
  Released Under the MIT License
  https://opensource.org/licenses/mit-license.php
**********/

/*** About this package ***/
- Makefile
- main.cpp ... main C++ file
- define.h ... common header file
- init.{cpp,h} ... functions for initialization
- construct.{cpp,h} ... functions for constructing an init solution
- misc.{cpp,h} ... misc functions

NOTE: The followings are produced by others. 
- mt19937ar.{cpp,h} are used to generate random numbers by Mersenne Twister.
  http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/mt19937ar.html
- cpu_time.cpp is used to measure the time. 
  http://tutimura.ath.cx/~nob/c/


/*** Compilation ***/

To make the program, type

  $ make ILPS2   # ILPS with k=2

or

  $ make ILPS3   # ILPS with k=3


/*** Usage ***/

To run the program, input the data file to the program by means of pipe;

  $ cat grid_10.mis | ./ILPS2 -time=10   # timelimit is set to 10sec

If the data file is gzipped, then use "zcat" (linux) or "gzcat" (macos);

  $ zcat grid_10.mis.gz | ./ILPS2 -seed=234   # random seed is set to 234  

Option -h lets you see the options.

  $ ./ILPS2 -h


/*** File format ***/

We employ an original format of a data file.

See grid_10.mis. 
This file contains data for a 10x10 grid graph.
(Similarly, grid_{20,50,100}.mis correspond
 to 20x20, 50x50 and 100x100 grid graphs, respectively.)

The first 4 lines of this file are as follows. 
---
180 100
1 1 1 1 1 ...
2 1
3 2
--- 
The 1st line has:
  (#edges) (#vertices)

The 2nd line has weights of vertices.
Currently we deal with the unweighted MinIDS problem,
all weights should be 1.
In this case, as there are 100 vertices,
one-hundred 1's are written in the 2nd line.

In the rest of the file, 
each line corresponds to one edge,
and it is represented by extreme points.
So there are edges (2,1), (3,2), and so on.
Note that the vertex index begins from 1, not from 0.


