A few simple exercies I need someone to explain to me how to do them.

Hello, I want to learn DM by myself, and asked a university prof. (different faculty) to give me a few exercises to solve.

Can You point me to subjects those are from and what should I learn as well as explain how those should be solved (with the solving itself done if possible)?

Use generating functions to find a_{n} if :a_{n} = a_{n - 1} + 3n, for n >= 1

Find the number of ways to select 8 balls from the set of 5 identical red balls, 3 identical

yellow balls and 7 identical green balls.

Use the extended version of the Euclid's algorithm to compute EXT-EUCLID(24,42)

How many ways are there to distribute 18 balls among 6 different persons if

a) each ball is different and each person should get 3 balls

b) all balls are identical ?

How many permutations of the letters a, a, a, b, b, b, c, c, c, d, d, d, are there with no three

consecutive letters the same?

Show that P(n, k) = P(n - 1; k - 1) + P(n - k; k) for each 1 < k < n.

Re: A few simple exercies I need someone to explain to me how to do them.

For the second one, you want to know how many combinations of 8 balls you can get from the 15. This is evaluated using

$\displaystyle \displaystyle \begin{align*} {15\choose{8}} = \frac{15!}{8!(15 - 8)!} \end{align*}$

Re: A few simple exercies I need someone to explain to me how to do them.

Quote:

Originally Posted by

**Prove It** For the second one, you want to know how many combinations of 8 balls you can get from the 15. This is evaluated using

$\displaystyle \displaystyle \begin{align*} {15\choose{8}} = \frac{15!}{8!(15 - 8)!} \end{align*}$

Thats it? There is no trick to it? When I saw that exercise I though there's gotta be a trick to it. Don't the colours make it harder?

Re: A few simple exercies I need someone to explain to me how to do them.

Quote:

Originally Posted by

**RoseEsque** Thats it? There is no trick to it? When I saw that exercise I though there's gotta be a trick to it. Don't the colours make it harder?

No because you aren't asked for a particular combination of colours, so essentially you're just choosing 8 balls from the 15 you are given.

Re: A few simple exercies I need someone to explain to me how to do them.

For the first problem, and without any specialist knowledge of methods, the following approach seems to work.

The first term in the sequence $\displaystyle a_{0}$ is unknown so call it $\displaystyle a_{0}$.

Then, by repeated substitution,

$\displaystyle a_{1}=a_{0}+3$

$\displaystyle a_{2}=a_{0}+9,$

$\displaystyle a_{3}=a_{0}+18,$

$\displaystyle a_{4}=a_{0}+30,$

$\displaystyle a_{5}=a_{0}+45,$

and so on.

It appears then as if we need to find some way of generating the number sequence $\displaystyle 3,9,18,30,45$ etc.

A difference table shows that the sequence comes from a quadratic so assume that $\displaystyle f(n)=a*n^{2}+b*n+c,$

substitute for three values of $\displaystyle n$ and solve for $\displaystyle a,b,c.$

(Ans: $\displaystyle a_{n}=a_{0}+3(n^{2}+n)/2.$)

Re: A few simple exercies I need someone to explain to me how to do them.

Hello, RoseEsque!

Quote:

How many ways are there to distribute 18 balls among 6 different persons if

a) each ball is different and each person gets 3 balls?

$\displaystyle {18\choose3,3,3,3,3,3} \:=\:\frac{18!}{(3!)^6}$

Quote:

b) all balls are identical and each person gets 3 balls?

The balls are identical.

Give any three balls to each of the six people.

. . There is **one** way.

**

Re: A few simple exercies I need someone to explain to me how to do them.

Quote:

Originally Posted by

**Prove It** For the second one, you want to know how many combinations of 8 balls you can get from the 15. This is evaluated using

$\displaystyle \displaystyle \begin{align*} {15\choose{8}} = \frac{15!}{8!(15 - 8)!} \end{align*}$

Hi Prove It,

Are you sure this is what the problem is asking?

It seems to me that it is asking how many triples (r, y, g) there are that satisfy

$\displaystyle r+y+g = 8$

where

$\displaystyle 0 \le r \le 5$

$\displaystyle 0 \le y \le 3$

$\displaystyle 0 \le g \le 7$

Re: A few simple exercies I need someone to explain to me how to do them.

Quote:

Originally Posted by

**RoseEsque** Hello, I want to learn DM by myself, and asked a university prof. (different faculty) to give me a few exercises to solve. Can You point me to subjects those are from and what should I learn as well as explain how those should be solved (with the solving itself done if possible)?

Find the number of ways to select 8 balls from the set of 5 identical red balls, 3 identical

yellow balls and 7 identical green balls.

Quote:

Originally Posted by

**awkward** It seems to me that it is asking how many triples (r, y, g) there are that satisfy

$\displaystyle r+y+g = 8$

where

$\displaystyle 0 \le r \le 5$

$\displaystyle 0 \le y \le 3$

$\displaystyle 0 \le g \le 7$

@awkward, You are exactly right. That is what the question means.

The answer is the coefficient of $\displaystyle x^{8}$ in this expansion.

The clue is that right above the question is about generating functions.

Re: A few simple exercies I need someone to explain to me how to do them.

Quote:

Originally Posted by

**RoseEsque** Hello, I want to learn DM by myself, and asked a university prof. (different faculty) to give me a few exercises to solve.

Can You point me to subjects those are from and what should I learn as well as explain how those should be solved (with the solving itself done if possible)?

Use generating functions to find a_{n} if :a_{n} = a_{n - 1} + 3n, for n >= 1

[snip]

BobP has already given you a solution to the first part, and I think he

is right that it's easier witout generating functions in this case, but since the

problem statement says to use generating functions, here is a go at

it. I'm going to assume you know something about infinite series.

The standard approach is to let

$\displaystyle f(x) = \sum_{n=0}^{\infty} a_n x^n$

Using the recurrence given, we will find a closed form for f(x), and

then use that to find an expression for $\displaystyle a_n$.

First, we would like to find the generating function for

$\displaystyle 3n$, i.e., a closed form for

$\displaystyle g(x) = \sum_{n=1}^{\infty} 3n x^n$. A standard trick here

is to start with

$\displaystyle (1-x)^{-1} = \sum_{n=0}^{\infty} x^n$.

Differentiate w.r.t. x, then multiply by $\displaystyle 3x$. The result is

$\displaystyle g(x) = 3x (1-x)^{-2}$.

Now we apply the recurrence relation $\displaystyle a_n = a_{n-1} + 3n$ for

$\displaystyle n \ge 1$. If we interpret this in terms of the generating

functions above, it becomes

$\displaystyle f(x) = a_0 + x f(x) + 3 x (1-x)^{-2}$

(Write out a few terms of the infinite series for f and g if you have

trouble seeing this.)

Solving for f(x),

$\displaystyle f(x) = a_0 (1-x)^{-1} + 3 x (1-x)^{-3}$

This is the closed form for f(x) we were looking for. The next step

is to use this to find a closed form for $\displaystyle a_n$. To do this,

we will apply the binomial theorem for negative exponents (twice) on

the right-hand side of the equation. The result is

$\displaystyle f(x) = a_0 \sum_{i=0}^{\infty} x^i + 3x \sum_{j=0}^{\infty} \binom{j+2}{j} x^j$

It is now possible to "read off" the coefficient of $\displaystyle x^n$ on

the right-hand side of the equation: it is

$\displaystyle a_n = a_0 + 3 \binom{n+1}{n} = a_0 + \frac{3}{2} n (n+1)$,

which is the same result found by BobP.