Question

# Exercise 1: Counting binary strings. Count the number of binary strings of length 10 subject to each of the following restrictions. There is only one binary string of length ten with no 1's: 00000000000. There are 2^{10} binary strings of length ten. How many integers in the range 1 through 140 are integer multiples of 2, 5, or 7?

Factors and multiples
Exercise 1: Counting binary strings.
Count the number of binary strings of length 10 subject to each of the following restrictions.
There is only one binary string of length ten with no 1's: 00000000000. There are $$\displaystyle{2}^{{{10}}}$$ binary strings of length ten. Therefore the number of binary strings of length ten with at least one 1 is $$\displaystyle{2}^{{{10}}}-{1}$$.
(b)
The string has at least one 1 and at least one 0.
(c)
The string contains exactly five 1's or it begins with a 0.
Exercise 2: Counting integer multiples.
(b)
How many integers in the range 1 through 140 are integer multiples of 2, 5, or 7?

2021-07-31
Step 1
The string has at least one 1 and at least one 0.
This removes the possibility of all one and all zeros
Thus number of binary strings is $$\displaystyle{2}^{{{10}}}-{2}$$
Step 2
The string contains exactly five 1's or it begins with a 0.
First digit is fixed as zero
In remaining 9 places Lets choose 5 places and place 1s there
Number of ways are $$\displaystyle{{C}_{{5}}^{{9}}}$$
126
Step 3
How many integers in the range 1 through 140 are integer multiples of 2, 5, or 7
There are 70 multiples of 2
23 multiples of 3 left
we have 9 multiples of 5 that have not yet been included.
Total is 102