0% found this document useful (0 votes)
19 views11 pages

Midsem

Uploaded by

RAHUL
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views11 pages

Midsem

Uploaded by

RAHUL
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

CS201 Mid-Sem

Exam
Mathematics For Computer
Science
Indian Institute of Technology, Kanpur

Group Number: 5 Date of Submission: October 21,


Devanshu Singla (190274), Sarthak Rout 2020
(190772), Yatharth Goswami (191178)

Question 1
n

We have seen generating functions for m for variable m keeping n fixed, and for
variable n keeping m fixed. If we wish to make both variable then the generating
function needs to be over two variables.
1 n
P P  m n
1. Prove that 1−y−xy
= n≥0 m≥0 m x y .

2. Derive the generating function 2n



n
from above two-variable generating func-
tion by judicious substitution for one of the two variable.

Solution

1 Part (a) :
The following property can be proved by using the taylor’s expansion of it’s one vari-
able counterpart. First, let us define another variable z as

z = y(1 + x) (1.1)

Now the given expression can be rewritten equivalently as

1 1
= (1.2)
1 − y − xy 1 − y(1 + x)
1 1
= (1.3)
1 − y(1 + x) 1−z

1
We also know by taylor’s expansion of single variable functions that

1 X
= z n f or |z| ≤ 1 (1.4)
1−z n≥0

Therefore using the equations (1.3) and (1.4) we get

1 X
= (y(1 + x))n f or |y(1 + x)| < 1 (1.5)
1 − y − xy n≥0
X
= y n (1 + x)n (1.6)
n≥0

Now, using the binomial theorem for (1 + x)n we get

1 X  X n 
= yn xm (1.7)
1 − y − xy n≥0 m≥0
m

X X n   
= x yn
m
(1.8)
n≥0 m≥0
m
X X n
= xm y n (1.9)
n≥0 m≥0
m

Note: We were able to move the terms in parenthesis around as m and n were inde-
pendent of each other. Also the above relation is only true for |y(1 + x)| < 1 as only
then the sum on the RHS would converge.
Hence, proved that the given relation holds true.

2 Part (b) :
First, we would be proving some preliminary results that would help us further.

2u 2n−2u
 
= 4n
P
Claim 1: u≥0 u n−u

Proof. Let us first define a function, say fn (x) as

X 2i2n − 2i
fn (x) = xn−i (1.10)
i≥0
i n−i

GP 5 2
For proving the claim, we need to find the value of fn (1), which can be found if we try
to find some sort of recursive definition for fn (x). Now, let’s try to define some recur-
sive definition for this function using some observations.

Observation 1: The function fn (x) satisfies the relation given by

fn (x) = xn fn (1/x) (1.11)

Proof. The intuition behind defining such a relation comes from the fact that if we
substitiute n − i in place of i we do not change the value of binomial coefficient ni .


Let us calculate the value of RHS first.


X 2i2n − 2i
n n
x fn (1/x) = x xi−n (1.12)
i≥0
i n − i
X 2i2n − 2i
n
=⇒ x fn (1/x) = xi (1.13)
i≥0
i n − i

Now, replacing i with n − i in equation (1.13) gives

X 2n − 2i2i
n
x fn (1/x) = xn−i (1.14)
i≥0
n−i i

= fn (x) (1.15)

Hence, proved.

If we differentiate both sides in observation 1, and plug in x = 1, we will get another


relation for x = 1.

nxn−1 fn (1/x) − xn−2 fn0 (1/x) = fn0 (x) (1.16)


=⇒ fn0 (1) = nfn (1) − fn0 (1) (1.17)
n
=⇒ fn0 (1) = fn (1) (1.18)
2

Now, the natural next step for solving for fn (1) is to differentiate the original function
and try to find another relation to eliminate the derivatives at x = 1. So, let’s proceed

GP 5 3
with it.
X 2i2n − 2i + 2
fn+1 (x) = xn+1−i (1.19)
i≥0
i n−i+1
X 2i2n − 2i + 2
0
=⇒ fn+1 (x) = (n + 1 − i)xn−i (1.20)
i≥0
i n − i + 1
X 2i2n − 2i (2n − 2i + 2)(2n − 2i + 1) 
0
=⇒ fn+1 (x) = (n + 1 − i)xn−i (1.21)
i≥0
i n−i (n − i + 1)(n − i + 1)
X 2i 2n − 2i
 
0
=⇒ fn+1 (x) = (2)(2n − 2i + 1)xn−i (1.22)
i≥0
i n − i
X 2i2n − 2i n+1   
0 n−i
X 2i 2n − 2i
=⇒ fn+1 (x) = 2 x +4 (n − i)xn−i (1.23)
i≥0
i n − i i=0
i n − i
0
=⇒ fn+1 (x) = 2fn (x) + 4xfn0 (x) (1.24)
0
=⇒ fn+1 (1) = 2fn (1) + 4fn0 (1) (1.25)

Using the relation between value of differential at x = 1 obtained for general n in eq.
(1.18), we can substitute them in eq. (1.25) to get a nice recursive relation which we
desire for.
 
n+1
fn+1 (1) = 2nfn (1) + 2fn (1) (1.26)
2
=⇒ fn+1 (1) = 4fn (1) (1.27)

Therefore, we got the final recursive relation for value of function at x = 1. Now,
observe the fact that the value of f0 (1) is 1. Hence, fn (1) is a geometric progression
with common ratio 4 and initial term 1, which implies the general value of fn (1) is 4n .
Hence, proved.

Moving further, if we plug in the value of variable x to be 3 in the equation of Part (a)
we get

1 X X n
= 3m y n (1.28)
1 − 4y n≥0 m≥0
m
X
= y n (1 + 3)n (1.29)
n≥0

GP 5 4
X
= 4n y n (1.30)
n≥0

2n

Let f (y) be the generative function for n
, therefore

X 2u
f (y) = yu (1.31)
u
u≥0
X X 2u2v 

2
=⇒ f (y) = y (u+v) (1.32)
u≥0 v≥0
u v

Let u + v = n (1.33)
X X 2u2n − 2u
2
=⇒ f (y) = yn (1.34)
n≥0 u≥0
u n − u

(1.35)

Now, by using Claim 1, we get


X
f 2 (y) = 4n y n (1.36)
n≥0
1
=⇒ f 2 (y) = using (1.18) (1.37)
1 − 4y
=⇒ f (y) = ±(1 − 4y)−1/2 (1.38)

Now, we can easily see that amongst the two possible f (y) obtained in the equation
(1.26) only one is acceptable as one of them is strictly the negative of the other and
hence the sequence represented by the it is just the negative of the sequence obtained
using the other. Therefore, we need to select only one out of these two and this can
easily be checked by plugging in y = 0 in the taylor expansion of both of these. Since,
f (0) should be positive number, hence (1 − 4y)−1/2 is the only acceptable solution
amongst the two. Therefore,

f (y) = (1 − 4y)−1/2

GP 5 5
Question 2
For a fixed number k > 0, find the recurrence relation and generating function for the
sequence akn = b nk c. Use these two to derive the generating function for the sequence
2
bkn = b nk c .

Solution
Assuming that n and k both are natural numbers.
For the recurrence relation, we observe that :

n+k n
akn+k − akn = b c−b c=1
k k

. Also, akn = 0 for all n < k as b nk c = 0 whenever n < k.


The generating function fk (x) looks like:

fk (x) = 0 + 0x + 0x2 + 0x3 . . . 0xk−1 + 1xk + 1xk+1 . . . 1x2k−1 + 2x2k . . .

. Each integer q occurs k times as coefficient of terms xkq , xkq+1 . . . xkq+k−1 . Taking xkq
as common from these terms we obtain,

fk (x) = 0xk0 (1 + x + x2 . . . xk−1 ) + 1xk (1 + x + x2 . . . xk−1 ) . . . qxkq (1 + x + x2 . . . xk−1 )


X 1 − xk X ki
=⇒ fk (x) = (1 + x + x2 . . . xk−1 )( ixki ) = · ix
i≥0
1 − x i≥0
.
Let G(x) be a generating function such that ,
X
G(x) = ixi
i≥0

1
xi .
P
. For |x| < 1, we have 1−x
=
i≥0
Differentiating it w.r.t. x and multiplying by x, we get

x X
= ixi = G(x)
(1 − x)2 i≥0

GP 5 6
xk X
=⇒ G(xk ) = = ixki
(1 − xk )2 i≥0

as required for fk (x) above.


So,
1 − xk xk xk
f (x) = · =
1 − x (1 − xk )2 (1 − x)(1 − xk )
. This is required generating function for akn .

Similarly for bkn = (b nk c)2 , the generating function

1 − xk X 2 ki 1 − xk
fk∗ (x) = · ix = · G∗ (xk )
1 − x i≥0 1−x

say.
So, we differentiate both sides of the equation

x X x−1+1 1 1
2
= ixi = 2
= 2

(1 − x) i≥0
(1 − x) (1 − x) 1−x

to get:
2 1 x+1
3
− 2
=
(1 − x) (1 − x) (1 − x)3
. Multiplying by x,
X x(x + 1)
i2 xi = = G∗ (x)
i≥0
(1 − x)3

