Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

HOMEWORK 4

Trần Trung Kiên - 2252397

Ngày 12 tháng 5 năm 2023

SECTION 6.1
Exercise 18
How many 5-element DNA sequences
a./ end with A?
+ a DNA sequence is a sequence of letters, each of which is one of the four letters A, C,
G, T
+ If the final letter is restricted to be ended with the letter A, then we have only 1 choice
for the fifth position of the 5-element DNA sequences
+ The remaining four letters can be freely chose from A, C, G, T, which means there are
44 ways to choose
+ Therefore we have 256 possible choices
b./ start with T and end with G?
+ To start with T, we have 1 way to choose
+ To end with G, we also have 1 way to choose
+ The three other positions have 43 choices
+ Therefore we have 64 possible choices
c./ contain only A and T?
+ The types of letter to be used are only of two kind A and T and we have no other
restrictions
+ Therefore, there must be 25 = 32 ways to make such a DNA sequence.
d./ do not contain C?
+ As in part (c), there are 35 = 243 sequences that do not contain C

Exercise 19
How many 6-element RNA sequences

1
a./ do not contain U?
+ Since we want to create RNA sequences without the nucleotide U, we have 3 choices
for each of the 6 positions (A, C, or G).
+ Therefore, the number of 6-element RNA sequences without U is 36 = 729.

b./ end with GU?


+ For the sequences to be ended with GU, the last two positions of the RNA sequence
are fixed. For the remaining 4 positions, we have 3 choices each (A, C, or U).
+ Therefore, the number of 6-element RNA sequences that end with GU is 44 = 256.

c./ start with C?


+ To start with C, we have fixed the first position of the RNA sequence.
+ For the remaining 5 positions, we can freely choose 4 from the following A, U, C, G.
Therefore, the number of 6-element RNA sequences that start with C is 45 = 1024.
d./ contain only A or U?
+ The number of avaiable letters to be chose now is 2 letters for each position of the
sequences
+ As there are six positions in total, we have 26 = 64 choices

Exercise 20
How many positive integers between 5 and 31
Since both 5 and 31 are not divisible by 4 or 3, we won’t take these two numbers into account when
counting the total satisfied positive integers in question

a./ are divisible by 3? Which integers are these?


+ The positive integers between 5 and 31 that are divisible by 3 are 6, 9, 12, 15, 18, 21,
24, 27, and 30.
+ To find this, we can list out the numbers between 5 and 31 and check which ones are
divisible by 3, or we can use the formula (last multiple of 3 - first multiple of 3) / 3 + 1.
+ In this case, the last multiple of 3 that is less than or equal to 31 is 30, and the first
multiple of 3 that is greater than or equal to 5 is 6.
30−6
+ So the number of positive integers between 5 and 31 that are divisible by 3 is 3 +
1 = 9.
b./ are divisible by 4? Which integers are these?
+ The least number that is divisible by four and in the range is 8, the largest number
satisfied is 28
28−8
+ So the number of positive integers between 5 and 31 that are divisible by 4 is 4 +
1=6
+ The numbers are 8, 12, 16, 20, 24, and 28

2
c./ are divisible by 3 and by 4? Which integers are these?
+ A number is divisible by both 3 and 4 if and only if it is divisible by their least common
multiple (LCM), also note that the LCM of 3 and 4 is 12
+ Applying the previous formula we have, ⌊31/12⌋ − ⌈5/12⌉ + 1 = 2
+ These two numbers is 12 and 24

Exercise 21
How many positive integers between 50 and 100

a./ are divisible by 7? Which integers are these?


+ Applying the aforementioned formula ⌊b/n⌋ − ⌈a/n⌉ + 1 in the range (a,b) where a <
b, n is the divisor
+ ⌊100/7⌋ − ⌈50/7⌉ + 1 = 7
+ The numbers are: 56, 63, 70, 77, 84, 91, 98
b./ are divisible by 11? Which integers are these?
+ ⌊100/11⌋ − ⌈50/11⌉ + 1 = 5
+ The numbers are: 55, 66, 77, 88, 99

c./ are divisible by both 7 and 11? Which integers are these
+ A number to be divisible by both 7 and 11 must be their LCM, the Least Common
Multiple of 7 and 11 is 77
+ ⌊100/77⌋ − ⌈50/77⌉ + 1 = 1
+ The number is 77

Exercise 22
How many positive integers less than 1000

a./ are divisible by 7?


+ Applying the formula ⌊b/n⌋ − ⌈a/n⌉ + 1 in the range (a,b) where a < b, n is the divisor
+ ⌊1000/7⌋ − ⌈1/7⌉ + 1 = 142
b./ are divisible by 7 but not by 11?
+ To be divisible by 7 but not divisible by 11 is equivalent to say divisible by 7 but not
divisible by 77
+ From part (a) and part (c) we can exclude 77-divisible from 7-divisible to get the
required numbers: 142 - 12 = 130
c./ are divisible by both 7 and 11?
+ ⌊1000/77⌋ − ⌈1/77⌉ + 1 = 12

