
CS 1050 A Spring 2008
Test #2 Announcements March 5, 2008
Second test will be held on Monday, March 10. The test will be closed book. You may, however, bring
one 8.5” x 11” sheet of paper as a formula sheet. Preparing a formula sheet can be a useful study aid, so
take time in selecting material for it. You may use ONLY ONE SIDE of the paper and write as small as you
like. No mechanical or electronic reproductions are allowed. You must hand in your crib sheet when you
hand in your exam.
Material covered: You are responsible for the material covered in lecture until Friday, February 29 (in-
clusive).
Review: There will be a review in class on Friday, March 7.
Again, the best way to study for this exam is to
•review the assignments, make sure you can solve the problems, practice solving similar ones;
•review your lecture notes.
Sample problems: Explain your answers.
1. Show that if six integers are selected from the set {1,2,3,4,5,6,7,8,9},then there must be at least
one pair of these integers that sum up to 10.
2. Let A={1,2, . . . , n},where nis an integer greater than 2 , and B={a, b, c, d}.How many functions
f:A→Bare there
a) that are one-to-one,
b) that assign conly to both 1 and n,
c) that assign donly to two of the positive integers less than n?
Make a suitable assumption about nwhenever necessary.
3. How many integer solutions are there to the equation x1+x2+x3+x4+x5= 123, where xi≥0 for
i= 3,4,5, x1≥4 and x2≥9 ?
4. How many bit strings of length n, where n≥3
a) start with 1,
b) end with 0 and contain exactly r0’s in total,
c) start with 1 or end with 00?
5. What is the probability that a bit string of length 5 picked at random starts with a one given that it
has exactly 3 ones in total?
6. What is the coefficient of x7y12 in (x+y)19 and (2x+ 3y)19 ?
7. How many ways are there to arrange the letters of the word NONSENSE ? How many of them start
or end with the letter O?
8. How many ways are there to choose 12 cookies if there are five varieties of cookies?
1