# A Primer: Generating Functions: Part I : RMO/INMO 2019

GENERATING FUNCTIONS and RECURRENCE RELATIONS:

The concept of a generating function is one of the most useful and basic concepts in the theory of combinatorial enumeration. If we want to count a collection of objects that depend in some way on n objects and if the desired value is say, $\phi (n)$, then a series in powers of t such as $\sum \phi (n) t^{n}$ is called a generating function for $\phi (n)$. The generating functions arise in two different ways. One is from the investigation of recurrence relations and another is more straightforward: the generating functions arise as counting devices, different terms being specifically included to account for specific situations which we wished to count or ignore. This is a very fundamental, though difficult, technique in combinatorics. It requires considerable ingenuity for its success. We will have a look at the bare basics of such stuff.

We start here with the common knowledge:

$(1+\alpha_{1}t)(1+\alpha_{2}t)\ldots (1+\alpha_{n}t)=1+a_{1}t+a_{2}t^{2}+ \ldots + a_{n}t^{n}$….(2i) where $a_{r}=$sum of the products of the $\alpha$‘s taken r at a time. …(2ii)

Incidentally, the $a$‘s thus defined in (2ii) are called the elementary symmetric functions associated with the $a$‘s. We will re-visit these functions later.

Let us consider the algebraic identity (2i) from a combinatorial viewpoint. The explicit expansion in powers of t of the RHS of (2i) is symbolically a listing of the various combinations of the $\alpha$‘s in the following sense:

$a_{1}=\sum \alpha_{1}$ represents all the 1-combinations of the $\alpha$‘s
$a_{2}=\sum \alpha_{1}\alpha_{2}$ represents all the 2-combinations of the $\alpha$‘s
and so on.

In other words, if we want the r-combinations of the $\alpha$‘s, we have to look only at the coefficients of $t^{r}$. Since the LHS of (2i) is an expression which is easily constructed and its expansion generates the combinations in the said manner,we say that the LHS of (2i) is a Generating Function (GF) for the combinations of the $\alpha$‘s. It may happen that we are interested only in the number of combinations and not in a listing or inventory of them. Then, we need to look for only the number of terms in each coefficient above and this number will be easily obtained if we set each $\alpha$ as 1. Thus, the GF for the number of combinations is $(1+t)(1+t)(1+t)\ldots (1+t)$ n times;

and this is nothing but $(1+t)^{n}$. We already know that the expansion of this gives $n \choose r$ as the coefficient of $t^{r}$ and this tallies with the fact that the number of r-combinations of the $\alpha$‘s is $n \choose r$. Abstracting these ideas, we make the following definition:

Definition I:
The Ordinary Generating Function (OGF) for a sequence of symbolic expressions $\phi(n)$ is the series

$f(t)=\sum_{n}\phi (n)t^{n}$ …(2iii)

If $\phi (n)$ is a number which counts a certain type of combinations or permutations, the series $f(t)$ is called the Ordinary Enumeration (OE) or counting series for $\phi (n)$ for $n=1,2,\ldots$

Example 2:
The OGF for the combinations of five symbols a, b, c, d, e is $(1+at)(1+bt)(1+ct)(1+dt)(1+et)$

The OE for the same is $(1+t)^{5}$. The coefficient of $t^{4}$ in the first expression is

(*) abcd+abce+ abde+acde+bcde.

The coefficient of $t^{4}$ in the second expression is $5 \choose 4$, that is, 5 and this is the number of terms in (*).

Example 3:

The OGF for the elementary symmetric functions $a_{1}, a_{2}, \ldots$ in the symbols $\alpha_{1},\alpha_{2}, \alpha_{3}, \ldots$ is $(1+\alpha_{1}t)(1+\alpha_{2}t)(1+\alpha_{3}t)\ldots$ ….(2iv)

This is exactly the algebraic result with which we started this section.

Remark:

