Open access peer-reviewed chapter

# Alternative Representation for Binomials and Multinomies and Coefficient Calculation

Written By

José Alfredo Sánchez de León

Submitted: December 6th, 2019 Reviewed: January 29th, 2020 Published: March 9th, 2020

DOI: 10.5772/intechopen.91422

From the Edited Volume

## Mathematical Theorems

Edited by Lyudmila Alexeyeva

Chapter metrics overview

View Full Metrics

## 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 1, 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 [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 Fbe a field [4], and FXthe ring of polynomials in the indeterminate x, by the generating set of

FX=LjN0xj1E1

Now, denote the set of polynomials with positive coefficients of degree at most nover F, by

π+PnFFXR:PnF=1ϕZ+sxϕnPjFPj+1F=E2

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

Ak,nNπ+\j12xj2jn+2j3kE3

Definition 2.1.A subset Aof the real numbers is said to be inductiveif it contains the number 1, and for every xin A, the number x+1is also in A. Let Cbe the collection of all inductive subsets of R. Then the set [5] Z+of positive integersis defined by the equation

Z+ACAR+.E4

Definition 2.2. Lexicographic ordering:>LEX.

We say [6] p>LEXq, if we have the following conditions:

p>LEXqiZ+aibiamini>bmininZ+an\bn>0E5

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

Recall the mapping from [2]

τ:N0×N0j=1PnFπ+AjZ+nkτE6

by the equation

n̂k̂=n̂δn̂=11k̂δk̂=1n̂k̂+1δk̂+12k=1n̂k̂+1l1j=1n̂k̂+1k0i=11iij,k,..,δk̂,,δn̂E7

where

ϕδϕ=1n̂k̂+1δϕ+1i=ϕδϕ=1n̂k̂+1ϕ=k̂ϕδϕ=1δϕ+1ϕk̂E8

where the widehat script in the binomial terms (n̂, k̂) 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,

δϕijkzzhzi+:1ϕ<+ϕZ+Z+E9

Under this outline, we would have the following ordering:

i<LEXj<LEXk<LEXz<LEXzh<LEXzi<LEXz<LEXzzh<LEXzzi<LEXE10

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] Bof nonempty sets (not necessarily disjoint), there exists a function

c:BBBBE11

such that cBis an element of B, for each BB.

A bijection between δϕand Z+can now be established. Consider the collection of residue classes which have a multiplicative inverse in Z/nZ:

Z/nZ×=a¯Z/nZ:c¯Z/nZa¯b¯=1¯Z/nZE12

By [7] we have

Z/mnZ×Z/mZ××Z/nZ×E13

when mand nare relative prime integers. However, we will set n=19, to define the following applications:

Let xZ+and Jbe an index set; define

g:Z/19Z×ijkzE14
bygxmod x19ijkz

By the Lemma 2.3 we can construct

f:Z+jJzjbyfxjLx19zjE15

Then the composition fgwill be the searched function:

fg:Z+δϕbyfgx=jLx19zjImgE16

This could be graphically represented in Figure 1.

Definition 2.4.A set Ais said to be infinite if it is not finite [8]. It is said to be countably infinite if there is a bijective correspondence:

f:AZ+E17

In the next theorem, the collection δϕis countable:

Theorem 2.5.Let En,n=1,2,3,,be a sequence of countable sets, and put

S=n=1EnE18

Then S is countable [9].

Since it was possible to establish a bijection between Z+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 Z+×Z+is countably infinite [8].

Finally, in this corollary, it follows that the tuples Z+×δϕZ+are countably infinite.

### 2.2 Extension to n−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 nsummands. Note that in [2] 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 δϕ:

δϕn̂ijkzzhzi+:0ϕ<+ϕZ+Z+E19

The need of another index set comes from the fact that in the extension to the nsummands 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:

fg:Z+δϕE20

where fand gare defined the same way as in the former, regarding as a superscript on the alphabetic letters.

Theorem 2.7. Principle of recursive definition. Let Abe a set; let a0be an element of A. Suppose ρis a function that assigns to each function fmapping a nonempty section of positive integers into A, an element of A. Then there exists a unique function

h:Z+AE21

such that h1=a0,

hi=ρh1i1i>1.E22