3
d./ are divisible by either 7 or 11?
+ We use the Inclusion-Exclusion rule to find out the amount of satisfying numbers: N(A
∪ B) = N(A) + N(B) - N(A ∩ B), where A, B are the sets of all positive integers less than
1000 that is divisible by 7 and 11 respectively.
+ The amount of numbers that is divisible by 7 is ⌋1000/7⌋ = 142
+ The amount of numbers that is divisible by 11 is ⌋1000/11⌋ = 90
+ The amount of numbers that is divisible by both 7 and 11 is 12 as in part (c)
+ Therefore the answer is: 142 + 90 - 12 = 220
e./ are divisible by exactly one of 7 and 11?
+ The number of numbers that is divisible by exactly one of 7 and 11 is the answer in
part (d) subtract the number of numbers which is divisible by both 7 and 11
+ The answer is 220 - 12 = 208
f./ are divisible by neither 7 nor 11?
+ If we subtract the answer to part (d) from the total number of positive integers less
than 1000, we will have the number of numbers divisible by neither of them
+ The answer is 999 − 220 = 779
g./ have distinct digits?
We divide the problem into three smaller problems, the first case is the number with 1
digit, the second case is the number with 2 digits, the last case is the number with 3 digits
+ For the first case, we have 9 ways ( 1 through 9)
+ For the second case, we have 9 ( 1 through 9) * 9 ( exclude the used digit in the first
position, add in digit 0 ) = 81 ways
+ For the third case, we have 9 ( 1 through 9) * 9 ( exclude the used digit in the first
position, add in digit 0 ) * 8 ( exclude the digit in the first and also the second postions) =
648
+ Sum up all three case, we get 9 + 81 + 648 = 738
h./ have distinct digits and are even?
+ We count 1-digit, 2-digit, and 3-digit numbers separately and proceed to count the odd
numbers with distinct digits and subtract from our answer to part (g) to get the required
answer
+ With one-digit and odd numbers, there are 5 numbers
+ With two-digit and odd numbers, there are 5 for the ones digit and 8 for the tens digit,
so there is a total of 40 numbers
+ With three-digit and odd numbers, there are 5 for the ones digit and 1*8 (the number 0
and all remaining numbers except for that 0 and the digit used in the ones digit’s position) +
8*7( the remaining numbers except for 0 and two used digits). Hence, there are 320 numbers
+ All in all, there are 738 - (5 + 40 + 320) = 373 positive integers less than 1000 that
have distinct digits and are even

4
Exercise 23
How many positive integers between 100 and 999 inclusive
a./ are divisible by 7?
+ The largest multiple of 7 that is less than or equal to 999 is 994, and the smallest
multiple of 7 that is greater than or equal to 100 is 105.
+ Therefore, the number of positive integers between 100 and 999 inclusive that are
divisible by 7 is (994 - 105) / 7 + 1 = 128.
b./ are odd?
+ The odd integers between 100 and 999 inclusive are the ones that end in 1, 3, 5, 7, or 9.
+ There are 5 choices for the last digit and 9 choices each for the first digit
+ There are 10 choice for the second digits
+ There are 9 choice for the second digits (except for 0) Therefore, the number of positive
integers between 100 and 999 inclusive that are odd is 9 * 10 * 5 = 450
c./ have the same three decimal digits?
+ There are 9 choices for the first digit
+ For the second and the third digit, each have only 1 choice, that is the same choice as
in the first digit
+ Therefore, there are 9 * 1 * 1 = 9 numbers
d./ are not divisible by 4?
+ First, we will find the number of numbers that are divisible by 4, there are (996-100)/4
+ 1 = 225 numbers
+ Then we subtract that number from the total numbers from 100 to 999, that is (999-100
+ 1) - 225 = 675
e./ are divisible by 3 or 4?
+ First, find the number of numbers that are divisible by 12 (by both 3 and 4), we have
(996-108)/12 + 1 = 75 numbers, by 4 as in part (d), and by 3: (999 - 102) /3 + 1 = 300
numbers
+ Then we can use the Inclusion-Exclusion rule, that is 300 + 225 - 75 = 450 numbers

f./ are not divisible by either 3 or 4?


+ The answer is (999 - 100 + 1) - 450 = 450 numbers
g./ are divisible by 3 but not by 4?
+ Take the number of numbers that are divisible by 4 subtract the number of numbers
that are divisible by 12, we get the number of numbers that are divisible by 3 but not by 4
+ The answer is 300 - 75 = 225 numbers
h./ are divisible by 3 and 4?
+ The answer is 75 as solved in part (d)

5
Exercise 24
How many positive integers between 1000 and 9999 inclusive
a./ are divisible by 9?
+ The least number in the range that is divisible by 9 is 1008, the largest one is 9999
+ Hence, there are (9999 - 1008)/9 + 1 = 1000 numbers
b./ are even?
+ As there are exactly 9000 numbers in the range, the first number is an odd number and
the last number in the range is an even number, we conclude that the parity of numbers in
the range is evenly distributed
+ There are 9000/2 = 4500 even numbers in the range
c./ have distinct digits?
+ There are 9 * 9 * 8 * 7 = 4536 ways for a 4-digit number between 1000 and 9999
d./ are not divisible by 3?
+ We count the number of numbers that are divisible by 3: 9999/3 - 1002/3 + 1 = 3000
+ Hence, the remaining 6000 numbers are not divisible by 3
e./ are divisible by 5 or 7?
+ To count the number of numbers that are divisible by 5 or 7, we use the Inclusion-
Exclusion rule
+ The number of numbers divisible by 7 is 9996/7 - 1001/7 + 1 = 1286
+ The number of numbers divisible by 5 is 1800 as starting with 1000,for every five
consecutive numbers we have one that is divisible by 5
+ The number of numbers divisible by both is 9975/35 - 1015/35 + 1 = 257
+ The answer is 1286 + 1800 - 257 = 2829
f./ are not divisible by either 5 or 7?
+ Since we just found that 2829 of these numbers are divisible by either 5 or 7, it follows
that the rest of them, 9000 - 2829 = 6171, are not
g./ are divisible by 5 but not by 7?
+ There are 1800 - 257 = 1543 such numbers
h./ are divisible by 5 and 7?
+ We found this as part of the solution to part (e), namely 257