The fact that the series on the HRS of (2iii) is an infinite series should not bother us with questions of convergence and the like. For, throughout (combinatorics) we shall be working only in the framework of “formal power series” which we now elaborate.

*THE ALGEBRA OF FORMAL POWER SERIES*

The vector space of infinite sequences of real numbers is well-known. If $(\alpha_{k})$ and $\beta_{k}$ are two sequences, their sum is the sequence $(\alpha_{k}+\beta_{k})$, and a scalar multiple of the sequence $(\alpha_{k})$ is $(c\alpha_{k})$. We now identify the sequence $(\alpha_{k})$ with $k=0,1,2, \ldots$ with the “formal” series

$f = \sum_{k=0}^{\infty}\alpha_{k}t^{k}$….(2v)

where $t^{k}$ only means the following:

$t^{0}=1$, $t^{k}t^{l}=t^{k+l}$.

In the same way, $(\beta_{k})$, where $k=0,1,2,\ldots$ corresponds to the formal series:

$g=\sum_{k=0}^{\infty}\beta_{k}t^{k}$ and

we define: $f+g = \sum (\alpha_{k}+\beta_{k})t^{k}$, and $cf= \sum (c\alpha_{k})t^{k}$.

The set of all power series f now becomes a vector space isomorphic to the space of infinite sequences of real numbers. The zero element of this space is the series with every coefficient zero.

Now, let us define a product of two formal power series. Given f and g as above, we write $fg=\sum_{k=0}^{\infty}\gamma_{k} t^{k}$ where

$\gamma_{k}=\alpha_{0}\beta_{k}+\alpha_{1}\beta_{k-1}+\ldots + \alpha_{k}\beta_{0} = \sum (\alpha_{i}\beta_{j})$, where $i+j=k$.

The multiplication is associative, commutative, and also distributive wrt addition. (the students/readers can take up this as an appetizer exercise !!) In fact, the set of all formal power series becomes an algebra. It is called the algebra of formal power series over the real s. It is denoted by $\bf\Re[t]$, where $\bf\Re$ means the algebra of reals. We further postulate that $f=g$ in $\bf\Re[t]$ iff $\alpha_{k}=\beta_{k}$ for all $k=0,1,2,\ldots$. As we do in polynomials, we shall agree that the terms not present indicate that the coefficients are understood to be zero. The elements of $\bf\Re$ may be considered as elements of $\bf\Re[t]$. In particular, the unity 1 of $\bf\Re$ is also the unity of $\bf\Re[t]$. Also, the element $t^{n}$ with $n>0$ belongs to $\bf\Re$, it being the formal power series $\sum \alpha_{k}t^{k}$ with $\alpha_{n}=1$ and all other $\alpha$‘s zero. We now have the following important proposition which is the only tool necessary for working with formal power series as far as combinatorics is concerned:

Proposition : 2_4:
The element f of $\bf\Re[t]$ given by (2v) has an inverse in $\bf\Re[t]$ iff $\alpha_{0}$ has an inverse in $\bf\Re$.

Proof:
If $g=\sum \beta_{k}t^{k}$ is such that $fg=1$, the multiplication rule in $\bf\Re[t]$ tells us that $\alpha_{0}\beta_{0}=1$ so that $\beta_{0}$ is the inverse of $\alpha_{0}$. Hence, the “only if” part is proved.

To prove the “if” part, let $\alpha_{0}$ have an inverse $\alpha_{0}^{-1}$ in $\bf\Re$. We will show that it is possible to find $g=\sum \beta_{k}t^{k}$ in $\bf\Re[t]$ such that $fg=1$. If such a g were to exist, then the following equations should hold in order that $fg=1$, that is,

$\alpha_{0}\beta_{0}=1$
$\alpha_{0}\beta_{1}+\alpha_{1}\beta_{0}=0$
$\alpha_{0}\beta_{2}+\alpha_{1}\beta_{1}+\alpha_{2}\beta_{0}=0$
$\vdots$

So we have $\beta_{0}=\alpha_{0}^{-1}$ from the first equation. Substituting this value of $\beta_{0}$ in the second equation, we get $\beta_{1}$ in terms of the $\alpha$‘s. And, so on, by the principle of mathematical induction, all the $\beta$‘s are uniquely determined. Thus, f is invertible in $\bf\Re$. QED.

Note that it is the above proposition which justifies the notation in $\bf\Re[t]$, equalities such as

$\frac{1}{1-t}=1+t+t^{2}+t^{3}+\ldots$

The above is true because the RHS has an inverse and $(1-t)(1+t+t^{2}+t^{3}+\ldots)=1$

So, the unique inverse of $1+t+t^{2}+t^{3}+\ldots$ is $(1-t)$ and vice versa. Hence, the expansion of $\frac{1}{1-t}$ as above. Similarly, we have

$\frac{1}{1+t}=1-t+t^{2}-\ldots$
$\frac{1}{1-t^{2}}=1+t^{2}+t^{4}+\ldots$ and many other such familiar expansions.

There is a differential operator in $D$ in $\bf\Re[t]$, which behaves exactly like the differential operator of calculus.

Define: $(Df)(\alpha)=\sum_{k=0}^{\infty}(k+1)\alpha_{k+1}t^{k}$

Then, one can easily prove that $D: f \rightarrow Df$ is linear on $\bf\Re[t]$, and further
$D^{r}f(t)=\sum_{k=0}^{\infty}(k+r)(k+r-1)\ldots(k+1)\alpha_{k+r}t^{k}$ from which we get the term “Taylor-MacLaurin” expansion

$f(t)=f(0)+Df(0)+\frac{D^{2}f(0)}{2!}+ \ldots$…(2vi)

In the same manner, one can obtain, from $f(t)=\frac{1}{1-\alpha t}$, which in turn is equal to
$1+ \alpha t + \alpha^{2} t^{2}+ \alpha^{3} t^{3} + \ldots$

the result which mimics the logarithmic differentiation of calculus, viz.,

$\frac{(Df)(t)}{f(t)} = \alpha + \alpha^{2} t+ \alpha^{3}t^{2}+ \alpha^{4}t^{3}+\ldots$…(2vii)

The truth of this in $\bf\Re[t]$ is seen by multiplying the series on the RHS of (2vii) by the series for $f(t)$, and thus obtaining the series for $(Df)(t)$.

Let us re-consider generating functions now. We saw that the GF for combinations of $\alpha_{1}, \alpha_{2}, \ldots, \alpha_{n}$ is $(1+\alpha_{1}t)(1+\alpha_{2}t)\ldots(1+\alpha_{n}t)$.

Let us analyze this and find out why it works. After all, what is a combination of the symbols : $\alpha_{1}, \alpha_{2}, \ldots, \alpha_{n}$? It is the result of a decision process involving a sequence of independent decisions as we move down the list of the $\alpha$‘s. The decisions are to be made on the following questions: Do we choose $\alpha_{1}$ or not? Do we choose $\alpha_{2}$ or not? $\ldots$ Do we choose $\alpha_{n}$ or not? And, if it is an r-combination that we want, we say “yes” to r of the questions above and say “no” to the remaining. The factor $(1+\alpha_{1}t)$ in the expression (2ii) is an algebraic indication of the combinatorial fact that there are only two mutually exclusive alternatives available for us as far as the symbol $\alpha_{1}$ is concerned. Either we choose $\alpha_{1}$ or not. Choosing “$\alpha_{1}$” corresponds to picking the term $\alpha_{1}t$ and choosing “not $-\alpha_{1}$” corresponds to picking the term 1. This correspondence is justified by the fact that in the formation of products in the expression of (2iv), each term in the expansion has only one contribution from $1+\alpha_{1}t$ and that is either $1$ or $\alpha_{t}$.

