Docsity

Solved Problems on Discrete Mathematical Structures - Old Assignment | MATH 2513, Assignments of Mathematics

Toggle sidebar
bg1
Class Problem
Math 2513
Wednesday, July 13
Problem. (a) How many bit strings of length 7 contain a substring of the form 100?
(b) How many bit strings of length 7 contain a substring of the form 101?
COMMENT: There are only 27= 128 bit strings of length 7, so one way to approach these problems
would be to list all 128 of these and then cross out those that don’t satisfy (a) or (b). Please don’t
solve the problem this way.
ANSWERS:
(a) The number of bit strings of length 7 that contain a substring of the form 100 is 74: Let Abe the
set of all such bit strings of length 7. Then
A=A1∪A2∪A3∪A4∪A5
where Aiis the set of all bit strings of length 7 which have the first occurence of 100 starting in
position i. Then |A1|= 24,|A2|= 24,|A3|= 24,|A4|= 24−2 and |A5|= 24−4. Since the five
subsets are pairwise disjoint, the sum principle gives that
|A|= 24+ 24+ 24+ (24−2) + (24−4) = 74.
(b) The number of bit strings of length 7 that contain a substring of the form 101 is 63. Here we can
reduce the problem to computing the sums of the cardinalities of five subsets similar to (a), and the
respective orders of these subsets are 24, 24, 24−4, 24−6 and 24−7.

Partial preview of the text

Download Solved Problems on Discrete Mathematical Structures - Old Assignment | MATH 2513 and more Assignments Mathematics in PDF only on Docsity!

Class Problem

Math 2513

Wednesday, July 13

Problem. (a) How many bit strings of length 7 contain a substring of the form 100? (b) How many bit strings of length 7 contain a substring of the form 101?

COMMENT: There are only 2^7 = 128 bit strings of length 7, so one way to approach these problems would be to list all 128 of these and then cross out those that don’t satisfy (a) or (b). Please don’t solve the problem this way.

ANSWERS:

(a) The number of bit strings of length 7 that contain a substring of the form 100 is 74: Let A be the set of all such bit strings of length 7. Then

A = A 1 ∪ A 2 ∪ A 3 ∪ A 4 ∪ A 5

where Ai is the set of all bit strings of length 7 which have the first occurence of 100 starting in position i. Then |A 1 | = 2^4 , |A 2 | = 2^4 , |A 3 | = 2^4 , |A 4 | = 2^4 − 2 and |A 5 | = 2^4 − 4. Since the five subsets are pairwise disjoint, the sum principle gives that

|A| = 2^4 + 2^4 + 2^4 + (2^4 − 2) + (2^4 − 4) = 74.

(b) The number of bit strings of length 7 that contain a substring of the form 101 is 63. Here we can reduce the problem to computing the sums of the cardinalities of five subsets similar to (a), and the respective orders of these subsets are 2^4 , 2^4 , 2^4 − 4, 2^4 − 6 and 2^4 − 7.