Exercise 25
How many strings of three decimal digits
a./ do not contain the same digit three times?
+ The amount of number with three same repeated digits is 9
+ We can infer that the remaining numbers will not contain the same digit three times,
namely 999 - 9 = 990 numbers

6
b./ begin with an odd digit?
+ There are 5 * 10 * 10 = 500 such numbers
c./ have exactly two digits that are 4s?
+ For every places we put these two 4s in, there will always be left a empty position for
the remaining number to be placed
+ That empty place could be in the first, second or third position, so there are 9 + 9 +
9 = 27 numbers

Exercise 26
How many strings of four decimal digits
a./ do not contain the same digit twice?
+ This is equivalent to saying all numbers are distinct
+ There are 10 * 9 * 8 * 7 = 5040 strings
b./ end with an even digit?
+ There are 103 ∗ 5 = 5000 such strings
c./ have exactly three digits that are 9s?
+ There are 4 ways to choose the remaining position to put the digits that are not 9 in
+ For each position, there are 9 suitable numbers to be chose
+ There are 4 * 9 = 36 strings

Exercise 50
How many bit strings of length seven either begin with two 0s or end with three 1s?
1. There are 25 = 32 bit strings that begin with two 0’s
2. There are 24 = 160 bit strings that end with three 1’s
3. And there are 22 = 4 bit strings with the two properties
4. Applying Inclusion-Exclusion rule, we get 25 + 24 − 22 = 44 strings

Exercise 51
How many bit strings of length 10 either begin with three 0s or end with two 0s?
1. Applying Inclusion-Exclusion rule as in Excercise 50, we get 27 + 28 − 25 = 352 strings

Exercise 52
How many bit strings of length 10 contain either five consecutive 0s or five consecutive 1s?
1.
2.
3.

7
Exercise 53
How many bit strings of length eight contain either three consecutive 0s or four consecutive 1s
1.
2.
3.

Exercise 54
Every student in a discrete mathematics class is either a computer science or a mathematics major
or is a joint major in these two subjects. How many students are in the class if there are 38 computer
science majors (including joint majors), 23 mathematics majors (including joint majors), and 7 joint
majors?
1. Using the Inclusion-Exclusion rule, we can easily find out that there are 38 + 23 − 7 students
in total in the discrete mathematics class

Exercise 74
n
Use the product rule to show that there are 22 different truth tables for propositions in n variables.
1.

2.
3.

Exercise 75
1.
2.
3.

Exercise 76
1.
2.

3.

Exercise 77
1.
2.
3.

8
Exercise 78
1.
2.
3.

SECTION 6.2
Exercise 12
Let (xi , yi ), i = 1, 2, 3, 4, 5, be a set of five distinct points with integer coordinates in the xy plane.
Show that the midpoint of the line joining at least one pair of these points has integer coordinates.
1.
2.
3.

Exercise 13
Let (xi , yi , zi ), i = 1, 2, 3, 4, 5, 6, 7, 8, 9, be a set of nine distinct points with integer coordinates
in xyz space. Show that the midpoint of at least one pair of these points has integer coordinates.
1.
2.
3.

Exercise 14
How many ordered pairs of integers (a, b) are needed to guarantee that there are two ordered pairs
(a1 , b1 ) and (a2 , b2 ) such that a1 mod 5 = a2 mod 5 and b1 mod 5 = b2 mod 5?
1.
2.
3.

Exercise 15
Questions
a./ Show that if five integers are selected from the first eight positive integers, there
must be a pair of these integers with a sum equal to 9.
+ Let’s consider the pairs of integers that sum to 9: (1, 8), (2, 7), (3, 6), and (4, 5). We
have four pairs, and we need to select five integers from the first eight positive integers.
+ By the Pigeonhole Principle, we must have at least one pair of integers with a sum
equal to 9 since there are more integers selected (5) than there are pairs (4).

9
b./ Is the conclusion in part (a) true if four integers are selected rather than five?
+ No, the conclusion in part (a) is not true if four integers are selected rather than five.
For example, if we select the numbers 1, 2, 3 and 4 from the first eight positive integers, none
of these pairs add up to 9.
+ This doesn’t hold as it is not the case Pigeonhole Principle can be applied when we put
4 "pigeons" into 4 "cages".

Exercise 16
Questions
a./ Show that if seven integers are selected from the first 10 positive integers, there
must be at least two pairs of these integers with the sum 11.
+ The first 10 positive integers are 1, 2, 3, 4, 5, 6, 7, 8, 9 and 10. The pairs of these
integers that have a sum equal to 11 are (1,10), (2,9), (3,8), (4,7) and (5,6).
+ By the Pigeonhole Principle, if we select seven integers from these ten numbers and put
them together as a pair, at least two of them must belong to the same pair that adds up to 11
as there is more numbers selected (7 > 6) than there are pairs (5)
+ The Pigeonhole Principle holds with at least one pair of number satisfied when there
are 6 numbers selected, as there are 7 numbers selected, it is now the case that more than one
pair is formed (two pairs)
b./ Is the conclusion in part (a) true if six integers are selected rather than seven?
+ Again the conclusion in part (a) is not true if six integers are selected rather than seven.
For example, if we select the numbers 1, 2, 3, 4, 5 and 6 from the first ten positive integers, at
most one pair of these numbers that adds up to 11 can be made.
+ The Pigeonhole Principle only holds for the case "at least one pair that adds up to 11"
but not "two pairs"