Now the same method developed in [2] will be performed, following the binomial theorem [10, 11, 12] and the recursive principle: Let φ,γPnF\Abe two collection of summands; set the following:

φsf=δf=0λ=0ϕλδf1λ=10λN01λϕλ=1ϕλ=0γfϕλ=1ϕλ=0φsfϕλ=0E23

Subindices f,sfZ+represent a consecutive number of a summand and the amount of remaining summands after the binomial theorem expansion, respectively. Continue recursively performing the expansion:

δ1=0δ0δ0δδ0=11δ1δδ1=1δ0δ1+1δδ1+12k=1δ0δ1+1l1j=1δ0δ1+1k0i=11iij,k,..,δδ1,,δδ0γ1δ0δ1φs1δ1E24
=δ1=0δ0δ0δδ0=11δ1δδ1=1δ0δ1+1δδ1+12k=1δ0δ1+1l1j=1δ0δ1+1k0i=11iij,k,..,δδ1,,δδ0γ1δ0δ1
δ2=0δ1δ1δδ1=11δ2δδ2=1δ1δ2+1δδ2+12k=1δ1δ2+1l1j=1δ1δ2+1k0i=11iij,k,..,δδ2,,δδ1γ2δ1δ2
δ3=0δ2δ2δδ2=11δ3δδ3=1δ2δ3+1δδ3+12k=1δ2δ3+1l
1j=1δ2δ3+1k0i=11iij,k,..,δδ3,,δδ2γ3δ2δ3φs3δ3E25
δs=0δs1δs1δδs1=11δsδδs=1δs1δs+1δδs+12k=1δs1δs+1l
1j=1δs1δs+1k0i=11iij,k,..,δδs,,δδs1γs1δs1δsφsδs1

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

π+FX\A:π+FX
j=1sxjnhj=1sxjn=1ϕZ+sxϕn
1ϕZ+sxϕn=f=1s1δf=0δf1δf1δδf1=11δfδδf=1δf1δf+1δδf+12k=1δf1δf+1lE26
1j=1δf1δf+1k0i=11iij,k,..,δδf,,δδf1xfδf1δfxsδs1

where

ϕδϕ=1δf1δf+1δϕ+1k=ϕδδf=1δf1δf+1ϕ=δfϕδδf=1δϕ+1ϕδfE27

This general formula actually performs the multinomial expansion along with the calculation of the coefficients of individual terms, for an expression of nsummands; its proof is given on Appendix A.

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 pis a prime not dividing an integer m, then for all n1, the binomial coefficient pnmpnis not divisible by p.

Proof:Formula (1) will be deployed for this purpose. Since pis prime, each summand in it arises from

ϕδϕ=1pnmpn+1δϕ+1i=ϕδϕ=1pnm1+1ϕ=pnϕδϕ=1δϕ+1ϕpnE28

(since pcannot be factored any further). Now, suppose for the sake of contradiction that there exists a prime pthat divides the binomial coefficient the way it is proposed:

pnmpn=pnδpn=1pnm1+11jkδϕpnmpn+1δpnm=1δϕ0i=11iiψpnm=pxintE29

for some integer xintZ+, where ψpnmis defined to be the summation sequence function on the left side of (3).

pnδpn=1pnm1+13l=1m2k=1l1j=1k1p=xintE30

Since formula (1) represents addition of sequences of 1, expanding the above and gathering out the factors, the following would be obtained:

1p1+1ppn+i=0pnpni++kpnm1+1=xintE31

But above there are no summands on the left side that yields an integer on the right side and at the same time fulfills:

1+pn+i=0pnpni++kpnm1+1=ψpnmE32

For if it were,

zZ+ψpnm=zm,n,pZ+:pmE33

so that, combining (4) and (5), it would be

1p+1pz1=xint/1p+zp/1p=xintzp=xintE34

which shows that indeed xintis all about a rational number. This contradicts the hypothesis, so the binomial coefficient is not divisible by p.

There is also problem 18.41 in [13] where the author introduces a case of study that takes place when xand yare members of a commutative ring of characteristic p:

(Freshman exponentiation). Let p be prime. Show that in the ring Zp, we have

a+bp=ap+bpE35

for all a,bZp[hint:observe that the usual binomial expansion for a+bnis valid in a commutativering]. 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:

