From homework 1

advertisement

Here are the answer to selected homework problems. Sorry I didn’t have time to work out all of them.

From homework 1

2. State the inverse, converse and contrapositive of the following statement:

If x is a divisor of y and y is a divisor of z, then x is a divisor of z. inverse: If x does not divide y or y does not divide z then x does not divide z converse: If x divides z then x divides y and y divides z contrapositive: If x does not divide z then x does not divide y or y does not divide z

3. Write the following, in good English, in "if ... then ..." form:

The central switch going down is a sufficient condition for network failure.

If the central switch goes down then the network fails

4. Use a truth table to prove or disprove that the following statements are equivalent: p

(q



r) and (p

q)

(p

r)

It’s a tautology—check columns 5 and 8 p q r q



r p

(q



r) (p

q) (p

r) (p

q)

(p

r)

T T T F F T T F

T T F

T F T

T F F

T

T

F

T

T

F

T

F

F

F

T

F

T

T

F

F T T

F T F

F F T

F F F

F

T

T

F

F

F

F

F

F

F

F

F

F

F

F

F

F

F

F

F

From Homework 2

2. Use the predicates given below to write each of the statements that follow them in symbolic notation. The domain is the set of all movies.

M(x): “x is a mystery”

D(x): “x is a drama”

C(x): “x is a comedy”

B(x, y): “x is better than y” a. Some mysteries are dramas.

 x(M(x)

D(x)) b. Some comedies are better than all dramas.

 x(C(x)

  y(D(y)

B(x, y))) c. Only comedies are better than mysteries.

 x(M(x)

B(y, x)

C(y)) d. Not every comedy is a mystery.

 x(C(x)

 

M(x))

3. Consider the following statement: (p

q)

(p V q). One way to show that this is a

tautology is to use a truth table. Instead, use propositional logic to prove this. That is, using logical equivalences reduce the statement to a T. (Hint: you will need to use the equivalence rule that (p

q)

(

 p V q) )

(p

q)

(p V q)

Given

Equivalence rule for implication

(

(

(p

q) V (p V q) p V

 q V q V (

 q V (T) V q

 q V q q) V (p V q)

 p) V (p V q) p V p) V q

DeMorgan’s Law

Commutative

Associative (twice)

Negation

Universal Bound

T Negation

From homework 3

2. Prove or disprove each of the following statements: a. The sum of three consecutive integers, the first of which is even is divisible by 6.

False. Consider 4, 5, 6. b. The sum of three consecutive integers, the first of which is odd is divisible by 6.

Let x, x + 1 and x + 2 be consecutive integers Given

Since x is odd

k

Z such that x = 2k + 1 Definition of even x + x + 1 + x + 2 = 2k + 1 + 2k + 2 + 2k + 3 Algebra

= 6k + 6 = 6(k + 1)

Therefore, the sum is divisible by 6.

Algebra

Definition of divisible

3. Find the truth values for the following statement, write its negation and determine the truth value of its negation.

For every x, for every y, if x < y then x 2 < y 2

Truth value: False. Let x = -2 and y = 1 for example

Negation: There is an x and there is a y such that x < y and x 2 

y 2

Truth value of negation: True

From homework 4

2. Prove that if a and b are rational numbers, then a/b is a rational number.

Let a = r/s and b = x/y be rational numbers Definition of rational number

Then a/b = (r/s)/(x/y) = (ry)/(sx) Algebra

Therefore a/b is a rational number Definition of rational number

3. Prove that if m and n are integers such that m + n is even, then both m and n are even or both m and n are odd.

Case 1: Suppose m + n is even and m is odd m + n = 2k for k

Z m = 2j + 1 for j

Z

Definition of even

Definition of odd m + n = 2j + 1 + n = 2k so Algebra

n = 2k – 2j – 1 = 2(k – j) -1

Therefore n is odd

Case 2: m + n is even and m is even m + n = 2k for k

Z m = 2j for j

Z m + n = 2j + n = 2k so n = 2k – 2j = 2(k – j)

Therefore n is even

From homework 5

Algebra

Definition of odd

Definition of even

Definition of even

Algebra

Algebra

Definition of odd

2. Prove that n is even if and only if 3n 3 + 8 is even.

Given Suppose n is even. n = 2k for k

Z

Therefore 3n 3 + 8 is even

3n 3 + 8 = 2(2k) 3 + 8 = 16k 3 + 8 = 2(8k 3 + 4)

Definition of even

Algebra

Definition of even

To prove the other direction use the contrapositive. That is, prove that if n is odd then 3n 3 + 8 is odd. The steps will be the same except for using the definition of odd rather than the definition of even.

3. Prove that 2 | (n 2 + 3n) for n ≥ 1 by using a a. direct proof

Do a proof by cases with the two cases that n is even and n is odd. b. mathematical induction proof.

4. Prove or disprove: if 2|3m then 2|m.

2 | 3m so

k

Z such that 3m = 2k Definition of Even

By way of contradiction suppose m is not divisible by 2

Then, m is odd so that m = 2j + 1 for j

Z. Definition of Odd

Then, 3m = 3(2j + 1) = 6j + 3 = 2k

Then, 1 = 2k – 6j – 2 = 2(k – 3j – 1)

Algebra

Algebra

Thus 1 is an even number, a contradiction Definition of even

5. Eight people share a sack of doughnuts. How many doughnuts must there be to guarantee at least one person gets 4 doughnuts? 25

6. How many integers from 1 to 100 inclusive must you pick in order to be sure of getting one that is divisible by 5? 81

Download