Exercise 17
How many numbers must be selected from the set 1, 2, 3, 4, 5, 6 to guarantee that at least one pair
of these numbers add up to 7?
1. The pairs that suit the requirement are (1,6), (2,5), (3,4)
2. As we have 3 pigeon cages now (the three pairs), we have to select some amount of numbers
to guarantee that there is more pigeons than cages. In this case, selecting at least 4 is enough
as 4 > 3

Exercise 18
How many numbers must be selected from the set 1, 3, 5, 7, 9, 11, 13, 15 to guarantee that at least
one pair of these numbers add up to 16?
1. First enumerating pairs of numbers that add up to 16: (1,15), (3,13), (5,11) and (7,9).
2. By the Pigeonhole Principle, if we select at least five numbers from this set, at least two of
them must belong to the same pair that adds up to 16.

10
3. The conclusion is that at least five numbers must be selected from the original set to guarantee
that at least one pair of these numbers add up to 16 (5 > 4)

Exercise 25
Show that whenever 25 girls and 25 boys are seated around a circular table there is always a person
both of whose neighbors are boys
1. We first label the seats from 1 to 50, the 50th seat is adjacent to the 1st seat.

2. As a result, there are 25 even-numbered seats and 25 seats with odd numbers, we also have
the following: If no more than 12 boys occupied the odd-numbered seats, then at least 13 boys
would occupy the even-numbered seats, and vice versa.
3. Then without loss of generality, let’s assume that at least 13 boys occupy the 25 odd-numbered
seats. By applying the Pigeonhole Principle ,we can see that at least two of those boys must
be in consecutive odd-numbered seats as with 26 seats they can be separated thoroughly into
13 pairs of two consecutive odd-numbered seat, the situation here only give us 25, so there
must be 12 pairs and one without being in any pairs, and the person sitting between them will
have boys as both of his or her neighbors

Exercise 26
Exercise 27
Exercise 42
Exercise 43
An arm wrestler is the champion for a period of 75 hours. (Here, by an hour, we mean a period
starting from an exact hour, such as 1 P.M., until the next hour.) The arm wrestler had at least
one match an hour, but no more than 125 total matches. Show that there is a period of consecutive
hours during which the arm wrestler had exactly 24 matches.

1. Let ci be the number of matches completed at hour i


2. Then we have the following:1 ≤ c1 < c2 < ... < c75 ≤ 125
3. We add 24 to all elements to get 25 ≤ c1 + 24 < c2 + 24 < ... < c75 + 24 ≤ 149

4. In total, there are 150 numbers from the old and new inequalites: c1 , c2 ,...c75 and c1 + 24,
c2 + 24,...c75 + 24 and the 150 positive integers are all less than or equal to 149
5. As all numbers ci or ci + 24 are all distinct, by the pigeonhole principle two of these integers
are equal, hence, there must exist two numbers ci = cj + 24 for some i > j. This means that
exactly 24 matches were completed from the (j + 1)st hour to the ith hour

Exercise 44
Is the statement in Exercise 43 true if 24 is replaced by

11
a./ 2?
+ According to the solution for Exercise 43, with 24 replaced by 2 we also can infer that
149 is now replaced by 127, the Pigeonhole Principle still holds when putting 150 "pigeon"
into 127 "holes"

b./ 23?
+ According to the solution for Exercise 43, with 24 replaced by 23 we also can infer that
149 is now replaced by 148, the Pigeonhole Principle still holds when putting 150 "pigeon"
into 148 "holes"
c./ 25?
+
+
d./ 30?
+
+

Exercise 45
Show that if f is a function from S to T, where S and T are nonempty finite sets and m = ⌈|S|/|T |⌉,
then there are at least m elements of S mapped to the same value of T. That is, show that there are
distinct elements s1 , s2 ,...,sm of S such that f(s1 ) = f(s2 ) = ... = f(sm )
1. Let’s say that S has m elements, so the cardinality of S is m or |S| = a, assume that T has n
elements, then |T| = n. The statement can be rewrite as m = ⌈a/n⌉

2. Applying the Pigeonhole Principle, there exists at least one hole with more than m pigeons,
so it must contain m pigeons beforehand. In other words, there must be at least one element
of T such that there are at least m elements of S mapped to it
3. Let’s say that this element of T is t. Then there exist distinct elements s1 , s2 ,. . . ,sm of S
such that f(s1 ) = f(s2 ) = ... = f(sm ) = t. This means that there are at least m elements of S
mapped to the same value of T.

Exercise 46
There are 51 houses on a street. Each house has an address between 1000 and 1099, inclusive. Show
that at least two houses have addresses that are consecutive integers.
1. Let ai be the addresses of the houses in the increasing order: 1000 ≤ a1 < a2 < ... < a51 ≤ 1099
then 1001 ≤ a1 + 1 < a2 + 1 < ... < a51 + 1 ≤ 1100.
2. The 102 numbers a1 , a2 , .. . , a51 , a1 + 1, a2 + 1, . . . , a51 + 1 are all between 1000 and 1100,
but there are only 101 spots for them. By the pigeonhole principle, there are at least two of
them that are equal.
3. We must have ai = aj + 1 for some i and j (because there are no different houses with the
same address). In fact, we must have i = j + 1 and aj +1 = aj+1 , as required

