h8-sol - n = 36. Q4. Let d be a positive integer. Show that...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Solutions of HW#8 : Basic Counting Q1. How many bit strings of length 10 begin and end with a 1? Answer Fixing the ±rst and last bits at 1, the number of combinations of the middle 8 bits is 2 8 . Q2. How many strings of four decimal digits do not contain the same digit twice? Answer Assuming that the most signi±cant digit can be a 0, the number of strings that do not contain a repeated digit is P(10 , 4) = 10 × 9 × 8 × 7 = 5040. Q3. What is the minimum number of students required in a programming class to be sure that at least eight will receive the same grade (there are ±ve possible grades; A, B, C, D, and F)? Answer Let n be the required number of students. It is required to compute the (minimum) n such that n/ 5 ⌉ ≥ 8. Given that the ceiling returns the smallest integer greater than or equal n/ 5, n should be greater than 35 to make the result greater than 7. That is,
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: n = 36. Q4. Let d be a positive integer. Show that among any group of d + 1 (not necessary consecutive) integers there are two with exactly the same remainder when they are divided by d . Answer Any number i when divided by d gives a remainder r where 0 r < d . Since we have d + 1 integers and d possible remainders, there will be at least d +1 d = 2 integers with the same remainder. Q5. How many subsets with more than two elements does a set with 15 elements have? Answer The total number of subsets = 2 15 . The number of subsets with 0 element is 1, with 1 element is 15, and with 2 elements is C(15 , 2) = (15 14) / 2! = 105. Therefore, the number of subsets with more than two elements = 2 15 (1 + 15 + 105) = 32 , 647. 1...
View Full Document

This homework help was uploaded on 04/19/2008 for the course CS 182 taught by Professor W.szpankowski during the Fall '08 term at Purdue University-West Lafayette.

Ask a homework question - tutors are online