Layout pattern of the representation for the first nine binomial coefficients.
Polynomials play an important role in many fields of mathematics as well as in other areas such as physics and engineering. Binomials and multinomies represent a special kind of polynomials, regarded as a wide frame of study by some mathematical branches such as discrete mathematics. Under this subject a novel method was recently developed that addresses the task of performing the calculation of binomial and multinomial coefficients, by means of the setting of an arrangement of sequences of summations. The document unfolded hereby aims to be an extension of that work. Through this document, firstly it will be deemed an equation resultant from that work, targeted at binomial calculations, and will be extended to the multinomial instance. Afterwards a theoretical case of study will be presented, to expose the application of this framework. And lastly an algorithm will be raised to set it up on a computer algebra system (CAS), and some practical examples will be bestowed.
- binomial coefficient calculation
- multinomial coefficient calculation
Polynomials, alongside binomials and multinomies, are frequently found in many study cases, even outside pure mathematics affairs, like . Recently in  a novel method was developed to calculate binomial and multinomial coefficients, and at the same time, it was shown that a different way of expansion could be set by means of arrangements of summations and sequences. For this purpose three analytic formulas were raised. Formula (3), the first one, whose output depicts sequences of incremental numbers, so that after performing those sums, a numeric value is obtained that actually represents a binomial coefficient. The second one is formula (4), whose output comprised of sequences of , so that after such sums are performed, the binomial coefficient was also computed; it was exactly the same value as the first one (series of unity rather than being incremental sequences). A proof for Eq. (3) was given, but not for Eq. (4); however, it could be carried out exactly the same way. Then formula (3) was taken to extend that result to the multinomial instances, through the application of a method developed there; a proof for the multinomial case was not given. Some examples were exposed to illustrate the applications of those equations. On the other hand, some things were overlooked, i.e., the proof that were just mentioned and another set of examples that could illustrate even more the applications of the obtained result.
This document comprises the extension of the results obtained from . This extension will based upon formula (4): It will be explained in more detail, oriented towards the developing of an algorithm to perform the calculations; this formula will be extended to obtain a general one to achieve the calculation of multinomial coefficients, using the procedure from ; a proof for this general formula will be given. The theoretical application of formula (4) will be shown in some other case study, taking over a lemma from  and developing an alternative proof by these means. As it was mentioned above, two algorithms based on this result are worked up and were implemented as a program in a computer algebra system (CAS). For its best understanding, this chapter was in general written in the order just mentioned above. For the reader’s convenience, and in order to get a broad understanding of this chapter, it is highly advisable to give a read at the original document .
2. Mathematical framework
2.1 Fundament for summands
Let be a field , and the ring of polynomials in the indeterminate x, by the generating set of
Now, denote the set of polynomials with positive coefficients of degree at most over , by
and let A be the set of the coefficients of those polynomials:
Definition 2.1. A subset of the real numbers is said to be inductive if it contains the number , and for every in , the number is also in . Let be the collection of all inductive subsets of . Then the set  of positive integers is defined by the equation
Definition 2.2. Lexicographic ordering:.
We say  , if we have the following conditions:
for some non-zero entry, i.e., for some .
Recall the mapping from 
by the equation
where the widehat script in the binomial terms (, ) was placed to distinguish those from the index set of the summation sequences, and provided that represents the set of a sequence of consecutive characters in the lexicographic order, by the half-open interval,
Under this outline, we would have the following ordering:
It is of great importance that we could establish a counting relation between them in order to be used in an algorithm.
Lemma 2.3. Existence of a choice function.
Given a collection  of nonempty sets (not necessarily disjoint), there exists a function
such that is an element of , for each .
A bijection between and can now be established. Consider the collection of residue classes which have a multiplicative inverse in :
By  we have
when and are relative prime integers. However, we will set , to define the following applications:
Let and be an index set; define
By the Lemma 2.3 we can construct
Then the composition will be the searched function:
This could be graphically represented in Figure 1.
Definition 2.4. A set is said to be infinite if it is not finite . It is said to be countably infinite if there is a bijective correspondence:
In the next theorem, the collection is countable:
Theorem 2.5. Let be a sequence of countable sets, and put
Then S is countable .
Since it was possible to establish a bijection between and the collection , and since each summation in (1) corresponds to just one element of , it follows that the summands in (1) are also countable.
Corollary 2.6. The set is countably infinite .
Finally, in this corollary, it follows that the tuples are countably infinite.
2.2 Extension to summands
Now that the countability of the collection was explained and a bijective function settled down to perform it, we will proceed to extend (1) to summands. Note that in  this formula remained unaltered in this sense, so that it was not extended; that is why we will do it here.
For the foremost part, another index set on a half-open interval is introduced, defined in similar way as :
The need of another index set comes from the fact that in the extension to the summands approach, a second lawyer of summands sequences and a new sequence of multipliers will arise; this way index scrambling between the two lawyers will be avoided. Then in a similar fashion, the modified function will apply:
where and are defined the same way as in the former, regarding as a superscript on the alphabetic letters.
Theorem 2.7. Principle of recursive definition. Let be a set; let be an element of . Suppose is a function that assigns to each function mapping a nonempty section of positive integers into , an element of . Then there exists a unique function
such that ,
Subindices represent a consecutive number of a summand and the amount of remaining summands after the binomial theorem expansion, respectively. Continue recursively performing the expansion:
Then the expansion above follows a pattern that can be coded into a general formula; replace the variables and according to its definition; it would end with the function
This general formula actually performs the multinomial expansion along with the calculation of the coefficients of individual terms, for an expression of summands; its proof is given on Appendix A.
Theorem 2.8. A finite product of countable sets is countable .
Since (2) represents finite products of countable sets (as it was exposed previously), it follows from theorem 2.8 that the sequence of multipliers in (2) is also countable.
3. Applications of the obtained results
Direct use of formula (1) is performed on Appendix C in , alongside the use of another general formula for multinomial expansion, similar to (2), just obtained in the last section of this document. What is exposed here are applications not covered in ; these are regarded as theoretical and numerical applications and are given next.
3.1 Theoretical application
A theoretical case application is exerted; the last results are performed to give an alternative proof for Lemma from .
Lemma 3.1. If is a prime not dividing an integer , then for all , the binomial coefficient is not divisible by .
Proof:Formula (1) will be deployed for this purpose. Since is prime, each summand in it arises from
(since cannot be factored any further). Now, suppose for the sake of contradiction that there exists a prime that divides the binomial coefficient the way it is proposed:
for some integer , where is defined to be the summation sequence function on the left side of (3).
Since formula (1) represents addition of sequences of , expanding the above and gathering out the factors, the following would be obtained:
But above there are no summands on the left side that yields an integer on the right side and at the same time fulfills:
For if it were,
so that, combining (4) and (5), it would be
which shows that indeed is all about a rational number. This contradicts the hypothesis, so the binomial coefficient is not divisible by .
There is also problem 18.41 in  where the author introduces a case of study that takes place when and are members of a commutative ring of characteristic p:
(Freshman exponentiation). Let p be prime. Show that in the ring , we have
for all [hint: observe that the usual binomial expansion for is valid in a commutative ring]. This one actually can alternatively be proven in a very similar way as the above lemma, so the proof is left to the reader. Some other study cases may come up that can be addressed with this result, where binomial coefficient calculation is part of their proof.
3.2 Numerical application
Two algorithms were written with the use of formulas (1) and (2); those were also implemented on two script programs written on the computer algebra system Maxima  and open-source software written in LISP  and based on a 1982 version of Macsyma ; of course there are many other CAS in which those can be implemented, i.e., here  is a great deal of one of them. The aim is to perform the expansion of a binomial by this result and perform the calculations of their individual coefficients. The first algorithm describes the calculation of binomial coefficients by formula (1), while the second is about the binomial and multinomial expansion based on formula (2); it also calculates the coefficients of the individual terms based on algorithm 1.
They are the exposed in the next two frames.
The implemented algorithms (1, 2) were presented above in the code displayed in Figures 2 and 3, for the first and the second one, respectively. To use the code, open a Maxima instance; then for the foremost part, in order to avoid LISP errors, issue the following command:
Next save the code above as the files coef.mc and multinom.mc, respectively, and place them in the subdirectory user of the Maxima installation (maxima_userdir can be issued; in the command line to display it). Following, issue the commands:
in order to be both loaded; or alternatively just copy the text from Figures 2 and 3, and paste it in the Maxima interface. Then use them according to each program syntax. The program multinom.mc outputs are shown in Figure 4.
A pattern of outputs (binomial coefficient values) from coef.mc was included; this is displayed in Appendix B.
With this result an alternative way to represent binomials and multinomies alongside their respective coefficient calculations was exposed. The results obtained from  were extended by broading formula (1) to the multinomial instances, by showing that those results can be applied suitably to the theoretical cases of study and by the building up of two algorithms which were implemented in two programs in the CAS Maxima. What will be remaining for a subsequent research work will be the developing and programming of an algorithm to implement the use of the general formula obtained in , whose output would be something very similar to the one presented here. But overall, some algorithm could be raised, targeted at speed of calculations, to see if this method can be at least as fast as the current ones or even faster.
I want to thank my boss, Engineer Eloy Cavazos Galindo, for his constant support and advice during the time I’ve been working in Trefilados Plant, and for giving me the opportunity to further prepare myself by studying for my master’s degree.
Union of the set of natural numbers with the zero element
Entries of binomial or multinomial coefficients
Represents the -th alphabetic character
Denotes that more summations follow a sequence
Denote a product of a summation sequence and a sequence of those products, respectively
Indexes of summations
Same as above but within (*) superscript to contradistinguish from the above
Logic operator OR; it is equivalent to (used this way due to space reasons)
Summation sequence (two or more nested operators)
Sum of the first or numbers. The subindexes indicate the different indexes of summations corresponding to the sequence it belongs to, where denotes the actual number of a summation sequence
Sum of the -th plus the -th elements, raised to the -power
The generated of a set
Sum of one to one; it equals the unity, written this way to set a starting point and give logic continuity to a sum sequence
The order of a polynomial
Indicates a sequence of summations continues on the next row
Here a proof for formula (2) is provided; let us proceed by induction on . For amount of summands, its expansion by (2) would be given by the following equation:
Fix s = 2 on (6); then the following is obtained:
that actually stands for the binomial expansion for summands; then it is correct. Now, fix on (6) and assume by hypothesis that it is correct.
If formula (2) is correct, it must be likewise valid for . Following up, the attempt is to prove that
First, it will be expanded to the left side of the above equality:
(where it was substituted with according to the hypothesis). This result confirms the hypothesis and the validity for (2).
Next on Table 1, the symbolic representations for the binomial coefficients are presented. The value actually comes from the output of the program coef.mc provided in Section 3.2, after being evaluated with the corresponding values of and . This table is shown below.