Tuesday, April 3, 2012

The Twelvefold Way

1...2...3.

The triple gems (Ratnatraya) in Jainism are Right Vision, Right Knowledge, Right Conduct. The first involves belief and conviction, the second clarity and reality, and the third action and application. This is similar to the eightfold path of Buddhism, which can be broken down into Wisdom (right view and intention), Conduct (right speech, action, and livelihood), and Concentration (right effort, mindfulness, and concentration).

As you might expect, the twelvefold way is also a paradigm with great power and application. However, it has absolutely nothing to do with ethics, and instead is used to count! I know what you're thinking: "Look, I know how to count. Why on Earth would you need a twelvefold way to do something as simple as counting?" The short answer is that life is full of things that are too complicated or too large to enumerate easily, and so we need combinatorics, the art of counting. Plus, if you can count something in general, you don't have to count it again. :)

So what is the twelvefold way? It is a classification of 12 commonly occurring counting problems, based on functions from a set to another set. This creates a useful simplification of larger or more abstract problems, making them easier to count. For example, how many ways are there to distribute 6 distinct candies to 3 kids? This is the same as:
  • The number of ways to put 6 items into 3 boxes, which is the same as 
  • The number of ways to line up 6 dots and 2 bars, which is the same as 
  • The number of ways to get 2 heads on 8 coin flips, which is the same as
  • The number of bit strings of size 8 with exactly 2 ones, which is the same as 
  • The number of ways to choose 2 things from 8 things.
All of these can be simplified into the same category in the twelvefold way, so once we've found the answer to that, we know the answer for all of them! Which is 28, by the way. 2 and 8, see? :D

No comments:

Post a Comment