Sub topic 2
Even and Odd in Sums and Differences
Prerequisites
Assume you know what an integer is, how negative numbers work, and what divisibility and remainders mean. You should also be comfortable with basic exponent notation. This chapter focuses on how parity, the property of being even or odd, behaves when integers are added or subtracted.
The Core Definitions
An integer is even if it is divisible by 2. Equivalently, an even integer has the form \(2k\), where \(k\) is an integer.
An integer is odd if it has the form \(2k+1\), where \(k\) is an integer. Odd integers leave a remainder of 1 when divided by 2.
These definitions include negative integers and zero:
- \(0\) is even because \(0=2(0)\).
- \(-8\) is even because \(-8=2(-4)\).
- \(-7\) is odd because \(-7=2(-4)+1\).
The sign of an integer does not determine whether it is even or odd.
Sums of Two Integers
The parity of a sum depends on the parity of both addends.
| First integer | Second integer | Parity of the sum |
|---|---|---|
| Even | Even | Even |
| Odd | Odd | Even |
| Even | Odd | Odd |
| Odd | Even | Odd |
You can verify these rules algebraically.
- Even plus even: \(2a+2b=2(a+b)\), which is even.
- Odd plus odd: \((2a+1)+(2b+1)=2(a+b+1)\), which is even.
- Even plus odd: \(2a+(2b+1)=2(a+b)+1\), which is odd.
The key idea is that two odd terms contribute two extra 1s. Those 1s combine to make another multiple of 2.
Here is the same pattern using remainders. In the program, 0 represents even and 1 represents odd.
for a in (0, 1):
for b in (0, 1):
print(a, b, (a + b) % 2)The final value on each line is the remainder of the parity sum after division by 2. A remainder of 0 means even, and a remainder of 1 means odd.
Differences Follow the Same Pattern
Subtraction has the same parity rules as addition.
| First integer | Second integer | Parity of the difference |
|---|---|---|
| Even | Even | Even |
| Odd | Odd | Even |
| Even | Odd | Odd |
| Odd | Even | Odd |
For example:
- \(14-6=8\), which is even.
- \(9-3=6\), which is even.
- \(12-5=7\), which is odd.
- \(5-12=-7\), which is odd.
The last example shows why negative results cause no problem. \(-7\) is still odd.
To prove the rules, write the integers in their standard forms:
- Even minus even: \(2a-2b=2(a-b)\), so the result is even.
- Odd minus odd: \((2a+1)-(2b+1)=2(a-b)\), so the result is even.
- Even minus odd: \(2a-(2b+1)=2(a-b-1)+1\), so the result is odd.
- Odd minus even: \((2a+1)-2b=2(a-b)+1\), so the result is odd.
Therefore, two integers have an even sum or difference exactly when they have the same parity. Their sum or difference is odd when they have different parity.
Common Errors
A frequent mistake is to use the sign instead of parity. Positive and negative values can both be even or odd. For example, \(6\) and \(-6\) are both even, while \(5\) and \(-5\) are both odd.
Another mistake is assuming that a sum is odd because one term is odd. The other term matters. An odd number plus an odd number is even.
For GRE questions, translate a statement into a parity rule before calculating. If \(x+y\) is odd, then \(x\) and \(y\) must have different parity. If \(x-y\) is even, then \(x\) and \(y\) must have the same parity.
Exercise
If x is odd and y is even, what is the parity of x - y? Explain without choosing particular values.
Show answer
The difference is odd. Write x = 2a + 1 and y = 2b. Then x - y = 2(a - b) + 1, which has the form of an odd integer.