/* This program outputs a matrix whose determinant is the number
* of domino tilings of the input region. The matrix should be fed
* to Maple. This input format allows for computing the number of
* matchings of any bipartite planar graph.
*
* The region should be given as a pattern of V's, A's, <'s, >'s, and X's.
* All characters after a percent are ignored. Currently, the input must
* fit in a rectangle with 500 rows and 200 columns.
*
* A useful command line format for this program is:
*
* vaxmaple < region | maple -q
*
* Greg Kuperberg, Jim Propp, and David Wilson
*/
#include
#define WIDTH 202
#define LENGTH 502
#define FREE -1
char pict[LENGTH][WIDTH];
int p[LENGTH][WIDTH];
char gap[LENGTH][WIDTH];
main()
{
int i,j,k;
int rows,columns;
for (i=0; i