12
Exercise 47
Exercise 48
Let n1 , n2 ,. . . , nt be positive integers. Show that if n1 + n2 + ... + nt - t + 1 objects are placed
into t boxes, then for some i, i = 1, 2, ..., t, the ith box contains at least ni objects
1. We assume that the statement " the ith box contains at least ni objects" is not True.
2. This means that for each i, the ith box contains at most ni − 1 objects. By adding up to t
boxes, we have at most (n1 − 1) + (n2 − 1) + (nt − 1) = n1 + n2 +...+ nt −t objects
3. As this contradicts the premise of having n1 + n2 + ... + nt − t + 1 objects, the assumption
must be False. This completes a proof by contradiction

Exercise 49

SECTION 6.3
Exercise 30
A professor writes 40 discrete mathematics true/false questions. Of the statements in these questions,
17 are true. If the questions can be positioned in any order, how many different answer keys are
possible?
1. The professor has 40 questions and needs to choose 17 of them to be true.
2. The number of different answer keys possible is given by the binomial coefficient C(40, 17).
This evaluates to 88,732,378,800

Exercise 31
Exercise 32
Seven women and nine men are on the faculty in the mathematics department at a school
a./ How many ways are there to select a committee of five members of the department
if at least one woman must be on the committee?
+ There are C(16, 5) ways to make a committee out of seven women and nine men with
no restrictions
+ There are C(9, 5) ways to select a committee with all men
+ Therefore, there are C(16, 5) − C(9, 5) = 4368 − 126 = 4242 ways to select a committee
that has at least one woman on it
b./ How many ways are there to select a committee of five members of the department
if at least one woman and at least one man must be on the committee?
+ There are C(16, 5) ways to make a committee out of seven women and nine men with
no restrictions
+ There are C(9, 5) ways to select a committee with all men
+ There are C(7, 5) ways to select a committee with all women
+ Therefore, there are C(16, 5) − C(9, 5) − C(7, 5) = 4368 − 126 − 21 = 4221 ways to select
a committee that has at least one woman and one man on it

13
Exercise 33
The English alphabet contains 21 consonants and 5 vowels. How many strings of six lowercase letters
of the English alphabet contain
a./ exactly one vowel?
+ Number of ways to choose one vowel: C(5, 1) = 5 ways, with each way of choosing the
vowel, there are 6 possible positions to place the chosen vowel.
+ Number of ways to place consonants in the 5 other positions: 215 ways.
+ Therefore, 5 × 6 × 215 = 122, 523, 030 strings have exactly one vowel.
b./ exactly two vowels?
+ There are C(6, 2) ways to place two vowels in two positions
+ There are 5 ∗ 5 ways to choose two vowels
+ Number of ways to place consonants in four remaining positions is 214 ways
+ Therefore, there are in total C(6, 2) ∗ 5 ∗ 5 ∗ 214 = 72930375 ways
c./ at least one vowel?
+ We can do this by excluding strings that have no vowels: 266 − 216 = 223149655 strings
d./ at least two vowels?
+ Again apply the same method used for part (c), we first calculate the number of strings
that have no vowels: 216 and have one vowel: 5 ∗ 6 ∗ 215
+ Hence, the answer is: 266 − 216 − 5 ∗ 6 ∗ 215 = 100626625 strings

Exercise 34
How many strings of six lowercase letters from the English alphabet contain
a./ the letter a?
+ We first calculate the number of strings that do not have the letter a: 256 = 244, 140, 625
ways
+ Then finding the number of strings with no restrictions or whatsoever: 266 = 308, 915, 776
ways
+ By subtracting the one without the letter a from the one with no restrictions, our
answer to the requirement is 266 − 256 = 64, 775, 151
b./ the letters a and b?
+ If our string is to contain both of these letters, then we need to calculate the total
number of strings of which contain the none of letter a and b then in association with the
Inclusion-Exclusion rule and subtract to get the number of strings that contain the letters a
and b
+ By reusing our solution to part (a), here we calculate the number of strings that contain
no letter b is: 256 strings
+ There are 246 strings that do not contain both a and b
+ Therefore, the answer is: 266 − (256 + 256 − 246 ) = 11, 737, 502 strings

14
c./ the letters a and b in consecutive positions with a preceding b, with all the letters
distinct?
+ The letter a can be chosen in 1 way and there are 5 positions to place that letter a,
simultaneously, the letter b is following right after a so there are 1 way to choose b. Hence,
there are 5 choices for two letter a and b
+ Number of ways to place letters in four remaining positions: P (24, 4) since there are 24
letters left with no repetitions being allowed
+ Therefore, there are 5 ∗ P (24, 4) = 1275120 strings
d./ the letters a and b, where a is somewhere to the left of b in the string, with all
the letters distinct?
+ First we choose the positions for a, b: C(6, 2) ways
+ All remaining positions have to be chosen distinctly, so there are: P (24, 4) ways
+ The answer is C(6, 2) ∗ P (24, 4) = 3825360 strings

Exercise 35
Suppose that a department contains 10 men and 15 women. How many ways are there to form a
committee with six members if it must have the same number of men and women?
1. This is equivalent to calculating the number of ways to form the required committee with 3
men and 3 women
2. There are C(10, 3) ways to choose 3 men
3. There are C(15, 3) ways to choose 3 women
4. Therefore, our solution to the problem is:C(10, 3) ∗ C(15, 3) = 54600 ways

