Question

In: Computer Science

Provide a proof of the following statement: For all integers ? and ?, if ? +...

Provide a proof of the following statement:

For all integers ? and ?, if ? + ? is odd, then ? − ? is odd.

Solutions

Expert Solution

Solution:

To prove: for all integers x and y, if x + y is odd then x - y is odd

Explanation:

Proving the statement given:

=>If x + y is odd then there will be 2 cases-

Case 1: x is odd and y is even

Case 2: x is even and y is odd

=>As sum of even and odd numbers can only by odd. If we add 2 odd numbers then it wil always be even and if we add 2 even numbers then it will be always even hence above 2 cases are only possible.

Proving that x - y is odd:

Case 1: when x is odd and y is even.

=>x - y = odd - even

=>x - y = odd number

=>As subtraction of odd and even number always returns odd number hence x - y is odd for case 1.

Case 2: When x is even and y is odd.

=>As subtraction of even and odd number always returns odd number hence x - y is odd for case 2.

=>Hence we have proved our statement on the basis of above statements given.

I have explained each and every part with the help of statements attached to it.


Related Solutions

Use proof by contrapositive to prove the statement: For all real numbers, if m + n...
Use proof by contrapositive to prove the statement: For all real numbers, if m + n is irrational, then m or n is irrational.
Suppose that a and b are integers. (a) (5 pts) Use a proof by contradiction to...
Suppose that a and b are integers. (a) (5 pts) Use a proof by contradiction to prove the statement ”If a − b is even, then a and b have the same parity (that is, they are both even or both odd).” Carefully show your algebra. (b) (5 pts) Show that any odd integer cubed is also an odd integer. Carefully show your algebra. (c) (5 pts) Use your results from parts (a-c) in a direct proof to show that...
Proof of If and Only if (IFF) and Contrapositive Let x,y be integers. Prove that the...
Proof of If and Only if (IFF) and Contrapositive Let x,y be integers. Prove that the product xy is odd if and only if x and y are both odd integers. Proof by Contradiction Use proof by contradiction to show that the difference of any irrational number and any rational number is irrational. In other words, prove that if a is irrational and b is a rational numbers, then a−b is irrational. Direct Proof Using a direct proof, prove that:...
1. Give a direct proof that if n is an odd integers, then n3 is also...
1. Give a direct proof that if n is an odd integers, then n3 is also an odd integer. 2. Give a proof by contradiction that the square of any positive single digit decimal integer cannot have more than two decimal digits.
5. Provide a counterexample to a false statement. (The statement might be a “for all,” “there...
5. Provide a counterexample to a false statement. (The statement might be a “for all,” “there exists,” or P ==> Q.) 6. Compute the product of two sets. 7. Given a relation (as ordered pairs or as a diagram), determine the domain, range, and target of the relation. 8. Given a relation (as ordered pairs or as a diagram), determine if a pair is in the relation. 9. Convert a relation from a list of ordered pairs to a mapping...
In this exercise we outline a proof of the following statement, which we will be taking...
In this exercise we outline a proof of the following statement, which we will be taking for granted in our proof of the division theorem: If a, b ∈ Z with b > 0, the set S = {a − bq : q ∈ Z and a − bq ≥ 0} has a least element. (a) Prove the claim in the case 0 ∈ S. (b) Prove the claim in the case 0 ∈/ S and a > 0. (0...
Provide an example of a proof by mathematical induction. Indicate whether the proof uses weak induction...
Provide an example of a proof by mathematical induction. Indicate whether the proof uses weak induction or strong induction. Clearly state the inductive hypothesis. Provide a justification at each step of the proof and highlight which step makes use of the inductive hypothesis.
Determine if the following statements are true or false. In either case, provide a formal proof...
Determine if the following statements are true or false. In either case, provide a formal proof using the definitions of the big-O, big-Omega, and big-Theta notations. For instance, to formally prove that f (n) ∈ O(g(n)) or f (n) ∉ O(g(n)), we need to demonstrate the existence of a constant c and a sufficient large n0 such that f (n) ≤ c g(n) for all n ≥ n0, or showing that there are no such values. a) 10000n2 ∈ O(n4)....
Statement: For a given integer N, print all the squares of positive integers where the square...
Statement: For a given integer N, print all the squares of positive integers where the square is less than or equal to N, in ascending order. Programming Tasks: Prompt the user to input the value of N Output to the screen all squares of positive integers <= N Tests: Item Test 1 Test 2 Test 3 Inputs: 50 9 100 Outputs: 1 4 9 16 25 36 49 1 4 9 1 4 9 16 25 36 49 64 81...
Which of the following integer examples provides a proof of the existential statement "∃n ∈ ℤ,...
Which of the following integer examples provides a proof of the existential statement "∃n ∈ ℤ, n² ≤ 0 ∧ n ≥ 0"? a n = -1 b n = 1 c n = 0 d n = 10
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT