You are on page 1of 3

MH 1301 Discrete Mathematics

Assignment 4

Question 1
1. In how many different ways can five elements be selected in order from
a set with three elements when repetition is allowed ?

2. How many ways are there to select five unordered elements from a set
with three elements when repetition is allowed ?

3. How many strings of six letters are there (there are 26 letters) ?

4. How many ways are there to assign three jobs to five employees if each
employee can be given more than one jobs ?

Question 2

How many ways can n books be placed on k distinguishable shelves

1. if the books are indistinguishable copies of the same title?

2. if no two books are the same, and the positions of the books on the
shelves matter?

3. if no two books are the same, the positions of the books on the shelves
do not matter, and each shelf has exactly n/k books (assuming that n
is a multiple of k)?

Question 3

A binary string is a string containing only 0s and 1s.

1
1. find a recurrence relation for the number of bit strings of length n that
contain two consecutive 0s

2. what are the initial conditions ?

3. find the answer when n = 4.

Question 4

Bottle T has 4 litres of tea and bottle C has 4 litres of coffee. In each step
you pour 1 litre of liquid from bottle T into bottle C, stir, pour back 1 litre
of liquid from bottle C into bottle T, and stir again. (This is a recipe for
Kopi Cham.) Let f (n) be the amount of coffee in bottle T after n steps.

1. Calculate the values f (0), f (1), and f (2).

2. Write down the recurrence formula for f (n).

3. Solve the recurrence from part (2).

4. What is the limiting value of f (n) as n approaches infinity?

Question 5

You need to tile a n × 1 hallway with unlimited supply of 1 × 1 red tiles, 2 × 1


red tiles, and 2 × 1 blue tiles. Write down the recurrence formula and initial
conditions for the number of ways to tile:

1. A n × 1 hallway for which you are allowed to use all types of tiles.

2. A n × 1 hallway for which you are allowed to use all types of tiles, but
no two red tiles are consecutive.

2
Question 6

A ternary string is a string containing only 0s, 1s, and 2s.

1. find a recurrence relation for the number of ternary strings of length n


that do not contain two consecutive 0s.

2. what are the initial conditions ?

3. find the answer when n = 4.

Question 7 (hard)

Re-solve all the subquestions in Question 6, if the restriction is changed to


“the string do not contain two consecutive 0s or two consecutive 1s”.

You might also like