Exercise Solutions - Florida State Universitywooland/mad2104/Answers.pdf · 5 (b) If p is false and...

23
Exercise Solutions Chapter 1 Introduction to Sets and Functions: 1.3.1: Which of the fol- lowing sets are equal to the set of all integers that are multiples of 5. There may be more than one or none. (1) {5n|n 2 R} (2) {5n|n 2 Z} (3) {n 2 Z|n =5k and k 2 Z} (4) {n 2 Z|n =5k and n 2 Z} (5) {-5, 0, 5, 10} 2 and 3 only 1.5.1: Let A = {1, 2, {1}, {1, 2}}. True or false? (a) {1} 2 A (b) {1} A (c) 2 2 A (d) 2 A (e) {2} 2 A (f) {2} A a-T, b-T, c- T, d- F, e- F, f-T 1.6.1: Let A = {1, 2, {1}, {1, 2}}, B = {1, {2}}, and C = {1, 2, 2, 2}. Find the cardinality of each set. |A| =4, |B| =2, |C | =2 1.8.1: Let A = {1, 2, {1}, {1, 2}} and B = {1, {2}}. True or false: (a) 2 2 A \ B (b) 2 2 A [ B (c) 2 2 A - B (d) {2} 2 A \ B (e) {2} 2 A [ B (f) {2} 2 A - B a - F, b-T, c-T, d-F, e-T, f-F 1.9.1: Let A = {a, b, c, d, e} and let B = {1, 2}. Find (1) B A. (2) |B A| (3) Is (a, 2) 2 B A? (4) Is (2,a) 2 B A? (5) Is 2a 2 B A? (1) BA = {(1,a), (1,b), (1,c), (1,d), (1,e), (2,a), (2,b), (2,c), (2,d), (2,e)} (2) |B A| = 10, (3) No, (4) Yes, (5) No 2.3.1: Suppose f : R ! R is defined by f (x)= |x|. Find (1) the range of f . (2) the image of Z, the set of integers. (3) f -1 (). (4) f -1 (-1). (5) f -1 (Q), where Q is the set of rational numbers. (1)[0, 1), (2) N, (3), {-, }, (4) ;, (5) Q 2.4.1: Suppose x is a real number. Do you see any relationships among the values b-xc, -bxc, d-xe, and -dxe? b-xc = -dxe and -bxc = d-xe 2.4.2: Suppose f : R ! R is defined by f (x)= bxc. Find (1) the range of f . (2) the image of Z, the set of integers. (3) f -1 (). 1

Transcript of Exercise Solutions - Florida State Universitywooland/mad2104/Answers.pdf · 5 (b) If p is false and...

Page 1: Exercise Solutions - Florida State Universitywooland/mad2104/Answers.pdf · 5 (b) If p is false and q is true. Then we still have (p q)istrue so ¬(pq)isfalse,againcontradictingourassumptionthat

Exercise Solutions

Chapter 1 Introduction to Sets and Functions: 1.3.1: Which of the fol-lowing sets are equal to the set of all integers that are multiples of 5.There may be more than one or none.(1) {5n|n 2 R}(2) {5n|n 2 Z}(3) {n 2 Z|n = 5k and k 2 Z}(4) {n 2 Z|n = 5k and n 2 Z}(5) {�5, 0, 5, 10}

2 and 3 only1.5.1: Let A = {1, 2, {1}, {1, 2}}. True or false?

(a) {1} 2 A (b) {1} ✓ A (c) 2 2 A(d) 2 ✓ A (e) {2} 2 A (f) {2} ✓ Aa-T, b-T, c- T, d- F, e- F, f-T

1.6.1: Let A = {1, 2, {1}, {1, 2}}, B = {1, {2}}, and C = {1, 2, 2, 2}. Findthe cardinality of each set.|A| = 4, |B| = 2, |C| = 2

1.8.1: Let A = {1, 2, {1}, {1, 2}} and B = {1, {2}}. True or false:(a) 2 2 A \B (b) 2 2 A [B (c) 2 2 A� B(d) {2} 2 A \ B (e) {2} 2 A [ B (f) {2} 2 A� Ba - F, b-T, c-T, d-F, e-T, f-F

1.9.1: Let A = {a, b, c, d, e} and let B = {1, 2}. Find(1) B ⇥ A.(2) |B ⇥ A|(3) Is (a, 2) 2 B ⇥ A?(4) Is (2, a) 2 B ⇥ A?(5) Is 2a 2 B ⇥ A?

(1)B⇥A = {(1, a), (1, b), (1, c), (1, d), (1, e), (2, a), (2, b), (2, c), (2, d), (2, e)}(2) |B ⇥ A| = 10, (3) No, (4) Yes, (5) No

2.3.1: Suppose f : R ! R is defined by f(x) = |x|. Find(1) the range of f .(2) the image of Z, the set of integers.(3) f�1(⇡).(4) f�1(�1).(5) f�1(Q), where Q is the set of rational numbers.

(1)[0,1), (2) N, (3), {�⇡, ⇡}, (4) ;, (5) Q2.4.1: Suppose x is a real number. Do you see any relationships amongthe values b�xc, �bxc, d�xe, and �dxe?b�xc = �dxe and �bxc = d�xe

2.4.2: Suppose f : R ! R is defined by f(x) = bxc. Find(1) the range of f .(2) the image of Z, the set of integers.(3) f�1(⇡).

1

Page 2: Exercise Solutions - Florida State Universitywooland/mad2104/Answers.pdf · 5 (b) If p is false and q is true. Then we still have (p q)istrue so ¬(pq)isfalse,againcontradictingourassumptionthat

2

(4) f�1(�1.5).(5) f�1(N), where N is the set of natural numbers.(6) f�1([2.5, 5.5]).(7) f([2.5, 5.5]).(8) f(f�1([2.5, 5.5])).(9) f�1(f([2.5, 5.5])).

(1) Z, (2) Z, (3) ;, (4) ;, (5) [0,1), (6) [3, 6), (7) {2, 3, 4, 5}, (8) {3, 4, 5},(9) [2, 6)

2.4.3: Let g : R ! [0,1) be defined by g(x) = dx2e. Let A = {x 2[0,1)|3.2 < x < 8.9}.(1) domain(2) codomain(3) range(4) Find g(A).(5) Find g�1(A).(1) R(2) [0,1)(3) N(4) g(A) = {11, 12, 13, . . . , 80}(5) g�1(A) = [�

p8,�

p3) [ (

p3,p8]

2.5.1: Graph the function�Z

given in the previous example in the plane.The graph should have points at (n, 1) for each integer n and the restof the graph is a horizontal line on the x-axis with holes at the integers.

2.5.2: Find(1) �Z(0)(2) ��1

Z (0)(3) �Z([3, 5])(4) ��1

Z ([3, 5])(1) 1, (2) R� Z, (3) {0, 1}, (4) ;

2.5.3: Let E = {4n|n 2 N} and consider the characteristic function �E

:Z ! Z. What is the . . .(1) domain(2) codomain(3) range(4) �

E

({2n|n 2 N})(5) ��1

E

({2n|n 2 N})(1) Z(2) Z(3) {0, 1}(4) {0, 1}(5) Z� E

Page 3: Exercise Solutions - Florida State Universitywooland/mad2104/Answers.pdf · 5 (b) If p is false and q is true. Then we still have (p q)istrue so ¬(pq)isfalse,againcontradictingourassumptionthat

3

Chapter 2 Logic: :1.8.1: Circle all of the following statements that are equivalent to “If x is

even, then y is odd”? There may be more than one or none.(1) y is odd only if x is even.(2) x is even is su�cient for y to be odd.(3) x is even is necessary for y to be odd.(4) If x is odd, then y is even.(5) x is even and y is even.(6) x is odd or y is odd.

(2) and (6) are the only equivalent statements.1.10.1: p is the statement “I will prove this by cases”, q is the statement“There are more than 500 cases,” and r is the statement “I can findanother way.”(1) State (¬r _ ¬q) ! p in simple English.(2) State the converse of the statement in part (a) in simple English.(3) State the inverse of the statement in part (a) in simple English.(4) State the contrapositive of the statement in part (a) in simple

English.(1) If I cannot find another way or there are not more than 500 cases,

then I will prove this by cases.(2) If I prove this by cases, then I could not find another way or there

are not more than 500 cases.(3) If I can find another way and there are more than 500 cases, then

I will not prove this by cases.(4) If I cannot prove this by cases, then I can find another way and

there are more than 500 cases.1.13.1: Howmany rows should a truth table have for a statement involvingn di↵erent propositions?2n

1.13.2: Find another way to express Example 1.13.2 Part b “It is not thecase that: the apple is delicious and I ate the apple.” without using thephrase “It is not the case.”The apple is not delicious or I did not eat the apple.

1.13.3: Insert a comma into the sentence “If the fish is cooked then dinneris ready and I am hungry.” to make the sentence mean(a) f ! (r ^ h)(b) (f ! r) ^ h

a) If the fish is cooked, then dinner is ready and I am hungry.b) If the fish is cooked then dinner is ready, and I am hungry

1.13.4: Build one truth table for f ! (r ^ h) and (f ! r) ^ h.

Page 4: Exercise Solutions - Florida State Universitywooland/mad2104/Answers.pdf · 5 (b) If p is false and q is true. Then we still have (p q)istrue so ¬(pq)isfalse,againcontradictingourassumptionthat

4

f r h r ^ h f ! r f ! (r ^ h) (f ! r) ^ hT T T T T T TT T F F T F FT F T F F F FT F F F F F FF T T T T T TF T F F T T FF F T F T T TF F F F T T F

2.1.1: Build a truth table to verify that the proposition (p $ q)^ (¬p^q)is a contradiction.p q p $ q ¬p ¬p ^ q (p $ q) ^ (¬p ^ q)T T T F F FT F F F F FF T F T T FF F T T F F

2.3.1: Use a truth table to show that the propositions p $ q and ¬(p� q)are equivalent.p q p $ q p� q ¬(p� q)T T T F TT F F T FF T F T FF F T F T

2.3.2: Use the method of Solution 2 in Example ?? to show that thepropositions p $ q and ¬(p� q) are equivalent.

Proof. We will consider the possible cases where they are not equiv-alent.

(1) Suppose p $ q is true while ¬(p � q) is false. For p $ q to betrue, p and q have to both be true or both be false.

(a) If both are true, then (p� q) will be false, and ¬(p� q) willbe true, contradicting our assumption that ¬(p � q) is false.Thus this case is not possible.

(b) If both are false, then (p� q) will be false, and ¬(p� q) willbe true, again contradicting our assumption that ¬(p� q) isfalse. Thus this case is not possible.

(2) Suppose p $ q is false while ¬(p � q) is true. Then for p $ q tobe false, p and q have di↵erent truth values.

(a) Assume p is true and q is false. Then (p�q) is true so ¬(p�q)is false, contradicting our assumption that ¬(p � q) is true.Thus this case is not possible.

Page 5: Exercise Solutions - Florida State Universitywooland/mad2104/Answers.pdf · 5 (b) If p is false and q is true. Then we still have (p q)istrue so ¬(pq)isfalse,againcontradictingourassumptionthat

5

(b) If p is false and q is true. Then we still have (p � q) is trueso ¬(p� q) is false, again contradicting our assumption that¬(p� q) is true. Thus this case is not possible.

We have shown that it is not possible for p $ q and ¬(p � q) tohave di↵erent truth values and so they are equivalent.

⇤2.4.1: Use the propositional equivalences in the list of important logical

equivalences above to prove [(p ! q) ^ ¬q] ! ¬p is a tautology.

Proof. [(p ! q) ^ ¬q] ! ¬p, ¬[(¬p _ q) ^ ¬q] _ ¬p Implication Law (2 times), [¬(¬p _ q) _ ¬¬q] _ ¬p DeMorgan’s Law, [(¬¬p ^ ¬q) _ ¬¬q] _ ¬p DeMorgan’s Law, [(p ^ ¬q) _ q] _ ¬p Double Negation Law (2 times), [q _ (p ^ ¬q)] _ ¬p Commutative Law, [(q _ p) ^ (q _ ¬q)] _ ¬p Distributive Law, [(q _ p) ^ T ] _ ¬p Tautology, (q _ p) _ ¬p Identity, q _ (p _ ¬p) Associative Law, q _ T Tautology, T Domination ⇤

2.4.2: Use truth tables to verify De Morgan’s Laws.p q p ^ q p _ q ¬(p ^ q) ¬(p _ q) ¬p ¬q ¬p _ ¬q ¬p ^ ¬qT T T T F F F F F FT F F T T F F T T FF T F T T F T F T FF F F F T T T T T T

2.5.1: Circle all of the following that is equivalent to ¬(p ! r) ! ¬q?There may be more than one or none.(1) ¬(p ! r) _ q(2) (p ^ ¬r) _ q(3) (¬p ! ¬r) _ q(4) q ! (p ! r)(5) ¬q ! (¬p ! ¬r)(6) ¬q ! (¬p _ r)(7) ¬q ! ¬(p ! r)

4 only. The statement is equivalent to (p ^ ¬r) ! ¬q and (p ! r) _ ¬qas well.

2.5.2: Which of the following is the negation of the statement “If you go tothe beach this weekend, then you should bring your books and study”?(1) If you do not go to the beach this weekend, then you should not

bring your books and you should not study.

Page 6: Exercise Solutions - Florida State Universitywooland/mad2104/Answers.pdf · 5 (b) If p is false and q is true. Then we still have (p q)istrue so ¬(pq)isfalse,againcontradictingourassumptionthat

6

(2) If you do not go to the beach this weekend, then you should notbring your books or you should not study.

(3) If you do not go to the beach this weekend, then you should bringyour books and study.

(4) You will not go to the beach this weekend, and you should notbring your books and you should not study.

(5) You will not go to the beach this weekend, and you should notbring your books or you should not study.

(6) You will go to the beach this weekend, and you should not bringyour books and you should not study.

(7) You will go to the beach this weekend, and you should not bringyour books or you should not study.

7 You will go to the beach this weekend, and you should not bring yourbooks or you should not study.

2.5.3: p is the statement “I will prove this by cases”, q is the statement“There are more than 500 cases,” and r is the statement “I can findanother way.” State the negation of (¬r _ ¬q) ! p. in simple English.Do not use the expression “It is not the case.”I cannot find another way or there are not more than 500 cases, but Iwill not prove this by cases.

2.6.1: Prove (p ! q) ^ ¬q ) ¬p.in exercise 2.4.1 we proved (p ! q) ^ ¬q ! ¬p is a tautology, whichproves this exercise.p q ¬p ¬q p ! q (p ! q) ^ ¬q (p ! q) ^ ¬q ! ¬pT T F F T F TT F F T F F TF T T F T F TF F T T T T T

2.6.2: Prove p ^ (p ! q) ! ¬q is a contingency using a truth table.

Proof.

p q ¬q p ! q p ^ (p ! q) p ^ (p ! q) ! ¬qT T F T T FT F T F F TF T F T F TF F T T F T

Since the statement is true in some cases and false in another, it is acontingency.

⇤2.6.3: Prove p ! (p _ q) is a tautology using a verbal argument.

Proof. To prove this we will show that the statement cannot befalse, so suppose p ! (p _ q) is false. Then p has to be true while p _ qis false. But If p is true, then p _ q , T _ q and we know T _ q , T

Page 7: Exercise Solutions - Florida State Universitywooland/mad2104/Answers.pdf · 5 (b) If p is false and q is true. Then we still have (p q)istrue so ¬(pq)isfalse,againcontradictingourassumptionthat

7

by the domination law. This contradict the statement that p_ q is falseand so we must have p ! (p _ q) is always true. ⇤

2.6.4: Prove (p ^ q) ! p is a tautology using the table of propositionalequivalences.

Proof. (p ^ q) ! p, ¬(p ^ q) _ p by the implication law, (¬p _ ¬q) _ p by DeMorgan’s law, (¬q _ ¬p) _ p by the commutative law, ¬q _ (¬p _ p) by the associative law, ¬q _ T by the tautology, T by the domination law

⇤2.6.5: Prove [(p ! q) ^ (q ! r)] ) (p ! r) using a truth table.

Proof. To prove this statement we must show [(p ! q) ^ (q !r)] ! (p ! r) is a tautology.

p q r p ! q q ! r p ! r (p ! q) ^ (q ! r) [(p ! q) ^ (q ! r)]! (p ! r)

T T T T T T T TT T F T F F F TT F T F T T F TT F F F T F F TF T T T T T T TF T F T F T F TF F T T T T T TF F F T T T T T

⇤2.6.6: Prove [(p _ q) ^ ¬p] ) q using a verbal argument.

Proof. We will show this by proving that when the hypothesis,(p _ q) ^ ¬p, is true the conclusion, q, must also be true.Suppose (p _ q) ^ ¬p is true. Then both p _ q and ¬p are true by thedefinition of ^. Since ¬p is true, p must be false. Since p is false andp _ q is true, q must be true by the definition of _.This shows [(p _ q) ^ ¬p] ) q. ⇤

2.6.7: Prove (p^q) ! (p^q) is a tautology using the table of propositionalequivalences.

Proof. (p ^ q) ! (p ^ q), ¬(p ^ q) _ (p ^ q) by the implication law, T by the tautology

Page 8: Exercise Solutions - Florida State Universitywooland/mad2104/Answers.pdf · 5 (b) If p is false and q is true. Then we still have (p q)istrue so ¬(pq)isfalse,againcontradictingourassumptionthat

8

3.4.1: Let P (n,m) be the predicate mn > 0, where the domain for m andn is the set of integers. Which of the following statements are true?(1) P (�3, 2)(2) 8mP (0,m)(3) 9nP (n,�3)(1) False, P (�3, 2)(2) False, 8mP (0,m)(3) True, 9nP (n,�3)

3.7.1: In each of the cases above give the truth value for the statement ifeach of the 8 and 9 quantifiers are reversed.(1) true(2) false(3) false(4) true

3.9.1:

Example 0.0.1. Suppose R(x, y) is the predicate “x understands y,” the

universe of discourse for x is the set of students in your discrete class,

and the universe of discourse for y is the set of examples in these lecture

notes. Pay attention to the di↵erences in the following propositions.

(1) 9x8yR(x, y) is the proposition “There exists a student in this class

who understands every example in these lecture notes.”

(2) 8y9xR(x, y) is the proposition “For every example in these lecture

notes there is a student in the class who understands that exam-

ple.”

(3) 8x9yR(x, y) is the proposition “Every student in this class under-

stands at least one example in these notes.”

(4) 9y8xR(x, y) is the proposition “There is an example in these notes

that every student in this class understands.”

Each of the propositions in Example 0.0.1 has a slightly di↵erent mean-ing. To illustrate this, set up the following diagrams: Write the five let-ters A,B,C,D,E on one side of a page, and put the numbers 1 through6 on the other side. The letters represent students in the class and thenumbers represent examples. For each of the propositions above drawthe minimal number of lines connecting people to examples so as to con-struct a diagram representing a scenario in which the given propositionis true.

3.9.2: Give a scenario where parts 1 and 2 in Example 0.0.1 have oppositetruth values.One student understands half the examples but not all and anotherstudent understands the other half of the examples, but not all. Then(1) is false and (2) is true.

Page 9: Exercise Solutions - Florida State Universitywooland/mad2104/Answers.pdf · 5 (b) If p is false and q is true. Then we still have (p q)istrue so ¬(pq)isfalse,againcontradictingourassumptionthat

9

3.9.3: Let P (x, y) be the predicate 2x + y = xy, where the domain ofdiscourse for x is {u 2 Z|u 6= 1} and for y is {u 2 Z|u 6= 2}. Determinethe truth value of each statement. Show work or briefly explain.(1) P (�1, 1)(2) 9xP (x, 0)(3) 9yP (4, y)(4) 8yP (2, y)(5) 8x9yP (x, y)(6) 9y8xP (x, y)(7) 8x8y[((P (x, y)) ^ (x > 0)) ! (y > 1)](1) True, P (�1, 1) is the statement 2(�1) + (1) = (�1)(1), which is

true.(2) True, 9xP (x, 0)(3) False, 9yP (4, y). Remember the universe is a subset of the inte-

gers.(4) False, 8yP (2, y)(5) False. However, if the domain of discourse for y were changed to

{u 2 R|u 6= 2}, then it would be true.(6) False.(7) True. Notice that if the domain of discourse for x and y were

changed to {u 2 R|u 6= 1} and {u 2 R|u 6= 2}, respectively, thenthe statement would be false (consider x = 1/2 and y = �2).

3.10.1: Repeat Exercise for the four propositions 8x9!yR(x, y), 9!y8xR(x, y),9!x8yR(x, y), and 8y9!xR(x, y).

3.11.1: Negate the rest of the statements in Example 0.0.1.(1) 8x9y¬R(x, y) For every student there is an example that student

does not understand.(2) 9y8x¬R(x, y) There is an example that no student understands.(3) (done in notes) 9x8y¬R(x, y) There is a student that does not

understand any of the examples.(4) 8y9x¬R(x, y) For each example, there is a student that does not

understand it.3.11.2: Suppose S(x, y) is the predicate “x saw y,” L(x, y) is the predicate“x liked y,” and C(y) is the predicate “y is a comedy.” The universe ofdiscourse of x is the set of people and the universe of discourse for y isthe set of movies. Write the following in proper English. Do not usevariables in your answers.(1) 8y¬S(Margaret, y)(2) 9y8xL(x, y)(3) 9x8y[C(y) ! S(x, y)](4) Give the negation for part 3 in symbolic form with the negation

symbol to the right of all quantifiers.(5) state the negation of part 3 in English without using the phrase

”it is not the case.”

Page 10: Exercise Solutions - Florida State Universitywooland/mad2104/Answers.pdf · 5 (b) If p is false and q is true. Then we still have (p q)istrue so ¬(pq)isfalse,againcontradictingourassumptionthat

10

(1) Margaret has not seen any movies.(2) There is a movie that everyone liked.(3) There is a person that has seen every movie that is a comedy.(4) The negation is 8x9y[C(y) ^ ¬S(x, y)](5) in poor English the negation says, “For every person there is a

movie that is a comedy and that person has not seen.” To say thismore clearly we can say “Noone has seen every movie that is acomedy.”

3.11.3: Suppose the universe of discourse for x is the set of all FSU stu-dents, the universe of discourse for y is the set of courses o↵ered atFSU, A(y) is the predicate “y is an advanced course,” F (x) is “x is afreshman,” T (x, y) is “x is taking y,” and P (x, y) is “x passed y.” Usequantifiers to express the statements(1) No student is taking every advanced course.(2) Every freshman passed calculus.(3) Some advanced course(s) is(are) being taken by no students.(4) Some freshmen are only taking advanced courses.(5) No freshman has taken and passed linear algebra.

The following answers are not unique.(1) 8x9y(A(y) ^ ¬T (x, y))(2) 8x[F (x) ! P (x, calculus)](3) 9y8x[A(y) ^ ¬T (x, y)](4) 9x8y[F (x) ^ [T (x, y) ! A(y)]](5) 8x[F (x) ! ¬(T (x, LinearAlgebra) ^ P (x, LinearAlgebra))]

3.12.1: In each of the two cases in which the statements are not equivalent,there is an implication in one direction. Which direction? In order tohelp you analyze these two cases, consider the predicates P (x) = [x � 0]and Q(x) = [x < 0], where the universe of discourse is the set of all realnumbers.(1) 8x[P (x) _Q(x)] ( 8xP (x) _ 8xQ(x).(2) 9x[P (x) ^Q(x)] ) 9xP (x) ^ 9xQ(x).

Chapter 3 Methods of Proofs: 1.5.1: Give a formal proof that the fol-lowing argument is valid. Provide reasons.a _ b¬c ! ¬b¬a.·.c

Assertion Reason1. a _ b hypothesis2. ¬c ! ¬b hypothesis3. ¬a hypothesis4. b steps 1 and 3 and Disjunctive Syllogism5. c steps 4 and 2 and Modus Tollens

Page 11: Exercise Solutions - Florida State Universitywooland/mad2104/Answers.pdf · 5 (b) If p is false and q is true. Then we still have (p q)istrue so ¬(pq)isfalse,againcontradictingourassumptionthat

11

1.5.2: Determine whether the following argument is valid. Give a formalproof. Provide reasons.¬(¬p _ q)¬z ! ¬ss ! (p ^ ¬q)¬z _ r.·.rInvalid. The assertions are all true while the conclusion is false whenr = F , z = F , s = F , p = T , and q = F .

1.7.1: Determine whether the following argument is valid or invalid. Givea formal proof. Provide reasons.There is someone in this class who has has taken Calculus III Everyonewho takes Calculus III also takes Physics. Therefore, someone in thisclass has taken Physics. Valid.Let C(x) represent “x is in this class”, F (x) represent “x has takenCalculus III,” and L(x) represent “x has taken Physics.” Let the universeof discourse for x be the set of all people. Then the argument is thefollowing:9x[C(x) ^ F (x)]8x[F (x) ! L(x)].·.9x[C(x) ^ L(x)]

Assertion Reason1. 9x[C(x) ^ F (x)] hypothesis2. 8x[F (x) ! L(x)] hypothesis3. C(a) ^ F (a) 1. and existential instantiation4. C(a) 3 and conjunction elimination5. F (a) 3 and conjunction elimination6. F (a) ! L(a) 2. and universal instantiation7. L(a) 5, 4, and Modus Ponens8. C(a) ^ L(a) 4, 7, and conjunction introduction9. 9x[C(x) ^ L(x)] 8 and existential generalization

1.8.1: Give a careful proof of the statement: For all integers m and n, ifm is odd and n is even, then m+ n is odd.

Proof. Let m and n be integers (universal instantiation). Assumem and n are even (hypothesis of the argument). Since even integers aremultiples of two we may write m = 2k and n = 2` where k, ` 2 Z. Usingalgebraic properties of integers we have m + n = 2k + 2` = 2(k + `).This shows m+ n is a multiple of two and so it is an even integer. ⇤

1.8.2: Consider the following hypotheses: If the car does not start today,then I will not go to class. If I go to class today then I will take the quiz.If I do not take the quiz today then I will ask the teacher for an extracredit assignment. I asked the teacher for an extra credit assignment.

Page 12: Exercise Solutions - Florida State Universitywooland/mad2104/Answers.pdf · 5 (b) If p is false and q is true. Then we still have (p q)istrue so ¬(pq)isfalse,againcontradictingourassumptionthat

12

Determine whether each of the following are valid or invalid conclusionsof the above hypotheses. Why or why not?(1) I did not go to class today.

invalid – the assertion “I asked the teacher for an extra creditassignment” does not combine with either of the implications toconclude any simple statement.

(2) Remove the hypothesis “I asked the teacher for an extra creditassignment” from the above assumptions. Can one now conclude“If the car does not start today, then I will ask the teacher for anextra credit assignment” for the remaining assumptions?Invalid. Denying the anticedent.

1.8.3: Find the error in the proof of the following statement.Suppose x is a positive real number. Claim: the sum of x and itsreciprocal is greater than or equal to 2.

Incorrect “proof”. Multiplying by x we get x2 + 1 � 2x. Byalgebra, x2 � 2x+ 1 � 0. Thus (x� 1)2 � 0. Any real number squaredis greater than or equal to 0, so x

2+1

x

� 2 is true. ⇤

This first statement is assuming the conclusion x+ 1/x � 2 is true.It is expressing ”if x+ (1/x) � 2 then your get a true statement”. Thisdoes not prove ”if (x� 1)2 � 0 thenx+ (1/x) � 2.”

1.8.4: Find the fallacy associated with the following:Problem: Solve for x given the equation

px +

px� a = 2, where

a is a real number.Incorrect “Solution”: The given equation also implies that

1px+

px� a

=1

2,

sopx�

px� a =

apx+

px� a

=a

2.

Adding the original equation with this one gives

2px = 2 + (a/2)

and thus

x = (1 +a

4)2.

Notice, however, if a = 8 then x = 9 according to the solution, but thisdoes not satisfy the original equation.There are several rules of algebra that are not equivalences. Here weuse that (a = b) ! (a2 = b2), but the converse is not true. So we mayhave solutions of the later equation that are not solutions of the earlierequation.

Page 13: Exercise Solutions - Florida State Universitywooland/mad2104/Answers.pdf · 5 (b) If p is false and q is true. Then we still have (p q)istrue so ¬(pq)isfalse,againcontradictingourassumptionthat

13

2.2.1: Fill in the reasons for the following proof of the tautology ¬p !(p ! q).[¬p ! (p ! q)] , [p _ (¬p _ q)] implication and double negation laws

, [(p _ ¬p) _ q] associative laws, T _ q tautology, T domination

2.2.2: Let A = {1, 2, 3} and R = {(2, 3), (2, 1)}(✓ A ⇥ A). Prove: ifa, b, c 2 A are such that (a, b) 2 R and (b, c) 2 R then (a, c) 2 R.

Proof. By the definition of R we see that there are no ordered pairsin R where the first entry of one and the second entry of another is thesame so the hypothesis, (a, b) 2 R and (b, c) 2 R, cannot be true. Thisshows that the implication: if a, b, c 2 A are such that (a, b) 2 R and(b, c) 2 R then (a, c) 2 R; is vacuously true. ⇤

2.3.1: Give a careful proof of the statement: For all integers m and n, ifm is odd and n is even, then m+ n is odd.

Proof. Assume m is odd and n is even. Then m and n can bewritten in the form

m = 2a+ 1 and n = 2b,

where a and b are also integers. Then

m+ n = (2a+ 1) + (2b) (substitution)= 2a+ 2b+ 1 (associative and commutative

laws of addition)= 2(a+ b) + 1 (distributive law)

Since m + n is twice another integer, (a+b), plus 1; m + n is an oddinteger. ⇤

2.4.1: The following statement is a special case of the proposition provedin Example ??. Give a careful proof of this statement without assumingthe result in Example ??.

For every integer n, if n2 is even, then n is even.2.5.1: Prove: For all real numbers x and y, if 35x+ 14y = 253, then x isnot an integer or y is not an integer.

Proof. Let x and y be real numbers such that 35x + 14y = 253.Assume x, y 2 Z. Notice 35x+ 14y = 7(5x+ 2y) is divisible by 7. Thisimplies 253 is also divisible by 7. However, 253 is not divisible by 7,giving us a contradiction. Thus our assumption that x and y are bothintegers is false, so at least one of x and y is not an integer.

⇤2.5.2: Consider the statement: For all nonnegative real numbers a, b, andc, if a2 + b2 = c2, then a+ b � c.(a) Give a proof by contradiction.

Page 14: Exercise Solutions - Florida State Universitywooland/mad2104/Answers.pdf · 5 (b) If p is false and q is true. Then we still have (p q)istrue so ¬(pq)isfalse,againcontradictingourassumptionthat

14

(b) Give a direct proof. [Hint: The extra idea needed for a directproof should emerge naturally from a proof by contradiction.]

(1) Proof. Let a, b, c 2 [0,1) be such that a2 + b2 = c2. Assumea+ b < c. This gives us

c2 > (a+ b)2

(a+ b)2 = a2 + 2ab+ b2

a2 + 2ab+ b2 = (a2 + b2) + 2ab(a2 + b2) + 2ab = c2 + 2ab

c2 + 2ab � c2

This shows c2 > c2, a contradiction. Thus the assumption a+b < cis false, which shows a+ b � c.

⇤(2) Proof. Let a, b, c 2 [0,1) be such that a2 + b2 = c2. Then

c2 = a2 + b2

a2 + b2 a2 + 2ab+ b2

a2 + 2ab+ b2 = (a+ b)2

Thus c2 (a+ b)2. This implies �(a+ b) c a+ b, which givesus c a+ b.

⇤2.5.3: Fill in the blanks.If we are proving the implication p ! q we assume. . .(1) p for a direct proof.(2) for a proof by contrapositive (¬q)(3) for a proof by contradiction. (p ^ ¬q)

We are then allowed to use the truth of the assumption in 1, 2, or 3 inthe proof.After the initial assumption, we prove p ! q by showing(4) q must follow from the assumptions for a direct proof.(5) must follow the assumptions for a proof by contrapositive.

(¬p)(6) must follow the assumptions for a proof by contradiction.(a

contradiction of the form r ^ ¬r)2.6.1: Prove: For every real number x,

px2 = |x|. [Hint: Recall as above

thatpx2 represents the positive square of x2, and look at two cases:

x � 0 and x < 0.]2.9.1: Prove: If 2n + 1 objects are distributed into n boxes, then somebox must contain at least 3 of the objects.

Proof. Let n 2 N and let 2n+1 objects be distributed into n boxes.Assume no box contains 3 or more objects. Then each of the n boxescontains 2 or fewer objects. Thus there are no more than 2n objects.

Page 15: Exercise Solutions - Florida State Universitywooland/mad2104/Answers.pdf · 5 (b) If p is false and q is true. Then we still have (p q)istrue so ¬(pq)isfalse,againcontradictingourassumptionthat

15

This contradicts that there are 2n+1 objects, so there must be at least3 objects in at least one of the boxes.

⇤2.9.2: Fill in the blank in the following statement and then give a proof.Suppose k is a positive integer. If kn+ 1 objects are distributed into nboxes, then some box must contain at least of the objects.ANSWER: Suppose k is a positive integer. If kn + 1 objects are dis-tributed into n boxes, then some box must contain at least k + 1 of theobjects.

Proof by contradiction. Assume kn+1 objects are distributedin n boxes, and that each box contains no more than k objects. Thiswould mean that there are at most kn objects total. This contradictsthe statement that there are kn + 1 objects, so there must be at leastkn+ 1 objects in at least one box. ⇤

2.9.3: Suppose that 88 chairs are arranged in a rectangular array of 8rows and 11 columns, and suppose 50 students are seated in this array(1 student per chair).(a) Prove that some row must have at least 7 students.(b) Prove that some column must have at most 4 students.

2.10.1: Prove: There does not exist a positive real number a such that

a+1

a< 2.

Proof. Assume a is a positive real number such that a +1

a< 2.

Since a > 0 we geta2 + 1 < 2a, soa2 � 2a+ 1 < 0, so(a� 1)2 < 0.This is a contradiction since the square of any real number is nonegative.

Thus there does not exist a positive real number, a, such that a+1

a< 2.

⇤2.12.1: Find a counterexample to the statement: For every natural num-

ber n, n2 � n+ 41 is prime.2.13.1: Prove the following statements are equivalent.

(1) n� 5 is odd.(2) 3n+ 2 is even.(3) n2 � 1 is odd.

Hint: Prove the following implications:(1) 1!2(2) 2!1(3) 1!3(4) 3!1

Page 16: Exercise Solutions - Florida State Universitywooland/mad2104/Answers.pdf · 5 (b) If p is false and q is true. Then we still have (p q)istrue so ¬(pq)isfalse,againcontradictingourassumptionthat

16

Proof. Let n be an integer.

Proof of 1!2: Assume n� 5 is odd. Then n� 5 = 2k+1 for somek 2 Z. This gives us n = 2k + 6 and so 3n+ 2 = 3(2k + 6) + 2 =6k+20 = 2(3k+10). This shows us that 3n+2 can be expressedas twice an integer, 3k + 10, and so 3n+ 2 is even.

Proof of 2!1: Assume n � 5 is even. Then n � 5 = 2k for somek 2 Z. This gives us n = 2k + 5 and so 3n+ 2 = 3(2k + 5) + 2 =6k+17 = 2(3k+8)+1. This shows us that 3n+2 can be expressedas twice an integer (3k + 8) plus one and so 3n + 2 is odd. Thisshows the contrapositive and so 1!2.

Proof of 1!3: Assume n� 5 is odd. Then n� 5 = 2k+1 for somek 2 Z. This gives us n = 2k + 6 and so n2 � 1 = (2k + 6)2 � 1 =4k2+24k+35 = 2(2k2+12k+17)+1. This shows us that 3n+2can be expressed as twice an integer, 2k2+12k+17, plus one andso 3n+ 2 is odd.

Proof of 3!1: Assume n � 5 is even. Then n � 5 = 2k for somek 2 Z. This gives us n = 2k + 5 and so n2 � 1 = (2k + 5)2 � 1 =4k2+20k+24 = 2(2k2+10k+12). This shows us that 3n+2 canbe expressed as twice an integer, 2k2 + 10k + 12, and so 3n+ 2 iseven.

3.2.1: Notice in the above example that, while we proved 8n[P (n) !P (n+ 1)], we did not prove 8nP (n). Why?

3.3.1: Prove:nX

i=1

(2i� 1) = 1 + 3 + 5 + · · ·+ (2n� 1) = n2, for all n � 1.

3.3.2: Prove:nX

i=1

1

i(i+ 1)=

n

n+ 1

3.3.3: ProvenX

k=1

3 · 2k�1 = 3(2n � 1)

3.4.1: Prove: 2n+1 2n, for all n � 3. Establish the induction step in twoways, as suggested in the remark above. [Hint: 2n +2n = 2 · 2n = 2n+1.]

Proof. Basis: Prove 2 · 3 + 1 23.2 · 3 + 1 = 7 and 23 = 8, so this is clear.

Induction Hypothesis: Let n be an integer with n � 3. Assume2n+ 1 2n.

Induction Step: Prove 2(n+ 1) + 1 2n+1.We know 2n+1 = 2 · 2nand we also have 2 · 2n � 2(2n+ 1) by the induction hypothesis.If we can show 2(2n+1) � 2(n+1)+1 then this inequality alongwith the previous one will imply that 2(n+ 1) + 1 2n+1.

Page 17: Exercise Solutions - Florida State Universitywooland/mad2104/Answers.pdf · 5 (b) If p is false and q is true. Then we still have (p q)istrue so ¬(pq)isfalse,againcontradictingourassumptionthat

17

Consider that the following are equivalent inequalities:

[2(2n+ 1) � 2(n+ 1) + 1] , [4n+ 2 � 2n+ 3] , [2n � 1] , [n � 1/2]

We know that n � 3, so the rightmost inequality is clearly true.Thus the equivalent inequality on the far left must also be true.Thus 2(n+ 1) + 1 2n+1 which completes the proof.

⇤3.4.2: Prove: n2 + 3 2n, for all n � 5. [Hint: Look for a place to use

the inequality in the exercise above in the induction step.]

Proof. Basis: Prove 52 + 3 25.52 + 3 = 28 and 25 = 32, so this is clear.

Induction Hypothesis: Let n be an integer with n � 5. Assumen2 + 3 2n.

Induction Step: Prove (n+ 1)2 + 3 2n+1.We know 2n+1 = 2 · 2nand we also have 2 · 2n � 2(n2 + 3) by the induction hypothesis.If we can show 2(n2 +3) � (n+1)2 +3 then this inequality alongwith the previous one will imply that (n+ 1)2 + 3 2n+1.Consider that the following are equivalent inequalities:

[2(n2 + 3) � (n+ 1)2 + 3] , [2n2 + 6 � n2 + 2n+ 4] , [n2 � 2n+ 2 � 0]

We know that n � 5 and that n2 � 2n + 2 is a quadratic equa-tion with roots less that 5 so it is positive for n � 5. Thus theequivalent inequality on the far left must also be true.Thus (n+ 1)2 + 3 2n+1 which completes the proof.

⇤Alternate Proof. Basis: Prove 52 + 3 25.

52 + 3 = 28 and 25 = 32, so this is clear.Induction Hypothesis: Let n be an integer with n � 5. Assume

n2 + 3 2n.Induction Step: Prove (n+ 1)2 + 3 2n+1.

We know (n+ 1)2 + 3 = (n2 + 3) + (2n+ 1)and we also have (n2 + 3) + (2n + 1) (2n) + (2n + 1) by theinduction hypothesis.From the previous problem, we also know 2n + 1 2n for n � 3and so it holds in this exercise. Thus (2n)+(2n+1) (2n)+(2n) =2(2n) = 2n+1.Thus (n+ 1)2 + 3 2n+1 which completes the proof.

⇤3.5.1: Let A = {a, b, c, d, e} and B = {a, b, c, d}. List all the subsets of A

in one column and all the subsets of B in another column. Draw a lineconnecting every subset of A to a subset from B to demonstrate the 2to 1 correspondence used in the previous proof. Note that an example

Page 18: Exercise Solutions - Florida State Universitywooland/mad2104/Answers.pdf · 5 (b) If p is false and q is true. Then we still have (p q)istrue so ¬(pq)isfalse,againcontradictingourassumptionthat

18

such as this does not prove the previous Theorem, but it does help toillustrate the tools used.

3.5.2: Prove: For all n � 0, a set with n elements hasn(n� 1)

2subsets

with exactly two elements. [Hint: In order to complete the inductionstep try to devise a strategy similar to the one used in the example inExample ??. It is interesting to observe that the formula works for setswith fewer than 2 elements.]

3.5.3: Use mathematical induction to prove that n(n2 + 5) is a multipleof 6 for all n 0. [Hint: You will have to find the appropriate predicateP (k).]

3.5.4: Prove 52n�1 + 1 is divisible by 6 for n 2 Z+.3.5.5: Prove a� b is a factor of an � bn. Hint: ak+1 � bk+1 = a(ak � bk) +bk(a� b).

Proof. Basis: Show a� b is a factor of a1� b1. Since a1� b1 =a� b this is clear.

Induction Hypothesis: Let n 2 Z+. Assume a � b is a factor ofan � bn.

Induction Step: Prove a� b is a factor of an+1 � bn+1.We use the hint:

an+1 � bn+1 = a(an � bn) + bn(a� b)

By the induction hypothesis a� b is a factor of an+ bn and so it isalso a factor of a(an� bn). We also have a� b is clearly a factor ofbn(a�b), so a�b must be a factor of the sum a(an�bn)+bn(a�b).Thus by the principle of mathematical induction a� b is a factorof an � bn for all positive integers n.

⇤3.5.6: The following is an incorrect “proof” that any group of n horsesare the same color. What is the error in the proof?

3.6.1: Prove the first principle of mathematical induction is equivalent tothe second principle of mathematical induction.

Chapter 4 Applications of Methods of Proof: 1.8.1: Use the sets givenin Example ?? to findAssume: U = {a, b, c, d, e, f, g, h}, A = {a, b, c, d, e}, B = {c, d, e, f},and C = {a, b, c, g, h}.(1) B ⇥ A(2) P(B)(3) |P(U)|(1) B⇥A = {(c, a), (c, b), (c, c), (c, d), (c, e), (d, a), (d, b), (d, c), (d, d), (d, e), (e, a), (e, b), (e, c), (e, d), (e, e), (f, a), (f, b), (f, c), (f, d), (f, e)}(2) P(B) = {;, {c}, {d}, {e}, {f}, {c, d}, {c, e}, {c, f}, {d, e}, {d, f}, {e, f}, {c, d, e}, {c, d, f}, {c, e, f}, {d, e, f}, {c, d, e, f}}(3) |P(U)| = 256

1.8.2:

Page 19: Exercise Solutions - Florida State Universitywooland/mad2104/Answers.pdf · 5 (b) If p is false and q is true. Then we still have (p q)istrue so ¬(pq)isfalse,againcontradictingourassumptionthat

19

(1) If |A| = n and |B| = m, how many elements are in A⇥ B?

nm

(2) If S is a set with |S| = n, what is |P(S)|?2n

1.8.3: Does A⇥ B = B ⇥ A? Prove your answer.1.11.1: Prove the identitiy A � B = A \ B using the method of Proof 2in Example ??.

1.11.2: Prove the identitiy A � B = A \ B using the method of Proof 3in Example ??.A B B A� B A \ B1 1 0 0 01 0 1 1 10 1 0 0 00 0 1 0 0

1.11.3: Prove the identity (A [ B) � C = (A � C) [ (B � C) using themethod of Proof 1 in Example ??.

1.11.4: Prove the identity (A [ B) � C = (A � C) [ (B � C) using themethod of Proof 2 in Example ??.

1.11.5: Prove the identity (A [ B) � C = (A � C) [ (B � C) using themethod of Proof 3 in Example ??.

1.14.1: For each positive integer k, let Ak

= {kn|n 2 Z}. For example,• A

1

= {n|n 2 Z} = Z• A

2

= {2n|n 2 Z} = {...,�2, 0, 2, 4, 6, ...}• A

3

= {3n|n 2 Z} = {...,�3, 0, 3, 6, 9, ...}Find

1.10\

k=1

Ak

{2520n|n 2 Z}

2.m\

k=1

Ak

, where m is an arbitrary positive integer.

{n · (lcm(2, 3, 4, . . . ,m))|n 2 Z}1.14.2: Use the definition for A

k

in exercise to answer the following ques-tions.

(1)1\

i=1

Ai

= {0}

(2)1[

i=1

Ai

= Z

1.15.1: Let U = {a, b, c, d, e, f, g, h, i, j} with the given alphabetical order.Let A = {a, e, i}, B = {a, b, d, e, g, h, j}, and C = {a, c, e, g, i}.(1) Write out the bit string representations for A, B, and C.

Page 20: Exercise Solutions - Florida State Universitywooland/mad2104/Answers.pdf · 5 (b) If p is false and q is true. Then we still have (p q)istrue so ¬(pq)isfalse,againcontradictingourassumptionthat

20

(2) Use these representations to find(a) C(b) A [ B(c) A \ B \ C(d) B � C

(1) A = 1000100010B = 1101101101C = 1010101010

(2) Use these representations to find(a) C = 0101010101(b) A [ B = 1101101111(c) A \ B \ C = 1000100000(d) B � C = 0101000101

2.2.1: What if we say the domain of the function in Example ?? is theset of all reals and the codomain is [0,1). Which properties would thefunction have (injective and/or surjective)? Explain.It is still not injective since f(�1) = 1 = f(1), but it is now surjectivesince the range is [0,1).

2.2.2: Now, if we say the domain and the codomain are both [0,1). Whatproperties does the function in Example ?? have? Explain.Now it is injective and surjective.

2.7.1: Find the inverse of the function f : R � {�2} ! R � {1} defined

by f(x) =x� 1

x+ 2.

f�1 : R� {1} ! R� {�2}, f�1(x) =1 + 2x

1� x

2.7.2: Find the inverse of the function f : R ! (�1, 1) defined by f(x) =1� e�x.

f�1 : (�1, 1) ! R, f�1(x) = � ln(1� x)

2.7.3: Finish the proof of Theorem ??.2.8.1: Find an example of a function f : A ! B and a set S ✓ A where

f(S) 6= f(S).2.8.2: Let f : A ! B be a function and let S ✓ B. Prove f�1(S) =

f�1(S)2.10.1: Prove the composition of two surjections is a surjection.2.10.2: Prove or disprove: if the composition of two functions is an injec-

tion then the two original functions must be injections too.2.10.3: Prove or disprove: if the composition of two functions is an sur-

jection then the two original functions must be surjections too.3.4.1: Suppose a S is defined recursively as follows:

1. 1 2 S,2. If x 2 S, then 2 · x 2 S.

Page 21: Exercise Solutions - Florida State Universitywooland/mad2104/Answers.pdf · 5 (b) If p is false and q is true. Then we still have (p q)istrue so ¬(pq)isfalse,againcontradictingourassumptionthat

21

Prove that S = {2n|n � 0}.3.4.2: Suppose a S is defined recursively as follows:

1. 0, 1 2 S,2. If x, y 2 S, then x · y 2 S.

What are the elements of S? Prove that your answer is correct.3.4.3: Suppose f(n), n � 0, is defined recursively as follows:

1. f(0) = 0,2. f(n+ 1) = f(n) + (2n+ 1), for n � 0.

Prove that f(n) = n2 for all n � 0.

Proof. Basis: We need to prove f(0) = 02.f(0) = 0 by initial condition of f , so we can see f(0) = 02.

Induction Step: Let n be an element of Natural numbersassume that f(n) = n2.f(n+ 1) = f(n) + 2n+ 1 by definition of function= n2 + 2n+ 1 by induction hypothesis= (n+ 1)2

Therefore, f(n+ 1) = (n+ 1)2

3.5.1: Prove that if f is surjective that fn is surjective.3.7.1: Prove that F (n) > (3

2

)n�1 for n � 6. [Hint: Show that the state-ment is true for n = 6 and 7 (basis step), and then show the inductionstep works for n � 7.]

3.7.2: Let f : N ! Z be the function defined recursively by1. f(0) = 1 and f(1) = �4,2. f(n) = �3f(n� 1) + 4f(n� 2), for n � 2.

Prove f(n) = (�4)n

3.7.3: Let f : N ! Z be the function defined recursively by1. f(0) = 2 and f(1) = 7,2. f(n) = f(n� 1) + 2f(n� 2), for n � 2.

Prove f(n) = 3 · 2n � (�1)n

3.8.1: Suppose the alphabet ⌃ is the set {a, b, c, d}. Then ⌃⇤ is the set

of all words on ⌃. Use right concatenation to build the bit string daabcstarting with the empty string, � (use �a = a for any element, a, in ⌃).

3.8.2: Now take the same bit string, daabc, and build it using left concate-

nation. Notice that your steps are not the same; that is, concatenationis not commutative. Regardless, we arrive at the same set of strings, ⌃⇤.

3.9.1: What kinds of bit strings would we have if the initial condition inExample ?? is changed to 1 2 S only? So the definition would be

1. Initial Condition: 1 2 S,

2. Recursion: If w is a string in S, then so are 0w and w0.3.9.2: What kinds of strings do we get from the following recursive defi-

nition?

Page 22: Exercise Solutions - Florida State Universitywooland/mad2104/Answers.pdf · 5 (b) If p is false and q is true. Then we still have (p q)istrue so ¬(pq)isfalse,againcontradictingourassumptionthat

22

1. Initial Conditions: �, 1 2 S,

2. Recursion: If w is a string in S, then so is 0w.3.9.3: Find a recursive definition for the set of bit strings T = {0r1s|r, s 2N}.

3.9.4: Prove your answer for Exercise is correct.3.9.5: Find a recursive definition for the set of all bit strings containingno adjacent 1’s. (For example, 1001010 is allowed, but 0011010 is not.)

4.1.1: Prove that loga

x = logb x

logb afor arbitrary positive real numbers a and

b di↵erent from 1.4.2.1: Let a, b 2 R+ � {1}. Prove log

a

x is O(logb

x). Hint: recall exercise??.

4.4.1: Use the definition to show that 5x3 � 3x2 + 2x� 8 2 O(x3).4.4.2: Use Theorem ?? to show that 10x3 � 7x2 + 5 2 O(x3)4.4.3: Use Theorem ?? to show that x5 62 O(100x4).4.5.1: Show that (log

a

x)2 2 o(x).4.5.2: Show that, if a > 1, then x2 2 o(ax).4.5.3: Use mathematical induction to show that, if a > 1, then xn 2 o(ax)

for every positive integer n.4.9.1: Let a, b 2 R+ � {1}. Prove log

a

x is ⌦(logb

x).4.10.1: Prove Theorem 0.0.1.

Theorem 0.0.1. f is ⇥(g) if and only if f is O(g) and g is O(f).

4.10.2: If a and b are positive real numbers di↵erent from 1, show thatlog

a

x 2 ⇥(logb

x).Chapter 5 Number Theory: 1.1.1: Let a, b, and c be integers with a 6=

0. Prove that if ab|ac, then b|c.1.2.1: Prove part ?? of Theorem ??.1.2.2: Prove part ?? of Theorem ??.1.9.1: Let F (n) denote the n-th term of the Fibonacci Sequence. Proveusing induction that GCD(F (n), F (n� 1)) = 1 for all integers n � 2.Let F (n) denote the n-th term of the Fibonacci Sequence. Prove usinginduction that GCD(F (n), F (n� 1)) = 1 for all integers n � 2.

Proof. We will prove this by induction.

Basis: Prove GCD(F (2), F (1)) = 1.Since F (2) = 1 and F (1) = 1 by definition of the Fibonacci Se-quence, we see GCD(F (2), F (1)) = 1.

Induction Step: Let n 2 Z with n � 2. Assume GCD(F (n), F (n�1)) = 1. We need to prove GCD(F (n+ 1), F (n)) = 1.Let d = GCD(F (n+ 1), F (n)) = 1. Then d|F (n+ 1) and d|F (n).Using the properties in Theorem 1.2.1 in Chapter 5 of the coursenotes, since d|F (n) we have d|(�F (n)). Then, since d|F (n + 1)as well, we have d|(F (n + 1) � F (n)). However, by definition of

Page 23: Exercise Solutions - Florida State Universitywooland/mad2104/Answers.pdf · 5 (b) If p is false and q is true. Then we still have (p q)istrue so ¬(pq)isfalse,againcontradictingourassumptionthat

23

the Fibonacci sequence F (n � 1) = F (n + 1) � F (n). Therefored|F (n� 1).This show d is a common divisor of F (n) and F (n � 1). By theinduction hypothesis, GCD(F (n), F (n�1)) = 1, though, so d = 1.

⇤1.10.1: Given a positive integerm, prove that the assignment a 7! a mod mdefines a function f : Z ! Z. Is f one-to-one? onto? What is its range?a 7! a mod m is another way to write f(a) = a mod m.

1.10.1: Prove part ?? of Theorem ??.1.11.1: Prove that for a given modulus m, and arbitrary multiplier a,increment c, and seed x

0

, the sequence x0

, x1

, x2

, ... must eventuallyrepeat.

2.2.1: Prove that if a, b, s, t, and d are integers such that d|a and d|b, thend|(as+ bt).

2.2.2: Prove that if p is a prime number and n is an integer that is notdivisible by p, then there are integers s and t such that ps + nt = 1.[First show that GCD(p, n) = 1.]

2.2.3: Prove that if 1 is a linear combination of a and b, then GCD(a, b) =1.

2.3.1: Use Theorem ?? to give a direct proof that if the product of twointegers x and y is even, then either x is even or y is even.

2.3.2: Use mathematical induction to prove the following generalization ofTheorem ??. Suppose a

1

, a2

, ..., an

are integers and p is a prime number.If p|a

1

a2

· · · an

, then p|ai

for some i = 1, 2, ..., n. [Hint: The inductionstep has two cases.]

2.3.3: Use Lemma ?? to prove that if k, `, and m are positive integerssuch that k|m, `|m, and k and ` are relatively prime, then the productk`|m.

2.3.4: Suppose a and b are positive integers, d = GCD(a, b), a = dk, andb = d`. Prove that k and ` are relatively prime. [Hint: Show that 1 canbe expressed as a linear combination of k and `.]

3.6.1: Prove that if ab ⌘ 1(mod m) and b ⌘ c(mod m), then ac ⌘1(mod m).

4.6.1:

A =

2

41 1 0 00 0 1 10 1 0 1

3

5 B =

2

41 0 1 00 1 0 01 1 1 0

3

5

Find(1) A _ B

=

2

41 1 1 00 1 1 11 1 1 1

3

5