Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
DISCRETE STRUCTURES
SOLUTION 4
1. Call a partition P of An special, if no subset in P contains two consecutive
integers. Denote by S '(n, r ) the number of special partitions of An
containing exactly r non-empty subsets. First I prove by induction on n, that
S '(n, r ) S (n 1, r 1) for all n 1 and for all r in the range 1 r n . For n =
1 we have S '(1,1) 1 S (0, 0) and the induction basis is proved. So take
n 2 and 1 r n , and assume that the claim holds for S '(n 1, r ') for all
legitimate indices r ' . Consider the special partition of An1 into r-1 non
empty subsets. Adding {n} as singleton gives a special partition of An .
Then consider a special partition of An1 into r non-empty subsets. Adding
n to any one the r-1 subsets not containing n-1 yields a special partition of
An . All special partitions of An into r non-empty subsets can be generated
in this way. Subsequently:
S '(n, r ) S '(n 1, r 1) (r 1) S '(n 1, r )
S (n 2, r 2) (r 1) S (n 2, r 1) [by the Induction hypothesis]
S (n 1, r 1) [by the recurrence for Stirling numbers]
And the inductive step is established. For n 1 it then follows that
n
n
Bn' S '(n, 0) S '(n, r ) S '(n, r ) [Since S '(n, 0) 0 ]
r 1
r 1
n
n 1
r 1
r 1 0
S (n 1, r 1) S (n 1, r 1) Bn 1
2. The characteristic equation is
( X ) X 3 5 X 2 3X 9 X 3 3X 2 2 X 2 6 X 3X 9
X 3 X 2 2 X 3 X 3 X 1 X 3 X 1 X 3 0
2
Therefore, a general solution of the given recurrence is:
Tn c(1) n c '3n c "3n
Plugging in the initial values gives:
c c ' 1,
c 3c ' 3c " 2 ,
c 9c '18c " 28
The solution of this system is c
Tn
25
9
7
, c ' , c " . Then we have
16
16
4
25
9
7
(1) n n 3n .
16
16
4
3. We prove all the three properties as follows:
[Reflexive] For any a A we have min(a) = min(a).
[Symmetric] For any a, b A , if min(a) = min(b), then min(b) = min(a)
[Transitive] For any a, b, c A , if min(a) = min(b), min(b) = min(c), then
min(a) = min(c).
4. The proof is as follows:
n
Given L(1) = 3 and L(n) L 1
2
n
n
So L L 1
2
4
n
n
i.e. L(n) L 2
4
n
Similarly, L(n) L 3 and so on.
8
n
In general, L(n) L a a for any positive integer a
2
a
Let 2 n , or a log 2 n
i.e. L(n) L 1 1
4
n
L(n) L log 2 n
n
i.e. L(n) L 1 log 2 n
i.e. L(n) log 2 n 3 .
1 5
. So a particular
2
solution is of the form 1n . Substitution gives d , i.e. d .
5. The characteristic equation x 2 x 1 has roots x
Therefore, a general solution is of the form
n
n
1 5
1 5
Tn
u
v d
2
2
where u, v are constants to be determined from the initial conditions
1 5
1 5
T1 a
u
v d ,
2
2
3 5
3 5
T2 b
u
v d
2
2
Solving this system gives,
1
3 5 a 1 5 b 2d
2 5
1
v
3 5 a 1 5 b 2d
2 5
u
Notice that the exact values of the constants u, v, w are not very important
here. It suffices to know the form of the solution. In particular, since a, b, d
are positive, it follows that u > 0. Also
1 5
1 . Consequently,
2
1 5 n
Tn
.
2
S
6. Let n ,3 denote the total number of bit strings of length n that have three
consecutive 0s. Now we have two possibilities, if 1 occurs on the first place
or 0 occurs in the first place. If 1 occurs, then the problem reduces to
finding the number of bit strings of length n-1 that have three consecutive
0s i.e. S n 1,3 and if 0 occurs in the first place then we look for the 2nd digit.
Similarly if 1 occurs in the 2nd digit as well, then we have to solve the
relation S n 2,3 , and if again 0 occurs we see the 3rd digit, if 1 occurs here
then we solve S n 3,3 otherwise the remaining n-3 places can be either filled
with 1 or 0, giving a total number of ways as 2n3 Hence the recurrence
relation becomes
Sn,3 Sn1,3 Sn2,3 Sn3,3 2n3
S 2,3 0 , S1,3 0 , S 0,3 0
From the above recurrence relation, we get
S3,3 1
S 4,3 3
S5,3 8
S 6,3 20
S7,3 47
7. If n is odd, the f(n+2) = 2f(n+1) + 1 and f(n+1) = 2f(n); if n is even, f(n+2) =
2f(n+1) and f(n+1) = 2f(n) + 1. So the result holds in either case.
This is not a “pure” recurrence relation because of added 1. But if we set
g(n) = f(n) + ½, the g(n+1) + 2g(n) = f(n+1) + 2f(n) + 3/2 = g(n+2). The
characteristic equation is x 2 x 2 , with solutions 2 and -1, so
g (n) a2n b(1)n . The initial values g(1) = 3/2 and g(2) = 5/2 yield a = 2/3
2
3
1
6
1
2
and b = -1/6. So f (n) 2n (1) n .