The product $(1+\alpha_{1}t)(1+\alpha_{2}t)$ gives us terms corresponding to all possible choices of combinations of the symbols $\alpha_{1}$ and $\alpha_{2}$ — these are:

$1.1$ standing for the choice “not-$\alpha_{1}$” and “not-$\alpha_{2}$

$\alpha_{1}t . 1$ standing for the choice of $\alpha_{1}$ and “not-$\alpha_{2}$

$1.\alpha_{2}t$ standing for the choice of “not-$\alpha_{1}$” and $\alpha_{2}$.

$\alpha_{1}t . \alpha_{2}t$ standing for the choice of $\alpha_{1}$ and $\alpha_{2}$.

This is, in some sense, the rationale for (2iv) being the OGF for the several r-combinations of $\alpha_{1}, \alpha_{2}, \ldots, \alpha_{n}$.

We shall now complicate the situation a little bit. Let us ask for the combinations of the symbols $\alpha_{1}, \alpha_{2}, \ldots, \alpha_{n}$ with repetitions of each symbol allowed once more in the combinations.

To be discussed in the following article,

Regards,
Nalin Pithwa.

Reference:
Combinatorics, Theory and Applications, V. Krishnamurthy, East-West Press.
https://www.amazon.in/Combinatorics-Theory-Applications-Krishnamurthy-V/dp/8185336024/ref=sr_1_5?keywords=V+Krishnamurthy&qid=1553718848&s=books&sr=1-5

# Pre RMO algebra : some tough problems

Question 1:

Find the cube root of $x^{3} -12x^{2} + 54x -112 + \frac{108}{x} - \frac{48}{x^{2}} + \frac{8}{x^{3}}$

Question 2:

Find the square root of $\frac{x}{y} + \frac{y}{x} +3 - 2\sqrt{\frac{x}{y}} -2\sqrt{\frac{y}{x}}$

Question 3:

Simplify (a):

$(\frac{x}{x-1} - \frac{1}{x+1}). \frac{x^{3}-1}{x^{6}+1}.\frac{(x-1)^{2}(x+1)^{2}+x^{2}}{x^{4}+x^{2}+1}$

Simplify (b):
$\{ \frac{a^{4}-y^{4}}{a^{2}-2ay+y^{2}} \div \frac{a^{2}+ay}{a-y} \} \times \{ \frac{a^{5}-a^{3}y^{2}}{a^{3}+y^{3}} \div \frac{a^{4}-2a^{3}y+a^{2}y^{2}}{a^{2}-ay+y^{2}}\}$

Question 4:

Solve : $\frac{3x}{11} + \frac{25}{x+4} = \frac{1}{3} (x+5)$

Question 5:

Solve the following simultaneous equations:

$2x^{2}-3y^{2}=23$ and $2xy - 3y^{2}=3$

Question 6:

Simplify (a):

$\frac{1- \frac{a^{2}}{(x+a)^{2}}}{(x+a)(x-a)} \div \frac{x(x+2a)}{(x^{2}-a^{2})(x+a)^{2}}$

Simplify (b):

$\frac{6x^{2}y^{2}}{m+n} \div \{\frac{3(m-n)x}{7(r+s)} \div \{ \frac{4(r-s)}{21xy^{2}} \div \frac{(r^{2}-s^{2})}{4(m^{2}-n^{2})}\} \}$

Question 7:

Find the HCF and LCM of the following algebraic expressions:

$20x^{4}+x^{2}-1$ and $25x^{4}+5x^{3} - x - 1$ and $25x^{4} -10x^{2} +1$

Question 8:

Simplify the following using two different approaches:

$\frac{5}{6- \frac{5}{6- \frac{5}{6-x}}} = x$

Question 9:

Solve the following simultaneous equations:

Slatex x^{2}y^{2} + 192 = 28xy\$ and $x+y=8$

Question 10:

If a, b, c are in HP, then show that