Exercise 36
Suppose that a department contains 10 men and 15 women. How many ways are there to form a
committee with six members if it must have more women than men
1. There are cases which have more women than men: (4,2), (5,1) (6,0) (women,men)
2. There are C(15, 6) ways to choose the committee to be composed only of women, C(15, 5) ∗
C(10, 1) ways if there are to be five women and one man, and C(15, 4) ∗ C(10, 2) ways if there
are to be four women and two men
3. In total, there are C(15, 6) + C(15, 5) ∗ C(10, 1) + C(15, 4) ∗ C(10, 2) = 96400 ways to the
problem

Exercise 37
How many bit strings contain exactly eight 0s and 10 1s if every 0 must be immediately followed by
a 1?
1. We have a string of length 10 and by key observation, there are two types of letter to use: eight
"01"s and two "1"s.

15
2. The question can be rephrase as "There are 10 locations in the string and you’re choosing 2 of
them to be special", in other word, choose positions in which 2 1’s can be placed since other
pair of "01"s is identical ,
3. Hence, our answer is C(10, 2) = 45 strings

Exercise 38
How many bit strings contain exactly five 0s and 14 1s if every 0 must be immediately followed by
two 1s?
1. Again we can implement the same method that works for Exercise 37. we first form some
groups of 0’s and 1’s: 5 "011"s and four "1"s
2. Now the question can be turned nicely into finding positions in which 4 1’s can be place, hence,
there are C(9.4) = 126 ways to do so

Exercise 39
How many bit strings of length 10 contain at least three 1s and at least three 0s?
1. The total number of strings can be formed is 210 = 1024 strings
2. We need to exclude those strings no ones/zeros, a ones/zeros a d 2 ones/zeros from the total
strings, without loss of generality, we calculate for those with 0/1/2 zeros:
- String with no zeros: 1 way (all 0’s)
- String with 1 zero: C(10, 1) = 10 ways (choose one of the 10 positions to put the 0).
- String with 2 zeros: C(10, 2) = 45 ways (choose 2 of the 10 positions to put the 0’s).
3. Strings that have 0/1/2 ones can be found out the same way and have the same amount as
above
4. Therefore, there are 1024 − 1.2 − 10.2 − 45.2 = 912 strings

Exercise 40
How many ways are there to select 12 countries in the United Nations to serve on a council if 3 are
selected from a block of 45, 4 are selected from a block of 57, and the others are selected from the
remaining 69 countries
1. There are C(45, 3).C(57, 4).C(69, 5) = 62, 994, 022, 035, 644, 700 ways to do so

Exercise 41
How many license plates consisting of three letters followed by three digits contain no letter or digit
twice?
1. Choosing the first 3 letters with no repetitions we have: 26 ∗ 25 ∗ 24 = 15600 ways
2. Choosing the latter 3 digits with no repetitions we have: 10 ∗ 9 ∗ 8 = 720 ways
3. All in all, there are 15600 ∗ 720 = 11, 232, 000 ways

16
Exercise 42
Find the number of circular 3-permutations of 5 people
1. A circular 3-permutation of 5 people can be thought of as arranging 3 out of 5 people in a circle,
where rotations of the same arrangement are considered equivalent, for example (a, b, c, d, e) is
considered the same as (e, a, b, c, d) or (d, e, a, b, c) when taking the rotation of each arrangement
into account

2. The number of ways to choose 3 people out of 5 is given by the combination formula: C(5,3)
= 5! / (3! * 2!) = 10
3. Once we have chosen the 3 people, we can arrange them in a circle in (3)! = 6 ways, but as
rotations of the same arrangement are considered equivalent, by the Division rule, we must
divide by the number of "seats" to place these, in this case: 3

4. Therefore, the total number of circular 3-permutations of 5 people is: 10 * 6 / 2 = 20

Exercise 43
Find a formula for the number of circular r-permutations of n people

1. Let A be the set of all linear r-permutations of the n objects, B be the set of all circular
r-permutations of n objects
2. Define a function f from A to B, which form its image by joining its "head" to its "tail" in a
linear r-permutation
3. f is a function which maps r distinct elements of A to the same image in B. Therefore, A has
r times the elements of B, or |A| = r.|B|
|A|
4. By Division rule the formula for the number of circular r-permutations of n people is r =
n!
r(n−r)!

Exercise 44
Find a formula for the number of ways to seat r of n people around a circular table, where seatings
are considered the same if every person has the same two neighbors without regard to which side
these neighbors are sitting on
n!
1. The number of ways to seat r of n people in a normal cirucular table would be r(n−r)! ways
as in Exercise 43
2. However, since we do not consider the difference between right and left neighbors, we must
divide the result by 2, and since clockwise order and counterclockwise order are the same, we
do not include the extra factor of 2.
n!
3. Therefore, the formula for this case is just 2(n−2)!

17
Exercise 45
How many ways are there for a horse race with three horses to finish if ties are possible? [Note: Two
or three horses may tie.]
1. For three horses to tie, there are 1 ways
2. If there were no ties, we have: 3! = 6ways

3. For two horses:


- To tie at 1st rank, there are 3 ways: (Horse 1, Horse 2), Horse 3 or (Horse 2, Horse 3),
Horse 1 and each of three horses outside the bracket can be alternatively placed in the bracket
symbol to represent that they tie at 1st rank
- To tie at 2nd rank: 3 ways, the same method as above

4. All in all, there are 6 + 3 + 3 + 1 = 13 ways

Exercise 46
Exercise 47
Exercise 48

