
This program is copyright of Samuel Peterson and Jesus De Loera (1999).

# You can copy it freely, but it is distributed without any guarantees.
  about performance or correctness of output. It can not be used as part
  of commercial software without written permission of the authors.
  It can be distributed as part of other free software with the condition
  that this README file be included too.

# The author requests you send him a note if it is useful to you.
  Please contact at deloera@math.ucdavis.edu We would love to hear 
  what you are doing! Please report all bugs to the same addresse.

BASIC INFORMATION:

This collection of C++ programs generates CPLEX (TM) readable
Integer programs that model the so called UNIVERSAL POLYTOPE:
This is the 0-1 polytope whose vertices are the incidence 
vectors of triangulations versus the possible simplices
inside the polytope. The variables of the integer program 
are in one to one correspondence with the possible (n choose d+1)
simplices for a set of n points in d dimensions. The variables 
are labeled in reversed lexicographic order, therefore the
variable x_6 for a planar point configuration with 5 vertices 
corresponds to a triangle {1,3,5}, x_7 corresponds to {2,3,5},
x_8 to {1,4,5}, and x_10 to {3,4,5}. Note that some of the
triangles when the 3 points are collinear are not existent.
In that case x_i=0.

For details see article De Loera J.A., Hosten  S.,  
Santos F., Sturmfels B. `` The Polytope of All Triangulations of a Point 
Configuration'', Documenta Mathematica, 1, 1996, 103-119. Available via www at
http://www.mathematik.uni-bielefeld.de/documenta/vol-01/vol-01.html.

This distribution contains a Makefile that should work in most systems,
it also contains a collection of interesting data files.

1) Type make followed by return

2) The executable file ``triangulate'' is generated.

3) Example datafiles are included as well. Type triangulate and hit
return, then the program asks for the name of a data file 
IMPORTANT: the data file must be in the same directory as triangulate!
reads the file and then asks the kind of information requested:
The set of cocircuits for the oriented matroid of the point configuration
OR the set of equations for the IP model of the universal polytope.
These are options C or U respectively.

4) if the C option was chosen then the result is written in the file
cocircuits that contains several 0,1,-1 vectors with the precise oriented
matroid information. NOTE: It is mostly MAPLE readable set of lists but
it requires editing!!

5) if the U option is chosen then the result is stored in two files
with the same name as the input file but with extensions .min and .max
respectively. One is used to minimized and the other to maximize the
same objective function, the sum of all the variables.
The user can use an editor to change the objective function or add new
constraints because these are text files.

6) The files name.min and name.max can be read into CPLEX by using
the command read, it will ask for which format and one should answer
with ``lp'' which is the text format produced. Once in memory the
command ``optimize'' gives the answer. To see the minimal and maximal
triangulation and needs to use the ``display solution'' command.
Each non-zero variable resulting from solving an integer program will
be display and those corresponds to the simplices of an optimal triangulation.
REMEMBER: The simplices are labeled in reverse lexicographic order so knowing
the indices uniquely determines which simplices are present!!!

For ease of use, there is a subroutine called ``encode.cc'' available with
the C++ package. Compile that file (make encode) and store the indices you
got from CPLEX separated by spaces or returns into a file with the name ``codes''. The program encode will read the numbers and ask you some easy questions and print the simplices for you.


7) Please note that imprecision due to numerical errors can seriously
affect the answer. When possible the user should work with integer data.