$(\frac{3}{a} + \frac{3}{b} - \frac{2}{c})(\frac{3}{c} + \frac{3}{b} - \frac{2}{a})+ \frac{9}{b^{2}}=\frac{25}{ac}$

Question 11:

if $a+b+c+d=2s$, prove that

$4(ab+cd)^{2} - (a^{2}+b^{2}-c^{2}-d^{2})^{2}= 16(s-a)(s-b)(s-c)(s-d)$

Question 12:

Determine the ratio $x:y:z$ if we know that

$\frac{x+z}{y} = \frac{z}{x} = \frac{x}{z-y}$

More later,
Nalin Pithwa

Those interested in such mathematical olympiads should refer to:

(I am a tutor for such mathematical olympiads).

# Pre RMO more algebra problems for practice

Question I:

I rode one third of a journey at 10kmph, one third more at 9, and the rest at 8 kmph; if I had ridden half the journey at 10kmph, and the other half at 8 kmph, I should have been half a minute longer on the way: what distance did I ride?

Question 2:

The express train leaves Bristol at 3pm and reaches London at 6pm; the ordinary train leaves London at 1:30pm and arrives at Bristol at 6pm. If both trains travel uniformly, find the time when they will meet.

Question 3:

Solve (a) $0.\dot{6}x + 0.75x-0.1\dot{6} = x - 0.58\dot{3}x+5$

Solve (b) $\frac{37}{x^{2}-5x+6} + \frac{4}{x-2} = \frac{7}{3-x}$

Question 4:

Simplify: $(1+x)^{2} \div \{ 1 + \frac{x}{1-x+ \frac{x}{1+x+x^{2}}}\}$

Question 5:

Find the square root of $\frac{4a^{2}-12ab-6bc+4ac+9b^{2}+c^{2}}{4a^{2}+9c^{2}-12ac}$

Question 6:

Find the square root of $4a^{4}+9(a^{2}+\frac{1}{a^{2}})+12a(a^{2}+1)+18$

Question 7:

Solve the following system of equations:

$\frac{1}{3}(x+y)+2z=21$

$3x - \frac{1}{2}(y+z) = 65$

$x + \frac{1}{2}(x+y-z) = 38$

Question 8:

A number consists of three digits, the right hand one being zero. If the left hand and middle digits be interchanged the number is diminished by 180; if the left hand digit be halved and the other two digits are interchanged, the number is diminished by 336; find the number.

Question 9:

$\frac{2}{x^{2}+xy+y^{2}}$, $\frac{-4x}{x^{3}-y^{3}}$, $\frac{x^{2}}{y^{2}(x-y)^{2}}$, and $\frac{-x^{2}}{x^{3}y-y^{4}}$

Question 10:

Simplify:

$\frac{a^{3}+b^{3}}{a^{4}-b^{4}} - \frac{a+b}{a^{2}-b^{2}} -\frac{1}{2} \{ \frac{a-b}{a^{2}+b^{2}} - \frac{1}{a-b} \}$

More later,
Nalin Pithwa

# Pre RMO Algebra problems for practice

Question 1:

Find the square root of $49x^{4}+\frac{1051x^{2}}{25} - \frac{14x^{3}}{5} - \frac{6x}{5} + 9$

Question 2:

The surface area of a circular cone is given by $A= {\pi}r^{2}+{\pi}rs$, where s cm is the slant height, r cm is the radius of the base and $\pi$ is $\frac{22}{7}$. Find the radius of the base if a cone of surface area 93.5 square cm has a slant height of 5 cm.

Question 3:

Solve:

$\frac{a+x}{a^{2}+ax+x^{2}} +\frac{a-x}{a^{2}-ax+ x^{2}} = \frac{3a}{x(a^{4}+a^{2}x^{2}+x^{4})}$

Question 4:

