Layout pattern of the representation for the first nine binomial coefficients.

## Abstract

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.

### Keywords

- binomials
- binomial coefficient calculation
- multinomial
- multinomies
- multinomial coefficient calculation

## 1. Introduction

Polynomials, alongside binomials and multinomies, are frequently found in many study cases, even outside pure mathematics affairs, like [1]. Recently in [2] 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

This document comprises the extension of the results obtained from [2]. 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 [2]; 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 [3] 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].

## 2. Mathematical framework

### 2.1 Fundament for 2 − summands

Let

Now, denote the set of polynomials with positive coefficients of degree

and let A be the set of the coefficients of those polynomials:

**Definition 2.1.** A subset **inductive** if it contains the number **positive integers** is defined by the equation

**Definition 2.2. Lexicographic ordering:**

We say [6]

for some non-zero entry, i.e., for some

Recall the mapping from [2]

by the equation

where

where the widehat script in the binomial terms (

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 [5]

such that

A bijection between

By [7] we have

when

Let

By the Lemma 2.3 we can construct

Then the composition

This could be graphically represented in Figure 1.

**Definition 2.4.** A set

In the next theorem, the collection

**Theorem 2.5.** Let

Then S is countable [9].

Since it was possible to establish a bijection between

**Corollary 2.6.** The set

Finally, in this corollary, it follows that the tuples

### 2.2 Extension to n − summands

Now that the countability of the collection

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

where

**Theorem 2.7. Principle of recursive definition**. Let

such that

Now the same method developed in [2] will be performed, following the binomial theorem [10, 11, 12] and the recursive principle: Let

Subindices

Then the expansion above follows a pattern that can be coded into a general formula; replace the variables

where

This general formula actually performs the multinomial expansion along with the calculation of the coefficients of individual terms, for an expression of

**Theorem 2.8.** A finite product of countable sets is countable [5].

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 [2], 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 [2]; 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 [3].

**Lemma 3.1.** If

**Proof:**Formula (1) will be deployed for this purpose. Since

(since

for some integer

Since formula (1) represents addition of sequences of

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

□

There is also problem 18.41 in [13] where the author introduces a case of study that takes place when *p*:

**(Freshman exponentiation)**. Let p be prime. Show that in the ring

for all *hint:* observe that the usual binomial expansion for *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 [14] and open-source software written in LISP [15] and based on a 1982 version of Macsyma [16]; of course there are many other CAS in which those can be implemented, i.e., here [17] 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 (

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.

## 4. Conclusions

With this result an alternative way to represent binomials and multinomies alongside their respective coefficient calculations was exposed. The results obtained from [2] 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 [3], 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.

## Thanks

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.

## Notations

Union of the set of natural numbers with the zero element

Entries of binomial or multinomial coefficients

Represents the

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

Summation sequence (two or more nested operators)

Sum of the first

Binomial coefficient

Sum of the

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

Fix s = 2 on (6); then the following is obtained:

that actually stands for the binomial expansion for

If formula (2) is correct, it must be likewise valid for

First, it will be expanded to the left side of the above equality:

(where it was substituted with

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

n | |||||||||
---|---|---|---|---|---|---|---|---|---|

1 | |||||||||

2 | |||||||||

3 | |||||||||

4 | |||||||||

5 | |||||||||

6 | |||||||||

7 | |||||||||

8 | |||||||||

9 |