Solutions for Assignment 2, 2015

advertisement
SWFR ENG 2DM3 / COMP SCI 2DM3
Discrete Mathematics with Applications I
Solution Set 2
8 Questions
1. (a) What is the greatest common divisor of 24 and 36?
(b) What is the least common multiple of 24 and 36?
(c) For (c) and (d), you may present your solution in factored form. What is the greatest common
divisor of 27 · 54 · 711 and 24 · 34 · 7?
(d) What is the least common multiple of 27 · 54 · 711 and 24 · 34 · 7?
Solution: For (a) and (b), it may be helpful to begin by prime factoring 24 and 36.
24 = 23 · 31
36 = 22 · 32
(a) To find the gcd(24, 36), we take the lesser of the two exponents to get gcd(24, 36) = 22 · 31 = 12.
(b) To find the lcm(24, 36), we take the greater of the two exponents to get lcm(24, 36) = 23 · 32 = 72.
(c) For (c) and (d), we are given the prime factorizations:
27 · 30 · 54 · 711
24 · 34 · 50 · 71
To find the greatest common divisor, we take the lesser of the exponents to get 24 ·30 ·50 ·71 = 24 ·7.
(d) To find the least common multiple, we take the greater of the exponents to get 27 · 34 · 54 · 711 .
2. (Page 330, Exercise 16). Prove by mathematical induction that for every positive integer n,
1 · 2 · 3 + 2 · 3 · 4 + . . . + n(n + 1)(n + 2) =
n(n + 1)(n + 2)(n + 3)
4
Solution:
Basis step:
For n = 1, the expression is:
(1)((1) + 1)((1) + 2)((1) + 3)
4
1·2·3·4
⇔1·2·3=
4
1·2·3=
which is clearly true.
Inductive step:
As our induction hypothesis, we assume that the statement holds for n := k for positive integer k,
1 · 2 · 3 + 2 · 3 · 4 + . . . + k(k + 1)(k + 2) =
1
k(k + 1)(k + 2)(k + 3)
4
We wish to show that the statement holds for n := k + 1. We start with the left side of what we are
trying to show:
1 · 2 · 3+2 · 3 · 4 + . . . + k(k + 1)(k + 2) + (k + 1)(k + 2)(k + 3)
= 1 · 2 · 3 + 2 · 3 · 4 + . . . + k(k + 1)(k + 2) + (k + 1)(k + 2)(k + 3)
k(k + 1)(k + 2)(k + 3)
=
+ (k + 1)(k + 2)(k + 3) From the induction hypothesis
4
k(k + 1)(k + 2)(k + 3) + 4(k + 1)(k + 2)(k + 3)
=
4
(k + 1)(k + 2)(k + 3)(k + 4)
=
4
as required. This completes our induction.
3. Use mathematical induction to prove that 8 divides 32n+2 + 7 for every positive integer n.
Solution:
Basis step: For n := 1, the expression is:
32(1)+2 + 7 = 34 + 7
= 81 + 7
= 88
which is a multiple of 8.
Inductive step:
As our induction hypothesis, we assume that for integer k, 32k+2 + 7 is a multiple of 8.
Then we wish to show that 32(k+1)+2 + 7 is a multiple of 8.
32(k+1)+2 + 7 = 32k+2+2 + 7
= 32k+2 · 32 + 7
= 9 · 32k+2 + 7
= (8 + 1) · 32k+2 + 7
= 8 · 32k+2 + 32k+2 + 7
= 8 · 32k+2 + 32k+2 + 7
8 · 32k+2 is clearly a multiple of 8. By our induction hypothesis, 32k+2 + 7 is also a multiple of 8.
Since we have a sum of two multiples of 8, the expression must be a multiple of 8. This completes our
induction.
4. (a) List all of the ways to rearrange the characters in the word READ. How many rearrangements
are there?
(b) The word CHINCHERINCHEE is the only known English word that has one letter that occurs
once, two letters that occur twice, three letters that occur three times. How many was are there
to rearrange the letters in this word?
Solution:
(a) READ, REDA, RAED, RADE, RDEA, RDAE, ERAD, ERDA, EARD, EADR, EDRA, EDAR,
ARED, ARDE, AERD, AEDR, ADRE, ADER, DREA, DRAE, DERA, DEAR, DARE, DAER.
There are 4! = 24 rearrangements.
2
(b) The word CHINCHERINCHEE has fourteen total characters: one R, two I’s, two N’s, three C’s,
three H’s, and three E’s. The total number of ways to rearrange the letters is:
14!
= 100900800.
1!2!2!3!3!3!
5. (Page 296, Exercise 14) How many strings are there of four lowercase letters that have the letter x in
them? (The English alphabet has 26 unique letters).
Solution:
It is easier to count the total number of four-letter strings, and subtract the number of four-letter
strings that do not contain the letter x.
The number of four-letter strings is 264 = 456976.
The number of four-letter strings not containing the letter x is 254 = 390625.
The number of four-letter strings that have at least one x in them is 456976 − 390625 = 66351.
6. (Page 397, Exercise 46). In how many ways can a photographer at a wedding arrange 6 people in a
row from a group of 10 people, where the bride and the groom are among these 10 people, if
(a) the bride must be in the picture?
(b) both the bride and groom must be in the picture?
(c) exactly one of the bride and the groom is in the picture?
Solution: The solution to these questions consists of counting two components: the number of ways
to select the six people, and the number of ways to rearrange their order in the row.
(a) Since the bride must
be in the picture, an additional 5 people must be selected from the remaining
9. There are 95 = 126 ways to select 5 people, and 6! = 720 ways to rearrange the six people.
Therefore, the total number of arrangements is 95 × 6! = 90720.
(b) Since the bride and groom
must be in the picture, an additional 4 must be selected from the
remaining 8. There are 84 = 70 ways to select 4 people, and 6! = 720 ways to rearrange the six
people. Therefore, the total number of arrangments is 84 × 6! = 50400.
(c) There are three decisions we need to make: which of the bridge/groom to select, which 5 of the
remaining 8 people to select, and
how to rearrange the order of the six people. There are 2 ways
to select the bridge/groom, 85 = 56 ways to select the five additional people, and 6! = 720 ways
to rearrange the six people. Therefore, the total number of arrangements is 2 × 85 × 6! = 80640
arrangements.
7. A company’s board of directors has 12 members. The board must select an executive committee of
any nonzero size, consisting of a president and treasurer (these titles may or may not be conferred to
the same person). How many possible ways are there to do this?
Solution:
There are two ways to approach this counting problem, one of which requires much more computation
than the other. We can count by selecting the committee first and assigning the president/treasurer
roles within the committee; or we can count by first assigning the president/treasurer roles, then
selecting the rest of the committee.
Committee first:
For a committee of size k, there are nk possible ways to select committee members; within a committee,
there are k possible choices for the president role, and k choices for the treasurer role (since the president
and treasurer roles may be conferred to the same person). The total number of possible committees is
therefore
3
n X
n
k=1
k
k2
We could compute the total number by the summation
12
12
12
(1)2 +
(2)2 + . . . +
(12)2
1
2
12
However, there is a better way to do this.
President/Treasurer first:
We split this into two cases: the case where the president/treasurer role is given to the same person, and
the case where the president and treasurer are two different people. If they are the same person, then
there are n choices of the president/treasurer, and 2n−1 possible choices for the rest of the committee
(since this is the number of (possibly empty) subsets of the remaining n − 1 people). So in this case,
there are n2n−1 possibilities.
If the president and treasurer are two different people, then there are n possible choices for the president,
n − 1 choices for the treasurer, and 2n−2 possible choices for the rest of the committee. So in this case,
there are n(n − 1)2n−2 possibilities.
Adding up the two cases, the total number of possibilities is
n2n−1 + n(n − 1)2n−2
Substituting n = 12, we get
(12)2(12)−1 + (12)((12) − 1)2(12)−2 = 12 × 211 + 12 × 11 × 210
= 159744
There are 159744 possibilities.
8. A Pythagorean triple (a, b, c) satisfies the Pythagoreran Theorem, in which a2 + b2 = c2 . A primitive
Pythagoren triple is one in which a, b, and c are pairwise coprime (that is, each pair shares no common
factors besides 1). There is a theorem due to Euclid that (a, b, c) is a primitive Pythagorean triple if
and only if it can be expressed by a unique pair of positive integers m and n:
a = m2 − n2
b = 2mn
c = m2 + n2
such that m > n, m and n are coprime, and one of m and n is even.
(a) Determine the values of m and n that correspond to the primitive Pythagorean triples (3, 4, 5),
(5, 12, 13), (15, 8, 17), (7, 24, 25), (21, 20, 29).
(b) Prove that for any primitive Pythagorean triple (a, b, c), exactly one of a and b must be a multiple
of 3, and c cannot be a mulitple of 3.
(c) Prove that for any primitive Pythagorean triple (a, b, c), exactly one of a, b, and c must be a
multiple of 5.
Solution:
4
(a) See the below
m n a
2 1
3
3 2
5
4 1 15
4 3
7
5 4 21
table.
b
c
4
5
12 13
8 17
24 25
20 29
(b) First, we observe that for any integer r, if r is a multiple of 3, r2 is a multiple of 3. If r is not a
multiple of 3, then r2 is equivalent to 1 modulo 3. This can be seen by considering the possibilities
r = 3k +1 or r = 3k +2 for some integer k, in which case r2 = 9k 2 +6k +1 or r2 = 9k 2 +12k +3+1
respectively. In either case, r2 is one greater than a multiple of 3.
Since m and n are coprime, at most one can be a multiple of 3. If m or n is a multiple of 3, then
b will be a multiple of 3, and a and c will not. If both m and n are not multiples of 3, then a will
be a multiple of 3, and b and c will not.
(c) First, we consider the value of perfect squares modulo 5. We can express any integer r in terms
of some integer k depending on its equivalence modulo 5:
r modulo 5
0
1
2
3
4
Expression
5k
5k + 1
5k + 2
5k + 3
5k + 4
r2
25k 2
2
25k + 10k + 1
25k 2 + 20k + 4
25k 2 + 30k + 5 + 4
25k 2 + 40k + 15 + 1
r2 modulo 5
0
1
4
4
1
Since m and n are coprime, at most one can be a multiple of 5. If m or n is a multiple of 5, then
b will be a multiple of 5 and a and c will not. If m and n are both not multiples of 5, then b is
not a multiple of 5. We have four possible cases for m2 and n2 modulo 5:
m2 modulo 5 n2 modulo 5 a modulo 5 c modulo 5
1
1
0
2
1
4
2
0
4
1
3
0
4
4
0
3
In all four cases, exactly one of a2 or c2 is a multiple of 5, which implies that exactly one of
a or c is a multiple of 5.
5
Download