Subtract $\frac{x+3}{x^{2}+x-12} + \frac{x+4}{x^{2}-x-12}$ and divide the difference by $1 + \frac{2(x^{2}-12)}{x^{2}+7x+12}$

Question 5:

Solve the following for the unknown x:

$\frac{x}{2(x+3)} - \frac{53}{24} = \frac{x^{2}}{x^{2}-9} - \frac{8x-1}{4(x-3)}$

Question 6:

Find the square root of the following:

$a^{6}+ \frac{1}{a^{6}} -6(a^{4}+\frac{1}{a^{4}}) +12(a^{2}+\frac{1}{a^{2}})-20$; also, cube the result.

More later,
Nalin Pithwa.

# Practice questions based on combinatorics for RMO Training and IITJEE Mathematics

Question 1:

Prove that if n is an even integer, then

$\frac{1}{(1!)(n-1)!} + \frac{1}{3! (n-3)!} + \frac{1}{5! (n-5)!} + \ldots + \frac{1}{(n-1)! 1!} = \frac{2^{n-1}}{n!}$

Question 2:

If ${n \choose 0}$, ${n \choose 1}$, ${n \choose 2}$, ….${n \choose n}$ are the coefficients in the expansion of $(1+x)^{n}$, when n is a positive integer, prove that

(a) ${n \choose 0} - {n \choose 1} + {n \choose 2} - {n \choose 3} + \ldots + (-1)^{r}{n \choose r} = (-1)^{r}\frac{(n-1)!}{r! (n-r-1)!}$

(b) ${n \choose 0} - 2{n \choose 1} + 3{n \choose 2} - 4{n \choose 3} + \ldots + (-1)^{n}(n+1){n \choose n}=0$

(c) ${n \choose 0}^{2} - {n \choose 1}^{2} + {n \choose 2}^{2} - {n \choose 3}^{2} + \ldots + (-1)^{n}{n \choose n}^{2}=0$, or $(-1)^{\frac{n}{2}}{n \choose {n/2}}$, according as n is odd or even.

Question 3:

If $s_{n}$ denotes the sum of the first n natural numbers, prove that

(a) $(1-x)^{-3}=s_{1}+s_{2}x+s_{3}x^{2}+\ldots + s_{n}x^{n-1}+\ldots$

(b) $2(s_{1}s_{2m} + s_{2}s_{2n-1} + \ldots + s_{n}s_{n+1}) = \frac{2n+4}{5! (2n-1)!}$

Question 4:

If $q_{n}=\frac{1.3.5.7...(2n-1)}{2.4.6.8...2n}$, prove that

(a) $q_{2n+1}+q_{1}q_{2n}+ q_{2}q_{2n-1} + \ldots + q_{n-1}q_{n+2} + q_{n}q_{n+1}= \frac{1}{2}$

(b) $2(q_{2n}-q_{1}q_{2m-1}+q_{2}q_{2m-2}+\ldots + (-1)^{m}q_{m-1}q_{m+1}) = q_{n} + (-1)^{n-1}{q_{n}}^{2}$.

Question 5:

Find the sum of the products, two at a time, of the coefficients in the expansion of $(1+x)^{n}$, where n is a positive integer.

Question 6:

If $(7+4\sqrt{3})^{n} = p + \beta$, where n and p are positive integers, and $\beta$, a proper fraction, show that $(1-\beta)(p+\beta)=1$.

Question 7:

If ${n \choose 0}$, ${n \choose 1}$, ${n \choose 2}$, …,, ${n \choose n}$ are the coefficients in the expansion of $(1+x)^{n}$, where n is a positive integer, show that

${n \choose 1} - \frac{{n \choose 2}}{2} + \frac{{n \choose 3}}{3} - \ldots + \frac{(-1)^{n-1}{n \choose n}}{n} = 1 + \frac{1}{2} + \frac {1}{3} + \frac{1}{4} + \ldots + \frac{1}{n}$.

That’s all for today, folks!

Nalin Pithwa.