. Then,

1 − xk 1 − xk (xk )(xk + 1) (xk )(xk + 1)


fk∗ (x) = · G∗ (xk ) = · =
1−x 1−x (1 − xk )3 (1 − x)(1 − xk )2
. This is the required generating function for bkn .

GP 5 7
Question 3
Given numbers from 0 to 2n − 1 in a sequence, what is the number of permutations
of this sequence such that no even number is in its original position (express the
number of permutations in terms of derangement number dn )?

Solution
Derangement: dn is the number of ways we can permute n objects in such a way that,
none of the objects occupy their original position.

Let P denote the set of all permutations of [0, 2n − 1]. Define Ak ⊂ P s.t. ∀ a ∈ Ak
where a is a permutation, then n − k odd numbers in a are in their original place
while the other k odd numbers and all n even numbers are not in their original place
for k ∈ [0, n].
{Ak } ∀ k ∈ [0, n] are disjoint :
For k, l ∈ [0, n], Ak ∩ Al = φ as if a ∈ Ak , then n − k odd numbers in a are in their origi-
nal place and others are in different place, so total number of odd integers in original
place in a can never be more or less than n − k and hence a ∈ / Al ∀ l ∈ [0, n]/k.

Let set of permutations in which even number are not in their original place, AE ⊂ P.

S
AE = (set of permutations where no number is in its original place) (set of permuta-
tions where one odd number is in its original place and others not in original place)
S
. . . (set of permutations where all odd numbers are in their original place and all
other even numbers are not in original place)
[
AE = Ak
k∈[0,n]

[
|AE | = Ak
k∈[0,n]
X
= |Ak | (Ak ∪ Al = φ, ∀k, l ∈ [0, , n])
k∈[0,n]

GP 5 8
For each Ak :
Let the 2n numbers be broken into 2 subgroups where the first subgroup is to be de-
arranged and the second subgroup occupies their original position as before.

For the first subgroup, we must take all the n even numbers and k odd numbers
that will not occupy their original position, by nk ways.Then the rest n − k odd num-


bers must occupy their original position in exactly 1 way. We can derange the first
group by dn+k ways. For a particular value of k, we have dn+k nk permutations.


So, the total number of all such permutations will be sum of cardinalities of all
n
dn+k nk .
P 
these sets which is AE =
k=0

GP 5 9
Question 4
Q
Let A be a set containing non-empty sets and define A× = B∈A B. Prove that Axiom
of Choice is equivalent to the statement that for every set A as above, A× 6= ∅.

Solution

Proof of Axiom of Choice implies the statement in question.


Consider an arbitrary set A s.t. φ ∈
/A
By Axiom of Choice,
[
∃f : A → B s.t. f (B) ∈ B ∀ B ∈ A
B∈A

By definition of cross product,

∃ set I s.t. |I| = |A| ⇒ ∃g : I → A s.t. g is a bijection, then


Y
AX = B = {{bα |bα ∈ g(α), α ∈ I}}
B∈A

Consider the tuple a = {f (g(α))|α ∈ I}. Since f (g(α)) ∈ g(α), for α ∈ I by definition of
f,
⇒ {f (g(α))|α ∈ I} ∈ {{bα |bα ∈ g(α), α ∈ I}}

⇒ {f (g(α))|α ∈ I} ∈ AX

∴ AX 6= φ

Since we have proved AX ∈


/ φ for arbitrary A s.t. φ ∈
/ A, it implies result holds for all
such sets.

Proof of the statement in question implies Axiom of Choice.


Consider arbitrary set A s.t. φ ∈
/ A. By definition of cross product,

∃ set I s.t. |I| = |A| ⇒ ∃g : I → A s.t. g is a bijection, then


Y
AX = B = {{bα |bα ∈ g(α), α ∈ I}}
B∈A

GP 5 10
By statement in question, AX 6= φ ⇒ ∃a ∈ AX .

⇒ a = {bα |α ∈ I} for some bα ∈ g(α), for α ∈ I

Since g is a bijective function, g −1 : A → I exists. Now constructing function f : A →


S
B∈A B as:
f (B) = bg−1 (B)

Since bα ∈ g(α) ∴ f (B) = bg−1 (B) ∈ g(g −1 (B)), ∀B ∈ A.

⇒ f (B) ∈ B, ∀B ∈ A as (g(g −1 (x)) = x)


S
∴ ∃f : A → B∈A B, s.t. f (B) ∈ B ∀ B ∈ A, for arbitrary A s.t. φ ∈
/ A, hence the result
holds for all such sets.

Since the statement in question and Axiom of Choice both imply each other, they
are equivalent.

GP 5 11

You might also like