Assignment Final
Assignment Final
and
Graph Theory
Assignment
Group Members:
Ajish Sekar - 106116002
Benedict Florance A - 106116016
Shyaam M- 106116090
Suresh Mudaliar - 106116096
1
1. Five scientists must not be able to open the cabinet, so when
ve scientists come together they must not be able open one lock,
so for every combination of 5 scientists there exists a unique lock
which they cannot open.
Therefore the smallest number of locks required = 11 C5
The number of keys each scientist has is equal to the number of
groups of ve in which he is not a part.
Therefore the number of keys for each scientist = 10 C5
2
6. Number of ways the exams can be scheduled = 5 4 3
= 60
3
ball present between two dividers, then the object of that type is
not chosen.
For instance, selecting 5 objects from 3 types. As before, take 5
balls and 2 dividers. Visually, O / OO / OO
In this order, we'd select one from the rst type, two from the
second type and two from the third type.
The number of possible ways for arranging 5 balls and the 2 di-
(5+31)! 7 7
viders 5!(31)! = 2 = 5
CASE 1:
4 oranges can be given to the students.
In this case the total posibilities will be 6 C4 =15
CASE 3:
2 Oranges and 2 Apples can be distributed.
6 7
Total possibilities= 2!C2
x 2!C2
=1890
4
CASE 4:
1 Oranges and 3 Apples can be distributed
6 7
Total possibilities= 2!C2
x 2!C2
=980
CASE 5:
4 Apple can be distributed
Total possibilities= 7 C4 =35
12. Here the total number of chairs are 12 and total number
of boys to be placed are 5.
So, total number of possibilities are 12 C5 5!=95040.
If two of the numbers are the same and the other is dierent:
6x5 = 30 ways
5
If all three are equal: 6 ways
Hence, the total number of possibilities are = 20 + 30 + 6 = 56
ways.
15.
a) All x are greater than
0:
n+r1
No. of ways = r
21+51
=
5
= 53,130
b) Let x1 be y1 + 1.
The equation becomes y1 + x2 + x3 + x4 + x5 = 20
20+51
No. of solutions =
5
= 42,504
6
16.There are n! ways to choose an order for the books. Once
chosen this order, we have to place k-1 bars between the books
to determine where ends a shelf and begins the next one. This
is like rearranging a set of n books and k-1 bars, and there are
(n1+k Cn ) ways to do this.
19. We need to move 'm' steps right and 'n' steps forward to reach
(m,n).
So, any path consists of m-right steps and n-forward steps.
Total no. of paths will be the no. of ways to arrange these 'm+n'
7
steps.
Total no. of ways = n!
m!(nm)!
n
Answer =
m
2n
= 1
n+1 n
A bad sequence contains 'n' open and 'n' closed parentheses, but
reaches the value -1 at a certain step for the rst time during
parsing. When we get the value -1 we have parsed precisely one
closing parentheses more than open parentheses.
Reverse from that point on all parentheses, i.e. exchange all open
with closed parentheses and vice-versa. This results in a sequence
with two more closed parentheses than open parentheses. So we
have a total of 'n+1' closed parentheses and 'n-1' open parenthe-
8
ses.
2n
The number of bad sequences is = Hence, the no. of valid
n+1
sequences is -
2n 2n 2n
= 1
n n+1 n+1 n
1 2(n1)
n n1
= 45 ways
9
k k
an integer composed of 3k identical digits and z= 102.3 + 103 + 1
For example, x = 666666666 = 666 x 1001001.
y is divisible by 3 by the hypothesis and z is divisible by 3 (sum
of the digits is divisible by 3). Thus x is divisible by 3k+1 .
24. A natural number less than 150 and more than 1 is prime if
and only if it is not divisible by any of 2, 3, 5, 7 and 11.
Let A, B, C, D and E be the sets of natural numbers (less than
150 and more than 1) which are not prime and divisible by 2, 3,
5, 7 and 11, respectively.
We use the Principle of Inclusion-Exclusion, to obtain | A B
C D E |.
Here most of the terms vanish. For example, the intersections of
four or more of the sets A, B, C, D, E and F are empty.
|ABCDE|=|A|+|B|+|C|+|D|+|E|-|
A B | - | A C | - ... - | D E | + | A B C + | A B
D | + ... + | C D E | - | A B C D | - ... - | B C
DE|+|ABCDE|
| A B C D E | = 75 + 50 + 25 + 21 + 13 - 25 -
15 - 10 - 6 - 10 - 7 - 4 - 4 - 2 -1 + 5 + 3 + 2 + 2 + 1 + 1 = 114
10
25. Let aj be the number of pizzas taken on or before the j th
day.
Then a1 , a2 , ..., a15 is an increasing sequence of distinct positive
integers, with 1 aj 25.
Moreover, a1 + 4, a2 + 4, ..., a15 + 4 is also an increasing sequence
of distinct positive integers, with 5 aj + 4 29.
The 30 positive integers a1 , a2 , ..., a15 , a1 + 4, a2 + 4, ..., a15 + 4 are
all less than or equal to 29.
Hence, by the pigeonhole principle two of these integers are equal.
Because the integers aj , j = 1, 2, . . . , 15 are all distinct and
the integers aj + 4, j = 1, 2, . . . , 15 are all distinct, there must
be indices i and j with ai = aj + 4.
This means that exactly 4 pizzas were taken from day j + 1 to
day i.
11
Then a1 , a2 , ..., a365 is an increasing sequence of distinct positive
integers, with 1 aj 600.
Moreover, a1 + 129, a2 + 129, ..., a365 + 129 is also an increasing
sequence of distinct positive integers, with 130 aj + 4 729.
The 730 positive integers a1 , a2 , ..., a365 , a1 +129, a2 +129, ..., a365 +
129 are all less than or equal to 729.
Hence, by the pigeonhole principle two of these integers are equal.
Because the integers aj , j = 1, 2, . . . , 365 are all distinct and
the integers aj + 129, j = 1, 2, . . . , 365 are all distinct, there
must be indices i and j with ai = aj + 129.
This means that exactly 129 books were sold from day j + 1 to
day i.
12
a1 + 21, a2 + 21, ..., a77 + 21 are also distinct, then the two equal
numbers must be of the forms ai and aj + 21. Since the number
games played up to the ith day is ai = aj + 21, we conclude that
on the days j + 1, j + 2, ..., i the chess master played a total of
21 games.
13
2 19! 16!
14