CMPT 260 Assignment 5

$35.00

Download Details:

  • Name: Assignment5-1sjnco.zip
  • Type: zip
  • Size: 68.05 KB

Category:

Description

5/5 - (1 vote)

1.Given a proof by cases to prove that for all integers x, x² – x is an even integer.

By case 1: x is even, x = 2k
Then, x² – x = 2k² – 2k = 2k (2k – 1) = 2 ( k (2k – 1 ))
And the result holds.

By case 2: when x is odd, x = 2k + 1
Then x² – x = (2k – 1)² – (2k + 1) = 4k² + 4k + 1 – 2k – 1 = 4k² – 2k = 2k (2k -1) = 2( k (2k -1)).

By these 2 cases, we can see that whatever x is even integer or odd, the result is even.

2. Give a proof by contraposition that for a ∈ Z, if a² + 3 is odd, then a is even.

Let P(x) = (a² + 3 is odd, a ∈ Z), Q(x) = (a is even);
P(x)Q(x).
We know that a² + 3 is odd. Assume a is not even (~Q(x)), thus a is odd and there exists an integer k, such that a = 2k + 1.
Then a² + 3 = (2k + 1) (2k + 1) + 3 = 4k² + 4 k + 1 + 3 = 4k² + 4k + 4 = 4 (k² + k + 1), let(k² + k + 1) = p, then a² + 3=2p, then and thus a² + 3 is even ~(P(x)), but the premise that a² + 3 is odd.
So, we get that ~Q(x)~P(x)

We can thus conclude that if a² + 3 is odd, then a is even.

3. Give a proof by contradiction for real numbers a and b that (a+b)/2< b ⇒ a < b.
Let P(x) = (a+b)/2< b, Q(x) = a<b; P(x)  Q(x)
We know that (a + b) /2 b (~P(x)). Thus a + b > 2b a > b (~Q(x)). But this contradict the premise that (a + b) /2 < b.

We can then conclude that (a+b)/2 <b ⇒a<b.

4. Give a proof by contradiction that given integers j and k where j ≥ 2 that then j ̸|k∨j ̸|(k+1).

We know that P: j and k are both integer and j ≥ 2, Q: j ̸|k∨j ̸|(k+1).
So, we assume to ~P: j and k are both integer and j<2, j =1, k =1
We are going to prove ~Q: j| k∨j | (k+1) is true if ~P
From j | k:
We get that j * n = k, and n must be a positive integer, assume j = 1, k = 1, so that n = 1 that is not an integer, this assumption is true.

From j | (k+1):
We get that j * m = k + 1, and m must be a positive integer, assume j = 1, k = 1, so that n = 1/2 that is not an integer, this assumption is false.

So, we get that j| k∨j | (k+1) is true by integers j and k where j<2, so we conclude that j ̸|k∨j ̸|(k+1) by integers j and k where j ≥ 2.