Proving that a sum is even if and only if the stated conditions hold

41 Views Asked by At

I am so frustrated about this question and I have been working on it the whole day before I decided to post this question.

Let $w,x,y,z$ be nonnegative integers. $$w+x+y=z$$ Prove that $z$ is even iff $w$, $x$ and $y$ are even or exactly one of $w, x, y$ is even.

What I have so far: $w, x, y$ can possibly be odds but if there are two odd numbers then the addition will be even.

Also there is a hint saying $x$ is even iff $x^2$ is even.

Thank you so much.

2

There are 2 best solutions below

0
On

You want to start by writing down the definition of an even number and odd number.

Then you want to prove that only when one of w, x or y is even, or when all three are even, is z even. You can substitute in your definitions of even and odd numbers into w, x and y, and then test each combination of even/odd numbers (remember to use different variables for each w, x and y so that they are not the same number).

For example:

An even number x is defined as x = 2s, where s is an integer. An odd number y is defined as y = 2k + 1, where k is an integer.

Case 1: One even number, two odd numbers

Let w = 2s, x = 2k + 1, y = 2j + 1 (Where s, k and j are integers)

w + x + y = z

2s + 2k + 1 + 2j + 1 = 2(s + k + j + 1) = z

Which is even, because z is divisible by 2.

The other cases should be easy to do if you follow the same method.

0
On

Just do it by cases.

There are either zero, one, two or three even numbers and the rest are odd.

Test them all.

1) They are all odd.

Then:

odd + odd + odd =

(odd + odd) + odd =

even[1] + odd = odd[2].

$z$ can not be even if $x,y,w$ are all odd.

2) One is even the rest are odd.

You have

even + odd + odd =

(even + odd) + odd =

odd + odd = even.

So $z$ can be even if exactly one of $x,y,w$ is even.

3) two are even and the third is odd.

Then

even + even + odd =

(even + even) + odd =

even[3] + odd = odd.

So $z$ can not be even if two are even.

4) All three are even.

even + even + even =

(even + even) + even=

even + even = even.

$z$ can be even if all three are even.

That's all possibilities.

.....

[1] odd + odd = even

Proof. Let $a = 2n + 1 $ and $b = 2m + 1$ be two odd numbers. Then $a + b = 2n + 2m + 2 = 2(n + m + 1)$

[2] odd + even = odd

Proof: ... I don't really have to prove these do I?

....