Let Me Count the Ways


I was working in my office when I heard a soft knock on the door.  Daniel was working on his homework down in the kitchen.  Normally if he finishes it without issue, the completed pages get slipped silently under my door to be checked.  He only knocks if he gets stuck.

“I’m not sure how to do this problem,” he said, pointing to the bottom of the sheet.  I took a look.

“There are eleven kids in the class.  Three of them can be picked to make a team.  How many combinations of kids can make up the team?”

It sounded simple enough.  From the depths of my mind, I recalled the word “factorial”.  Basically it means the first time you pick a kid, you have eleven to choose from.  Then the second time you pick you only have ten to choose from.  The third time you pick you have nine to choose from.  It doesn’t matter which kids you pick, you will always have these same numbers of kids.  The numbers are what are important (it’s math, after all).  So, I multiplied 11 x 10 x 9 and came up with 990 possible combinations, patted myself on the back and went back to troubleshooting a recalcitrant SQL Server.

N FactorialWait a minute.

There was a trick in there.  While there were 990 possible combinations in terms of the kids and the order they were picked, there were actually less real combinations.  That is, my calculation would count Tom, Dick and Harry on a team as a different team than Dick, Tom and Harry.  In the real world the order they got picked wouldn’t matter because – in the real world – the kids are what is important.

I knew there had to be a way to do this.  I even – sort of – remembered doing it when I was around Daniel’s age.  That was the problem; I hadn’t done it in the thirty years since.  I couldn’t even think of what the concept was called to look it up.  In the end, it took two hours, three adults plus a lucky find online to figure out the answer.

“You better not go on that show!” laughed Daniel.  I knew it had to happen eventually; one of these days he was going to bring home something I couldn’t do.  I’m secure enough that I can admit I don’t (quite) know everything, so I laughed along with his joke… though – to be technical – I was smarter than a fifth grader.  After all, Daniel hadn’t known what the answer was either.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s