Docsity

Homework Set 5 - Computer Science | CS 1050, Assignments of Computer Science

Toggle sidebar
bg1
CS 1050 A SPRING 2008
Homework Set # 5 Due February 20, 2008
Total 80 points (+10 extra).
Reading: Rosen [R] โ€“ Chapters 5.1, 7.5 (plus revise 2.1-3)
In all the problems below show your reasoning and indicate every counting rule that you used.
1. How many subsets of a set with 100 elements have more than one element?
2. How many licence plates can be made using either three letters followed by three digits or four letters
followed by two digits?
3. (15pts.) You are given two sets A={1,2, . . . , n}and B={1,2,3,4,5},where nis a positive integer.
(a) How many functions are there from Ato B?
(b) How many bijections are there from Ato B?
(c) How many functions are there from Ato Bsuch that f(1) = 5 for each of them?
Make a suitable assumption about nwhenever necessary.
4. How many numbers from 1000 to 9999 are divisible by 2 or 3 or 5?
5. (25pts.) Consider here 5-digit numbers and answer the following questions.
(a) How many are there in total?
(b) How many of them are even numbers?
(c) How many of them are palindromes?
(d) How many of them contain 3 exactly once?
(e) How many of them contain at least one occurrence of 3?
Bonus Show that there are 22ndifferent truth tables for propositions in nvariables. (Note that two truth
tables are different, if they differ in the last column and we do not need to consider here which operators
are used in these propositions).
1

Partial preview of the text

Download Homework Set 5 - Computer Science | CS 1050 and more Assignments Computer Science in PDF only on Docsity!

CS 1050 A SPRING 2008

Homework Set # 5 Due February 20, 2008

Total 80 points (+10 extra). Reading: Rosen [R] โ€“ Chapters 5.1, 7.5 (plus revise 2.1-3) In all the problems below show your reasoning and indicate every counting rule that you used.

  1. How many subsets of a set with 100 elements have more than one element?
  2. How many licence plates can be made using either three letters followed by three digits or four letters followed by two digits?
  3. (15pts.) You are given two sets A = { 1 , 2 ,... , n} and B = { 1 , 2 , 3 , 4 , 5 }, where n is a positive integer. (a) How many functions are there from A to B? (b) How many bijections are there from A to B? (c) How many functions are there from A to B such that f (1) = 5 for each of them? Make a suitable assumption about n whenever necessary.
  4. How many numbers from 1000 to 9999 are divisible by 2 or 3 or 5?
  5. (25pts.) Consider here 5-digit numbers and answer the following questions. (a) How many are there in total? (b) How many of them are even numbers? (c) How many of them are palindromes? (d) How many of them contain 3 exactly once? (e) How many of them contain at least one occurrence of 3? Bonus Show that there are 2^2 n different truth tables for propositions in n variables. (Note that two truth tables are different, if they differ in the last column and we do not need to consider here which operators are used in these propositions).