
The enclosed *.m files are the parts of a Matlab program, which reconstructs
a 0-1 matrix from its line sums. For a detailed description of the underlying
problem and of the implemented algorithm, see the file paper.ps.

In fact this program was used to test the algorithm outlined in paper.ps.
Hence the program starts from a (random or user-defined) matrix f, calculates
its line sum, and then finds another 0-1 matrix (or at least a matrix having
small entries in absolute value) which is of the same size, and whose line
sums coincide with those of f. The program uses four parameter values: p_1,
p_2, p_3 and p_4. Their values originally are p_1=0.6, p_2=round((m+n)/2)
(where mxn is the size of the matrix obtained after the "peeling" part),
p_3=0.5 and p_4=0.5. If you would like to change these values, then you
should edit the file reconstruct.m.

To run the program you need Matlab V 2.0 or later. Copy all the *.m files to
the library Matlab/bin. Then run Matlab and load the file reconstruct.m. After
having done so, you have two possibilities. If you would like to process a
random matrix of size mxn, type "reconstruct([m,n])" at the command window.
If you would like to process a preliminary defined matrix f, type "reconstruct(f)"
at the command window. In both cases the output will be written to the file
"out.mat". If you would like to test the program for the matrices in
paper.ps, then copy the fx.mat files (where x runs from 1 to 11) to
Matlab/bin, too. Then before starting "reconstruct", open the workspace fx.mat with
the desired x. Then type "reconstruct(f)", take a comfortable seat and relax ...
(Especially if x=11.)

Please note that we do not take responsibility for any kind of problems
coming from the use of this program. In case you have technical comments or
questions about the program, please contact Szabolcs Tengely
(tengely@math.leidenuniv.nl). Having theoretical comments or questions about
the algorithm, please contact Robert Tijdeman (tijdeman@math.leidenuniv.nl)
or Lajos Hajdu (hajdul@math.klte.hu).
