• This is the home page widget area. You can use this space to add an introductory message to your blog with a Text Widget or add any other widget here.

Summer is ending :(

A beautiful summer is coming to an end and I am at the last leg of my Gsoc. I must apologize for the erratic posts but its mostly because I was “busy” with other things (mostly enjoying myself in the US of A, eating steaks, going out for barbecues, and enjoying the beautiful Maryland summer … Continue reading



This week I implemented generational routines for Fixed density Lyndon words, necklaces and Debruijn cycles. Its still not completely tested so caveat emptor! You can check it out in my iterables branch. Apart from this I got the Permutations branch merged in this week. This was a long standing pull request and will allow folks … Continue reading

Permutation groups and Prufer codes

The last week was a bit hectic. It was the first time I had even been on a 13 hour flight. I had implemented Prufer codes before I left, which is basically a one-to-one mapping to labelled trees. Using Prufer codes, we can generate trees in an ordered manner, rank and unrank them and do … Continue reading

Networkx integration

So this week I managed to integrate the work I had done on the generation algorithm for iterables. It seems that people want implementations of complex objects for the sake of completeness as well as for its educative value. More on this later. So networkx integration is almost done. The code is a clinical wrapper … Continue reading


I spent the last week implementing some rather esoteric combinatorial objects such as Necklaces, Lyndon words and Chord diagrams. Up until now, all such generation algorithms were being dumped in the /sympy/utilities/iterables.py file. With the introduction of slightly more complex generation algorithms community member Chris Smith raised the question of the underlying motivation of such … Continue reading

Derangements, bell permutations, involutions and more

The last few days I have been implementing mostly generic iterables algorithms to generate various combinatorial objects such as Bell permutations, involutions and derangements, cyclic permutations and up-and-down permutations. As I have mentioned before, this goes more into the exercises portion of TAOCP. This is why the algorithms implemented for these routines are not the … Continue reading

Week 3

This week I continued with my work on partitions. The multiset algorithm I had implemented earlier had bugs involving overgeneration and generating incorrect output for some cases. Those were fixed by adding a cache, although the problem of overgeneration remained. That can be fixed to an extent by sorting in the canonical order before we … Continue reading

Week 2

The last week I worked mainly on subsets, gray codes and partitions. Most of the functionality for subsets and gray codes is complete and a lot of progress has been made on the partitions front as well. Since last week Chris Smith updated the integer partition algorithm to include compositions as well. So apart from … Continue reading

Week 1

I had been working on implementing the functionality provided by combinatorica for the Permutation object. Most of the features provided by combinatorica are now implemented for Sympy but a few outstanding issues need some resolving. The most egregious of which is the lack of a next() and a prev() function. Some of the extras that … Continue reading

Hello world!

Hello world! This blog is intended to chronicle what IĀ perceiveĀ is going to be an awesome summer. I have been selected in the GSoC program for the 2011 edition under Sympy. My task this summer will be to implement a combinatorics package. More details to follow.