Hacker News new | past | comments | ask | show | jobs | submit login

I found the way of counting the number of permutations useful.

The Hockey stick identity was something long forgotten and fun re-discovering.

The way they are generated not so much.

So, Sedgewick has an algorithm for generating permutations that are highly efficient, and ijust as difficult to grasp. But there is a paper out there where he explains the algorithm graphically, which makes it understandable.

So I haven't worked through the way to get the composition that is the n'th permutation yet, but I guess I will suffer.

It is not well written, and for instance the wrong term for partition, versus composition is made in the explanatory graphic at the top of the article.

Still, I think it was worth reading, I have made several programs utilizing permutations, and I might improve one or two of them after having read this, with some new knowledge.






Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: