You could do the following things:- 1. Try using a file to store all the intermediate results and the final output, rather than an array list or other class which stores the data in the main memory. This would mean no usage of the standard JAVA classes and low level programming but might just work by creating a huge file. This approach can scale upto several GBs.
2. If you only want the results to be displayed and not store them anywhere, then maybe you could work around the code to remove the arraylist called result and display the results then and there, I am not sure upto what levels this approach would scale up. 3. A lazier go at it would be to get in a good Database like Oracle and write an SQL query to do the join. My guess is that if it cannot be done by such a DB no one can do it without years of work [:D] On 4/25/06, Mukul Gandhi <[EMAIL PROTECTED]> wrote: > > Just to add to my question, I would like the cartesian product program > to scale upto 81 sets, and the cardinality of each set can be maximum > 9. > > I calculated that the resulting cartesian product will have > 1.9662705047555291361807590852691e+77 elements. I think it is difficult > to store this cartesian product without having large amount of memory > installed. I have only 512 MB on my PC which is running Win XP on P4. > > A friend of mine told me that iterator design pattern could be useful > in this scenario. Probably someone could give me ideas on this line. > > Regards, > Mukul > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/algogeeks -~----------~----~----~----~------~----~------~--~---