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 binary strings of length ten. Therefore the number of binary strings of length ten with at least one 1 is .
(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?