Welcome to the

Multinomial Theorem page

This page is dedicated to the Multinomial Theorem. The Multinomial Theorem allows us to raise any number of terms to an arbitrary power (see above expression). I was very fascinate by this theorem because right away I saw it could be (easily) implemented on the computer using the recursive paradigm. Right away I set to work to try to convert the "book's" definition into something the computer could understand. Within that same class period, I had devised the recursive algorithm. The following day, with some minor help from P. Sally (thank you), I was able to write a recursive function in C++. It compiled and worked almost perfectly the first time. After some minor adjustments and corrections, I was able to raise a multinomial with up to 10 variables to the 10th power. That is as far as it would go because the compiler I was using was limited to 32-bits. I am currently working on a class that will be able to accommodate for up to 64-bits, allowing much higher powers and numbers of variables. I am almost done, but the multiplication and division, the most crucial parts of the class are unbelievably slow. If anyone has any suggestions for enhancements, they are welcome.

The output is considerably large, on the order of 700 pages. It would be a threat to the survival of the Amazon rain-forest if printed, and so I do not advise it!


Copyright © 1998, by Dan Hussain
All rights reserved, unless otherwise stated.