on facets and unordered combinations

I have to come up with some sort of basic taxonomy for our files at work, so today I was doing some research to help my mind get where it needs to be.

First, I need to mention this really nice PowerPoint on developing a taxonomy for work called "Getting Started with Business Taxonomy Design". It got me thinking about tags and how if I tagged something with four tags, "a", "b", "c", and the equally dull "d", then I could calculate the number of ways I could filter down to a set of results that would contain that document.

I don't know if my thinking is correct, but I'm thinking there should be 15 ways to get to that document with four tags because I should be able to filter, inclusively, not only by each individual tag but also by unordered combinations of those tags, i.e. tagged with both "b" AND "a", etc.

So, I read this neat page on calculating unordered combinations for a set and wrote a Python script, below, to calculate the total. I had to also see this page about what the value of zero factorial is as I'd assumed it would be undefinable.

The script tells how many unordered combinations for four tags there would be for a group of four tags (i.e. all of them), then three, then two, then each of the four.