Docsity

CS 1050 A Spring 2008 Test #2 Announcements and Study Material, Exams of Computer Science

Toggle sidebar
bg1
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
pf2

Partial preview of the text

Download CS 1050 A Spring 2008 Test #2 Announcements and Study Material and more Exams Computer Science in PDF only on Docsity!

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 n is an integer greater than 2 , and B = {a, b, c, d}. How many functions f : A → B are there a) that are one-to-one, b) that assign c only to both 1 and n, c) that assign d only to two of the positive integers less than n? Make a suitable assumption about n whenever necessary.
  3. How many integer solutions are there to the equation x 1 + x 2 + x 3 + x 4 + x 5 = 123, where xi ≥ 0 for i = 3, 4 , 5 , x 1 ≥ 4 and x 2 ≥ 9?
  4. How many bit strings of length n, where n ≥ 3 a) start with 1, b) end with 0 and contain exactly r 0’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 x^7 y^12 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
  1. What is the probability that a fair coin lands heads 4 times out of 10 flips? Consider the same question for a biased coin, which lands heads with probability 23.
  2. In how many ways can we distribute 20 identical pennies and 10 different tokens in 6 numbered urns?
  3. Five cards were selected at random from the standard deck of 52 cards. Consider the following two events: E 1 : all 5 cards are of the same suit, E 2 : at least one diamond was selected. Are these events independent?