Docsity

Problems with Solutions - Discrete Mathematical Structures | MATH 2513, Assignments of Mathematics

Toggle sidebar
bg1
Class Problem
Math 2513
Friday, July 8
Problem. How many bit strings of length 10 are there that satisfy:
(a) the strings start with 100 and end with 11?
(b) the strings start with 100 or end with 11?
(c) the strings start with 100 or start with 11?
(d) the strings do not start with 100 or end with 11?
ANSWERS:
(a) There are 25= 32 bit strings of length 10 that start with 100 and end with 11. (Take any bit
string of length 5, of which there are 25, and add 100 as a prefix and 11 as a suffix.)
(b) There are 27+ 28−25= 352 bit strings of length 10 that start with 100 or end with 11. Here
we use the Principle of Inclusion/Exclusion: Let Abe the set of all bit strings of length 10 that start
with 100 or end with 11, and let
A1={bit strings of length 10 starting with 100}
A2={bit strings of length 10 ending with 11}
Then A=A1∪A2and
|A|=|A1∪A2|=|A1|+|A2|−|A1∩A2|= 27+ 28−25
where the cardinality of A1∩A2was determined in (a).
(c) There are 27+ 28= 384 bit strings of length 10 that start with 100 or start with 11. In this
problem the sum principle applies, if A1is defined as in (b) and A3is the set of bit strings of length
10 starting with 11 then A1∩A3=∅. The problem asks to determine the number of bit strings in
A1∪A3. So
|A1∪A3|=|A1|+|A3|= 27+ 28.
(d) By the sum principle, the total number 210 of bit strings of length 10 equals the number 27+28−25
(from (b)) of bit strings of length 10 that start with 100 or end with 11 plus the number Nof stringgs
of length 10 that do not start with 100 or end with 11. Thus
N= 210 −(27+ 28−25) = 672.

Partial preview of the text

Download Problems with Solutions - Discrete Mathematical Structures | MATH 2513 and more Assignments Mathematics in PDF only on Docsity!

Class Problem

Math 2513

Friday, July 8

Problem. How many bit strings of length 10 are there that satisfy: (a) the strings start with 100 and end with 11? (b) the strings start with 100 or end with 11? (c) the strings start with 100 or start with 11? (d) the strings do not start with 100 or end with 11?

ANSWERS:

(a) There are 2^5 = 32 bit strings of length 10 that start with 100 and end with 11. (Take any bit string of length 5, of which there are 2^5 , and add 100 as a prefix and 11 as a suffix.)

(b) There are 2^7 + 2^8 − 25 = 352 bit strings of length 10 that start with 100 or end with 11. Here we use the Principle of Inclusion/Exclusion: Let A be the set of all bit strings of length 10 that start with 100 or end with 11, and let

A 1 = {bit strings of length 10 starting with 100} A 2 = {bit strings of length 10 ending with 11}

Then A = A 1 ∪ A 2 and

|A| = |A 1 ∪ A 2 | = |A 1 | + |A 2 | − |A 1 ∩ A 2 | = 2^7 + 2^8 − 25

where the cardinality of A 1 ∩ A 2 was determined in (a).

(c) There are 2^7 + 2^8 = 384 bit strings of length 10 that start with 100 or start with 11. In this problem the sum principle applies, if A 1 is defined as in (b) and A 3 is the set of bit strings of length 10 starting with 11 then A 1 ∩ A 3 = ∅. The problem asks to determine the number of bit strings in A 1 ∪ A 3. So |A 1 ∪ A 3 | = |A 1 | + |A 3 | = 2^7 + 2^8.

(d) By the sum principle, the total number 2^10 of bit strings of length 10 equals the number 2^7 +2^8 − 25 (from (b)) of bit strings of length 10 that start with 100 or end with 11 plus the number N of stringgs of length 10 that do not start with 100 or end with 11. Thus

N = 2^10 − (2^7 + 2^8 − 25 ) = 672.