:lisp (setf(get ’%sum ‘operators) nil)

Next save the code above as the files coef.mcand 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:

batch("coef");

batch("multinom");

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.mcoutputs are shown in Figure 4.

A pattern of outputs (binomial coefficient values) from coef.mcwas 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

N0

Union of the set of natural numbers with the zero element

n̂,k̂

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

i,j,k,,δϕ,

Indexes of summations

i,j,k,,δϕ,

Same as above but within (*) superscript to contradistinguish from the above

ab

Logic operator OR; it is equivalent to ab(used this way due to space reasons)

Summation sequence (two or more nested operators)

i=1abcii,j,k,

Sum of the first aor bnumbers. The subindexes i,j,k,indicate the different indexes of summations corresponding to the sequence it belongs to, where c=0,1,2,denotes the actual number of a summation sequence

ab

Binomial coefficient

xb+ybab=ϕ

Sum of the ϕ-th xplus the ϕ-th yelements, raised to the a-power

L

The generated of a set

i=11iij,k,

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 s. For samount of summands, its expansion by (2) would be given by the following equation:

x1+x2++xsn=f=1s1δf=0δf1δf1δδf1=11δfδδf=1δf1δf+1δδf+12k=1δf1δf+1lE36
1j=1δf1δf+1k0i=11iij,k,..,δδf,,δδf1xfδf1δfxsδs1

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

x1+x2n=f=11δf=0δf1δf1δδf1=11δfδδf=1δf1δf+1δδf+12k=1δf1δf+1lE37
1j=1δf1δf+1k0i=11iij,k,..,δδf,,δδf1xfδf1δfxsδs1
=i=0nnix1nix2i

that actually stands for the binomial expansion for 2summands; then it is correct. Now, fix s=kon (6) and assume by hypothesis that it is correct.

x1+x2++xkn=f=1k1δf=0δf1δf1δfxfδf1δfxkδk1E38

If formula (2) is correct, it must be likewise valid for s=k+1. Following up, the attempt is to prove that

f=1k+11δf=0δf1δf1δfxfδf1δfxk+1δk+11=x1+x2++xk+xk+1nE39

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

δ1=0δ0δ0δδ0=11δ1δδ1=1δ0δ1+1δδ1+12k=1δ0δ1+1l1j=1δ0δ1+1k0i=11iij,k,..,δδ1,,δδ0γ1δ0δ1
δ2=0δ1δ1δδ1=11δ2δδ2=1δ1δ2+1δδ2+12k=1δ1δ2+1l1j=1δ1δ2+1k0i=11iij,k,..,δδ2,,δδ1γ2δ1δ2
δk=0δk1δk1δδk1=11δkδδk=1δk1δk+1δδk+12k=1δk1δk+1lE40
1j=1δk1δk+1k0i=11iij,k,..,δδk,,δδk1γk1δk1δkφkδk1
=δ1=0δ0δ0δδ0=11δ1δδ1=1δ0δ1+1δδ1+12k=1δ0δ1+1l1j=1δ0δ1+1k0i=11iij,k,..,δδ1,,δδ0γ1δ0δ1
δ2=0δ1δ1δδ1=11δ2δδ2=1δ1δ2+1δδ2+12k=1δ1δ2+1l1j=1δ1δ2+1k0i=11iij,k,..,δδ2,,δδ1γ2δ1δ2
δk+11=0δk+12δk+12δδk+12=11δk+11δδk+11=1δk+12δk+11+1δδk+11+12k=1δk+12δk+11+1l
1j=1δk+12δk+11+1k0i=11iij,k,..,δδk+11,,δδk+12γk+12δk+12δk+11φk+11δk+12E41
=f=1k+11δf=0δf1δf1δδf1=11δfδδf=1δf1δf+1δδf+12k=1δf1δf+1l1
1j=1δf1δf+1k0i=11iij,k,..,δδf,,δδf1xfδf1δfxk+1δk+11
=f=1k+11δf=0δf1δf1δfxfδf1δfxk+1δk+11
=x1+x2++xk+xk+1n

