Test #2 (MS DOCX)

advertisement
MATH/CSE 1019N Test 2 (Winter 2014)
Last Name:
First Name:
Student Number:


The test is 80 minutes long
No aides are permitted
In the questions below (1 point each) determine whether the set is finite or infinite. If the set is
finite, find its size.
x  x  Z and x2  10.
Ans: 7.
2. P(abcd), where P denotes the power set.
Ans: 16.
3. A  B, where A  abc and B  .
Ans: 0.
4. 1101001000….
Ans: Infinite.
5. S  T, where S  abc and T  12345.
Ans: 15.
3
6. (2 points) Find
j
 ij.
j 1 i 1
Ans: 25.
4
 (i
7. (2 points) Rewrite
2
 1) so that the index of summation has lower limit 0 and upper
i 3
limit 7.
7
Ans:
 (i  3)
2
1).
i 0
6n  4n5  4
8. (2 points) Use the definition of big-oh to prove that
is O(n3). Don’t forget to
7n2  3
specify C and k.
Ans:
6n  4n5  4 6n5  4n5 10n5 5 3


 n , if n  2.
7n 2  3
7n 2  n 2
6n 2 3
9. (2 points) Find the solution of the recurrence relation an  3an  1 with a0  2.
Ans: an  2  3n
10. (2 points) Use the Principle of Mathematical Induction to prove that 1  2n  3n for all n  1.
Ans: P(1): 1  21  31, which is true since both sides are equal to 3. P(k)  P(k  1): 1 
2k  1  (1  2k)  2k  3k  2k  3k  3k  2  3k  3  3k  3k  1.
11. (2 points) Use the Principle of Mathematical Induction to prove that 2  (n2  3n) for all n 
1
Ans: P(1): 2  12  3  1, which is true since 2  4. P(k)  P(k  1): (k  1)2  3(k  1) 
(k2  3k)  2(k  2), which is divisible by 2 since 2  k2  3k and 2  2(k  2).
In the questions below (1 point each) give a recursive definition (with initial condition(s)) of
an (n  123…) or of the set S.
12. an  2n.
Ans: an  2an  1, a1  2.
13. an  2 .
Ans: an  an  1, a1  2 .
14. All positive integer multiples of 5.
Ans: 5  S; x  S  x  5  S.
In the questions below (1 point each) consider all bit strings of length 12.
15. How many begin with 110?
Ans: 29.
16. How many begin with 11 and end with 10?
Ans: 28.
17. How many begin with 11 or end with 10?
Ans: 2  210  28.
18. How many have exactly four 1s?
Ans:
 
 12 
 4
 
.
19. How many have exactly four 1s and none of these 1s are adjacent to each other?
Ans:
 
9
4
 
.
20. (2 points) Find the coefficient of x7y5 in the expansion of (3x  y)12.




Ans:   127  37 .
21. (2 points) Find the coefficient of x5 in (2  x2)12.
Ans: 0.
22. (3 points) A vending machine dispensing books of stamps accepts only $1 coins, $1 bills,
and $2 bills. Let an denote the number of ways of depositing n dollars in the vending
machine, where the order in which the coins and bills are deposited matters.
(a) Find a recurrence relation for an and give the necessary initial condition(s).
(b) Find an explicit formula for an by solving the recurrence relation in part (a).
Ans: (a) an  2an  1  an  2, a0  1, a1  2.
Download