SECTION 6.4
Exercise 14
Give a formula for the coefficient of xk in the expansion of (x + 1/x)100 , where k is an integer
1. Applying the binomal theorem, the typical term in this expansion is 100
 100−j
j x (1/x)j , which
100 100−2j

can be rewritten as j x , as j runs from 0 to 100, k = 100 − 2j is now running from
100 down to −100
2. We solve the equation 100 − 2j = k (k is in the range 100, 98, 96, ..., 0, ..., −96, −98, −100) for
100
j to obtain the coefficient in generalized term is 100−k
2

Exercise 15
Give a formula for the coefficient of xk in the expansion of (x2 − 1/x)100 , where k is an integer
1. Applying the theorem, the typical term in this expansion is 100
 2(100−j)
j x (−1/x)j , which can
be rewritten as 100
 j 200−3j
j (−1) x , as j runs from 0 to 100, k = 200 − 3j is now running from
200 down to −100

2. We solve the equation k = 200 − 3j (k is in the range 200, 198, 196, ..., 0, ..., −96, −98, −100)
200−k 100

for j to obtain the coefficient in generalized term is (−1) 3 200−k
3

18
Exercise 16
10

The row of Pascal’s triangle containing the binomial coefficients k , 0 ≤ k ≤ 10:
1 10 45 120 210 252 210 120 45 10 1
Use Pascal’s identity to produce the row immediately following this row in Pascal’s triangle
1. Pascal’s identity is the following expression: if 0 < x ≤ n, then n+1 = nr + r−1 n
  
r and we
always have the identities n0 = nn = 1
 

2. Therefore, the next row of the Pascal’s triangle can be calculated by adding current row’s
adjacent numbers pair by pair
3. The next row is:

1 11 55 165 330 462 462 330 165 55 11 1

Exercise 17
9

What is the row of Pascal’s triangle containing the binomial coefficient k ,0<x≤9
1. Using Pascal’s identity C(n, k) + C(n, k + 1) = C(n + 1, k + 1) and the identities C(n, 0) =
C(n, n) = 1, we substitute k by 0, 1, 2, 3, ..., 9 to obtain the row
2. The row is : 1 9 36 84 126 126 84 36 9 1

Exercise 18
n n n n n
    
Show that if n is a positive integer, then 1 = 0 < 1 < ... < ⌊n/2⌋ = ⌈n/2⌉ > ... > n−1 >
n

n =1

1. This inequality states that the binomial coefficients are ordered in a specific way for a given
integer n, with the typical term nk , k runs from 0 to n:


           
n n n n n n
1= < < ... < = > ... > > =1
0 1 ⌊n/2⌋ ⌈n/2⌉ n−1 n

2. To understand this inequality, let’s break it down into different parts


3. n0 = nn = 1: This is true as there is exactly one way to choose 0 or all n elements from a set
 

of n elements.

n n
 we have C(n, r) = C(n, n − r) and as ⌊n/2⌋ + ⌈n/2⌉ = n,
4. Using Corollary 2 from Section 6.3,
it is obvious that ⌊n/2⌋ = ⌈n/2⌉ holds

5. nk < k+1 n
 
for 0 ≤ k < ⌊n/2⌋: The number of ways to choose k + 1 elements from a set of n
elements is greater than the number of ways to choose k elements.
6. This can be proven by considering the ratio:
n
 n!
k+1 (k+1)!(n−k−1)! k!(n − k)! n−k
n
 = n!
= =
k k!(n−k)!
(k + 1)!(n − k − 1)! k+1

19
7. Since k < ⌊n/2⌋, it follows that ⌊n/2⌋ ≥ k + 1 and n >= 2k + 2 and n − k ≥ k + 2 therefore
n − k > k + 1, so the ratio is greater than 1. Thus, nk < k+1
n
for 0 ≤ k < ⌊n/2⌋.

8. nk > k+1n
 
for ⌈n/2⌉ ≤ k < n: The number of ways to choose k + 1 elements from a set of n
elements is smaller than the number of ways to choose k elements.
9. Similar to step 2, we can consider the ratio:

n

k+1 n−k
n
 =
k
k+1

10. Since ⌈n/2⌉ ≤ k < n, it follows that n ≤ 2k, which  implies


 that n < 2k + 1, therefore
n − k < k + 1, so the ratio is smaller than 1. Thus, nk > k+1
n
for ⌈n/2⌉ ≤ k < n.
11. These properties together give us the desired inequality.

Exercise 19
n

Show that k ≤ 2n for all positive integers n and all integers k with 0 ≤ k ≤ n
1. By the Corollary 1 in Section 6.4, we have that
n  
X n
= 2n
k
k=0

2. Therefore, the expression implies that nk is always less that or equal to the sum of all its


possible value for k (0 ≤ k ≤ n), we have the case of equality when n = 0

Exercise 20
Answer these questions
a./ Use Exercise
 18 and Corollary 1 to show that if n is an integer greater than 1,
n
then ⌊n/2⌋ ≥ 2n /n
+ First, we can use Corollary 1 to write the following inequality:
n    
n
X n n
2 = ≤n (1)
k ⌊n/2⌋
k=0

+ Notice that in Exercise 18 nk is increasing for 0 ≤ k ≤ ⌊n/2⌋ and decreasing for



n
⌈n/2⌉ ≤ k ≤ n. Therefore, the largest term in the sum is ⌊n/2⌋ and there are n terms in
the sum since n is greater than 1, then we can conclude that the sum of n terms consisting of
n

