Examples and Hints to Homework
- #21 - 27 page 171
-
How many eight-bit strings begin 1100 ?
Answer : 24 .since there are only four bits to choose.
- How many 8-bit strings begin and end with 1?
Answer : 26 since first and last bit have been already determined.
- How many 8-bit strings have either the second or the fourth bit 1 (or both)?
Answer: 27 + 27 - 26 ( # of 8-bit strings with second bit 1 plus
the # of 8-bit strings with fourth bit 1 minus the # of 8-bit strings
with both second and fourth bit 1 )
or
28 - 26 (total number of 8-bit strings minus the # of
8-bit strings with both second and fourth bit 0)
- How many 8-bit strings have exactly one 1?
Answer : 8 = C(8,1)
- How many 8-bit strings have exactly two 1's ?
Answer : C(8,2) = 8!/(2!6!)
- How many 8-bit strings have at least one 1?
Answer = 28 - 1 = total # of 8-bit strings minus the # of 8-bit strings with no 1's
- How many 8-bit strings read the same from either end?
Answer : Since the strings read the same from either end, this means that
the first 4 bits of the 8-bits string uniquely determine the string! So, how many
4-bit strings out there?
- #32 - #33 page 171
-
How many selections are there in which either Dolph is chairperson or
he is not an officer?
Answer : case that Dolph is the chair plus the case that
Dolph is not an officer, and these two cases are mutually disjoint.
- How many selections are there in which Ben is either chairperson
or treasurer?
Answer : C(5,2)*2! + C(5,2)*2! or 5*4 + 5*4
- (34 - 41 page 171)the letters ABCDE are to be used to form strings of length 3:
- How many strings can be formed if repetitions are allowed?
Answer : 53 .Since for each of the three positions , we hae five choices.
- Same as before , but repetitions are not allowed.
Answer : 5 * 4 * 3
- How many strings begin with A , allowing repetition?
Answer : 52 .
- How many strings begin with A if repetitions are not allowed?
Answer: 4 * 3
- How many strings do not contain the letter A, allowing repetitions?
Answer : ?? (similar to #34 but take letters only from BCDE)
- How many strings do not contain the letter A, if repetitions are not allowed?
Answer : ?? (Similar to #35, but takes letters from BCDE).
- How many strings contain letter A, allowing repetition?
Answer : #34 minus #38
- How manu strings contain letter A if repetitions are not allowed?
Answer : #35 minus #39
- #42- 52 :integers from 5 to 200 , inclusive,
- How many numbers are there ?
Answr = 200 - (5-1)
- How many are even ?
Answer : half of them
- How many are divisible by 5 ?
Answer : [200/5]
- How many contain the digit 7 ?
Answer : single-digit case : 1 ; double digit case : 10 + 9 - 1 ;
three digit case : (1XY) 10 + 10 -1
- How many do not contain 0 ?
Answer : 5 (single digit case) + 9*9 (2-digit case) + 9*9 (1XY case)
- How many greater than 101 and do not contain the digit 6 ?
Answer : 1 (case 200) + 9*9 (1XY case) - 2 (case 101 and case 100)
- How many have the digits in strictly increasing order?
Answer : 5 (signle-digit case) + (90 - 9-9) /2 (2-digit case) +
(3-digit case : 1XY ) (100 - 10)/2
- how many consist of distinct digits?
Answer: (single-digit case ) 5 +
??? (double-digit case ) + (three-digit case : 1XY)
- How many are of the form xyz, where 0 < x < y and y > z ?
Since x must be 1 , then y > 1, so for y between 2 to 9 , z must less
than y.
Answer = 2 + 3 + ... + 9 = 44
- #10 - 18 p.182 : determine how many strings can be formed by
ordering the letters ABCDE subject to the conditions given:
- Contains the substring ACE : 3!
- Contains the letters ACE together in any order : 3! * (3!)
- contains the substrings DB and AE : 3!
- contains either the substring AE or the substring EA : 2 * 4!
- A appears before D : 5!/2
- Contain neither of the substring AB, CD
5! - number of strings contains either AB or CD (or both)
- Contains neither of the substring AB, BE :
5! - { 4! + 4! - 3! }
- A appears before C and C appears before E :
5! / 3!
- Contains either the substring DB or the substring BE :
4! + 4! - 3!
- #31-36 refer to a club consisting od six distinct men and seven
distinct women :
- In how many ways can we select a committee of five persons?
Answer = C(6+7,5)
- In how many ways can we select a committee of three men and four women?
Hint : use multiplication principle
- In how many ways can we select a committee of four persons that has at least one woman?
Answer = C(7,1) * C(6+ 7-1, 3) or C(6+7,4) - C(6,4)
- In how many ways can we select a committee of four persons that has at most one man?
Answer = C(7,4) + C(6,1)*C(7,3)
- In how many ways can we select committee of four persons that has persons of both sexes?
Answer = C(13,4) - C(6,4) - C(7,4)
- In how many ways can we select a committee of four so that Mabel
and Ralph do not serve together?
Answer = C(13,4) - C(11,2)
- How many 8-bit strings contain exactly three 0's ?
Answer = 8!/(3!5!) or C(8,3)
- How many 8-bit strings contains three 0's in a row and five 1's?
Answer = 6!/5!
- #63 - 66 refer to a shipment of 50 microprocessors of which four are defective.
- In how many ways can we select a set of four microprocessors?
answer = C(50,4)
- In how many ways can we select a set of four non-defective microprocessors?
Answer = C(50-4,4)
- In how many ways can we select a set of four microprocessors containing
exactly two defective microprocessors?
Hint : How many ways to select 2 defectives and how many ways to select two non-defective?
- In how many ways to select a set of four containing at least one
defective?
Answer = C(50,4) - C(50-4,4)