(where it was substituted with x1+x2++xknaccording 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.mcprovided in Section 3.2, after being evaluated with the corresponding values of kand n. This table is shown below.

nn1n2n3n4n5n6n7n8n9
1i=111
2i=111j=11i=1j1
3i=111j=12i=1j1k=11j=1ki=1j1
4i=111j=13i=1j1k=12j=1ki=1j1l=11k=1lj=1ki=1j1
5i=111j=14i=1j1k=13j=1ki=1j1l=12k=1lj=1ki=1j1m=11l=1mk=1lj=1ki=1j1
6i=111j=15i=1j1k=14j=1ki=1j1l=13k=1lj=1ki=1j1m=12l=1mk=1lj=1ki=1j1n=11m=1nl=1mk=1lj=1ki=1j1
7i=111j=16i=1j1k=15j=1ki=1j1l=14k=1lj=1ki=1j1m=13l=1mk=1lj=1ki=1j1n=12m=1nl=1mk=1lj=1ki=1j1o=11n=1om=1nl=1mk=1lj=1ki=1j1
8i=111j=17i=1j1k=16j=1ki=1j1l=15k=1lj=1ki=1j1m=14l=1mk=1lj=1ki=1j1n=13m=1nl=1mk=1lj=1ki=1j1o=12n=1om=1nl=1mk=1lj=1ki=1j1p=11o=1pn=1om=1nl=1mk=1lj=1ki=1j1
9i=111j=18i=1j1k=17j=1ki=1j1l=16k=1lj=1ki=1j1m=15l=1mk=1lj=1ki=1j1n=14m=1nl=1mk=1lj=1ki=1j1o=13n=1om=1nl=1mk=1lj=1ki=1j1p=12o=1pn=1om=1nl=1mk=1lj=1ki=1j1q=11p=1qo=1pn=1om=1nl=1mk=1lj=1ki=1j1

### Table 1.

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

## References

1. 1. de León JAS. A model for calculation of a productivity bonus. EUREKA. 2017;42:10-27. ISSN: 1405-5090
2. 2. de León JAS. Calculation of binomial and multinomial coefficients. Mathematics in Computer Science. 2019;13:403-415. DOI: 10.1007/s11786-019-00403-w
3. 3. Rotman J. An Introduction to the Theory of Groups. 4th ed. New York: Springer; 1995. p. 515
4. 4. Herstein IN. Topics In Algebra. 2nd ed. New York: Wiley; 1975. p. 388
5. 5. Munkres J. Topology. 2nd ed. Essex: Pearson; 2014. p. 503
6. 6. Mishra B. Algorithmic Algebra. New York: Springer; 1993. p. 416
7. 7. Dummit DS, Foote RM. Abstract Algebra. 3rd ed. New York: Wiley; 2004. p. 932
8. 8. Hernández F. Teoría de Conjuntos. Ciudad de México: Sociedad Matemática Mexicana; 1998. p. 342
9. 9. Rudin W. Principles of Mathematical Analysis. 3rd ed. New York: McGraw-Hill; 1976. p. 342
10. 10. Graham RL, Knuth DE, Patashnick O. Concrete Mathematics. 2nd ed. Boston: Addison-Wesley; 1994
11. 11. Stanley RP. Enumerative Combinatorics. 2nd ed. Vol. 1. Cambridge: Cambridge University Press; 2012
12. 12. Rusell M. Combinatorics. 2nd ed. Hoboken: Wiley; 2001. p. 576
13. 13. Fraleigh JB. A First Course in Abstract Algebra. 7th ed. Pearson: Essex; 2002. p. 544
14. 14. Maxima. Computer Algebra System [Internet]. 1998. Available at:https://maxima.sourceforge.net/[Accessed: 10 January 2020]
15. 15. Common LISP. Object-Oriented Programming Language [Internet]. 1984. Available at:https://lisp-lang.org/[Accessed: 10 January 2020]
16. 16. Macsyma. Computer Algebra System [Internet]. 1982. Available at:https://swmath.org/software/1209[Accessed: 10 January 2020]
17. 17. Roanes-Lozano E, Galán-García JL, Solano-Macías C. Some reflections about the success and impact of the computer algebra system DERIVE with a 10-year time perspective. Mathematics in Computer Science. 2019;13:417-431. DOI: 10.1007/s11786-019-00404-9

Written By

José Alfredo Sánchez de León

Submitted: December 6th, 2019 Reviewed: January 29th, 2020 Published: March 9th, 2020