⌊n/2⌋ must be definitely greater than sum of all binomial coefficients in Exercise 18, in other
word, the inequality (1)
+ Dividing both sides of the inequality by n, we get:

2n
 
n

n ⌊n/2⌋

20
2n

b./ Conclude from part (a) that if n is a positive integer, then n ≥ 4n /2n
n

+ From part (a), we know that if n is an integer greater than 1, then ⌊n/2⌋ ≥ 2n /n.
Letting n = 2n, we have:  
2n
≥ 22n /2n
⌊2n/2⌋
+ Simplifying the left side of the inequality and the exponent on the right side, we get:
 
2n
≥ 4n /2n
n

Exercise 21
n

Show that if n and k are integers with 1 ≤ k ≤ n, then k ≤ nk /2k−1
n n!

1. We start by using the definition of the binomial coefficient, which is k = k!(n−k)! . The
formula can be rewritten as:
 
n n · (n − 1) · (n − 2) · . . . · (n − k + 1)
=
k k · (k − 1) · (k − 2) · . . . · 2 · 1

2. We can then bound the numerator and denominator separately. For the numerator, since
1 ≤ k ≤ n, we have n − k + 1 ≥ 1 and thus:
n · (n − 1) · (n − 2) · . . . · (n − k + 1) ≤ n · n · n · . . . · n = nk

3. For the denominator, note that each term in the denominator is at least 2 when k ≥ 2. Thus,
k · (k − 1) · (k − 2) · . . . · 2 · 1 ≥ 2k−1

4. Multiplying these two inequalities together, we get:


nk
 
n n · (n − 1) · (n − 2) · . . . · (n − k + 1)
= ≤ k−1
k k · (k − 1) · (k − 2) · . . . · 2 · 1 2

5. This completes the proof.

Exercise 22
Suppose that b is an integer with b ≥ 7. Use the binomial theorem and the appropriate row of Pascal’s
4
triangle to find the base-b expansion of (11)b [that is, the fourth power of the number (11)b in base-b
notation]
1. The number 11 in base b represents the number b + 1 since 11b = 1.b1 + 1.b0
2. Then we use the Binomial Theorem to find (b + 1)4 :
4  
X 4 i
b = 1.b4 + 4.b3 + 6.b2 + 4.b1 + 1.b0 = (14641)b
i=0
i

3. When b ≥ 7, each of the coefficient of the bn is a single digit. Therefore, base-expansion of


(11b )4 is (14641)b

21
Exercise 23
n

Prove Pascal’s identity, using the formula for r

1. We will prove the identity using algebraic proof


2. If r > n then      
n n−1 r−1
=0= +
r r−1 k

3. The result is trivial.


4. We assume r ≤ n. Then:
   
n−1 r−1 (n − 1)! (n − 1)!
+ = +
r−1 r (r − 1)!(n − r)! r!(n − r − 1)!
r n−r
= (n − 1)!( + )
r!(n − r)! r!(n − r)!
n
= (n − 1)!
r!(n − r)!
n!
=
r!(n − r)!
 
n
=
r

5. This completes the proof

Exercise 24
Suppose that k and n are integers with 1 ≤ k < n. Prove the hexagon identity
       
n−1 n n+1 n−1 n n+1
=
k−1 k+1 k k k−1 k+1

, which relates terms in Pascal’s triangle that form a hexagon.


1. The left hand side of the equality can be expanded as

(n − 1)! n! (n + 1)!
· ·
(k − 1)!(n − 1 − (k − 1))! (k + 1)!(n − (k + 1))! k!(n + 1 − k)!

2. Reorder factors k! , (k + 1)! and (k − 1)! in denominators

(n − 1)! n! (n + 1)!
· ·
k!(n − 1 − (k − 1))! (k − 1)!(n − (k + 1))! k!(n + 1 − k)!

(n − 1)! n! (n + 1)!
= · ·
k!(n − k)! (k − 1)!((n − 1) − k)! k!(n − (k − 1))!

22
3. Reorder factors (n − k)! , ((n − 1) − k)! and (n − (k − 1))! in denominators

(n − 1)! n! (n + 1)!
· ·
k!((n − 1) − k) (k − 1)!(n − (k − 1))! k!(n − k)!

(n − 1)! n! (n + 1)!
= · ·
k!((n − 1) − k) (k − 1)!(n − (k − 1))! k!((n + 1) − (k + 1)!
   
n−1 n n+1
=
k k−1 k+1

4. Therefore, the proof is completed

Exercise 25
n n−1
 
Prove that if n and k are integers with 1 ≤ k ≤ n, then k k =n k−1

a./ using a combinatorial proof. [Hint: Show that the two sides of the identity count
the number of ways to select a subset with k elements from a set with n elements
and then an element of this subset.]
+
+
n

b./ using an algebraic proof based on the formula for r given in Theorem 2 in Section
6.3.
+
+

23
Exercise 26
Exercise 27
Exercise 28
Exercise 29
Exercise 30
Exercise 31
Exercise 32
Exercise 33
Exercise 34
Exercise 35
Exercise 36
Exercise 37
Exercise 38
Exercise 39
Exercise 40
Exercise 41
Exercise 42
Exercise 43

SECTION 6.5
Exercise 14
Exercise 15
Exercise 16
Exercise 17
Exercise 18
Exercise 19
Exercise 20
Exercise 21
Exercise 22
Exercise 47
Exercise 48 24

Exercise 49
Exercise 50
Exercise 51
Exercise 52
Exercise 53
Exercise 54

You might also like