Blog Moved

Future posts related to technology are directly published to LinkedIn

Friday, October 14, 2011

Most efficient multi-set Cartesian join in C

At the beginning of my career, with Indian Space Research Organization, I have been posed with a challenge that required implementing a multi-set Cartesian product with absolutely minimum memory usage to solve an optimization problem. (see my old post on description of the problem: Simple looking Complex problem  )

As a tribute to Dennis M Ritchie (also known as dmr) the creator of C language, who passed away yesterday, I am posting my implementation of this algorithm in C language.

I consider the above seven "highlighted" lines of C code as one of the earliest and most notable achievements of my career! 

If there is any better implementation to solve the stated problem please let me know by posting a comment.....  
Post a Comment