kaif,
Thank you for replying. It will take me some time to digest it. Since having posted it I have already discovered better and faster ways of doing things. For instance, the generation of the powerset which took 66 minutes in Java only takes
3 minutes in C. I have lots of fun projects on the back burner that take precedence over this but perhaps I might post a "How I would do it today" sometime in the future.
Thanks again for the code and the description - I am sure I will learn a lot from it.