Peter, Yes, I know rather more about problems like the one you describe than I now want to know. They are eminently soluble, albeit tedious the first time around.
I have another (social, with my wife) commitment tonight; but I will send you a skeletal treatment of your requirement tomorrow. Without information about the maximal sizes of the problems you want to treat, I shall assume trhat they are fairly large but not huge. John Gilmore, Ashland, MA 01721 - USA
