Tag Archives: multiset

Competitive programming in Haskell: building unordered trees

In my previous post I challenged you to solve Subway Tree System, which encodes trees by recording sequences of steps taken away from and towards the root while exploring the whole tree, and asks whether two such recordings denote the … Continue reading

Posted in competitive programming, haskell | Tagged , , , , , , , , , | 15 Comments

Math.Combinatorics.Multiset and Sawada’s algorithm

I’ve uploaded a new version of my Math.Combinatorics.Multiset library (see the previous announcement here). I’ve added a few more fairly simple algorithms (splitting a multiset into two pieces in all possible ways; finding all size-k submultisets of a multiset), and … Continue reading

Posted in haskell, links, math | Tagged , , , , | 4 Comments

Math.Combinatorics.Multiset

Just a quick note to say that I’ve just uploaded a new package, multiset-comb, to Hackage. It primarily has functions for generating all the distinct permutations and partitions of a multiset (a set where elements are allowed to occur multiple … Continue reading

Posted in haskell, projects | Tagged , , , , | 4 Comments