if AB is odd, then a is odd or b is even?

Pages: 123
The second question discussed in the book. Note that the parity (odd/even) of the numbers is not assigned Boolean (true/false) values which obscures/confuses the justification examples.


GIVEN:
“Let a and b be integers”

TO PROVE:
“If ab is odd, then a is odd and b is odd.” (Hypothesis)
Which is the same as:
“ab is odd => a is odd and b is odd”

CONSTRUCTION:
1. The contrapositive of that last statement is:
~(“a is odd and b is odd”) => ~(“ab is odd”)
i.e.
~( (“a is odd”) and (“b is odd”) ) => ~(“ab is odd”)

2. Now use DeMorgan's law on that last statement:
~(“a is odd”) or ~(“b is odd”) => ~(“ab is odd”)

Which now becomes:
“a is even” or “b is even” => “ab is even”

So if we can prove that statement is truewe can prove the original (hypothesis) statement.

PROOF:
Let a be an even number 2i, and b be odd or even.
ab = 2ib which is even.

Similarly, ab will be evn if b is even whether a is odd or even.

So ab is always even.
QED 

Last edited on
I mean loosely he is correct at least one of the operands has to be odd for it to be an odd number, but technically both not one of the operands have to be odd.

The reason is simple. The relevant statement is a direct, logical, result of applying DeMorgan's Law as in 2. above.

As can be seen, the final result of applying it proves the hypothesis that both are in fact odd.
Last edited on
so you can't find a counterexample if you choose an odd number at least one of it's operands will be odd. but to go further and more accurately both operands have to be odd and none can be even.
Again, it's the concept of logical strength. If there's a ball in front of us and you say "it's a red ball" and I say "it's not a blue ball", both of us made equally true statements.
so you can't find a counterexample if you choose an odd number at least one of it's operands will be odd. but to go further and more accurately both operands have to be odd and none can be even.


In proving the hypothesis by contradiction, the author does exactly that.

If at least one of the two is not odd ( i.e. ~odd, or even ) the product is even for all possible cases - ie either one or the other, or both - the product is even.



I mean loosely he is correct at least one of the operands has to be odd for it to be an odd number, but technically both not one of the operands have to be odd.

The author is in fact absolutely correct.
The statement is 'full strength', tight as a drum, and without any technicality involved other than a perfectly logical conclusion.
Thanks Helios :) also thanks againtry

@againtry have you read the book?


GIVEN:
“Let a and b be integers”

TO PROVE:
“If ab is odd, then a is odd and b is odd.” (Hypothesis)
Which is the same as:
“ab is odd => a is odd and b is odd”

CONSTRUCTION:
1. The contrapositive of that last statement is:
~(“a is odd and b is odd”) => ~(“ab is odd”)
i.e.
~( (“a is odd”) and (“b is odd”) ) => ~(“ab is odd”)

2. Now use DeMorgan's law on that last statement:
~(“a is odd”) or ~(“b is odd”) => ~(“ab is odd”)

Which now becomes:
“a is even” or “b is even” => “ab is even”

So if we can prove that statement is truewe can prove the original (hypothesis) statement.

PROOF:
Let a be an even number 2i, and b be odd or even.
ab = 2ib which is even.

Similarly, ab will be evn if b is even whether a is odd or even.

So ab is always even.
QED


but in this case “If ab is odd, then a is odd or b is even (Hypothesis) not a and b is odd.
Last edited on
Like I said the first time: didn't even read the thread.
@adam2016
thanks againtry
You're welcome.

have you read the book?
To the extent of Section 4.3.2 of your reference and the 2 included examples.

but in this case “If ab is odd, then a is odd or b is even (Hypothesis) not a and b is odd.
Example 2 in the book and my version of a proof don't involve trying to prove (or disprove) “If ab is odd, then a is odd or b is even". AFAICS the author is not asserting that, either in proving or disproving it. In fact both the author and I prove that the statement is false and that gets us back to where you started this thread.

There's no point trying to prove the statement when you already have a proof to the contrary.

Neither the author, you nor I asserted, assert or ever will assert that “If ab is odd, then a is odd or b is even" simply because both a and b must logically, and as proven, be odd.

You were correct in the first place!

The rest is just a trip down a rabbit-hole.
In fact both the author and I prove that the statement is false
But the statement is true. The author proves as much:
To justify this claim, consider the contrapositive (to the above statement ), "If a is even and b is odd, then ab is even." so, suppose a = 2i, for some integer i. then ab = (2i)b = 2(ib); hence, ab is even.


odd(AB) => odd(A) || even(B)
!(odd(A) || even(B)) => !odd(AB)
even(A) && odd(B) => even(AB)
(assume: A = 2C)
even(A) && odd(B) => even(2CB)
even(A) && odd(B) => true
QED

Or equivalently:
odd(AB) => odd(A) || even(B)
odd(AB) => odd(A) && odd(B) => odd(A) || even(B)
odd(AB) => odd(A) && odd(B) => odd(A) || false
odd(AB) => odd(A) && odd(B) => odd(A)
odd(AB) => odd(A) && odd(B) => true
QED
But the statement is true. The author proves as much:

The statement I refer to in my comment is the one adam2016 and I are discussing which is “If ab is odd, then a is odd or b is even" - a statement both the author and I have proved and adam2016 has suspected (at least) not to be true. Clearly, by proof, the statement is completely and incontrovertibly false.

The author is discussing propositional logic justifications, not a true/false mish-mash of &&'s and ||'s. odd/even parity does not correspond to Boolean true/false.
I have no idea what on earth you're talking about. Please point to the proof (yours and/or the author's) that odd(AB) => odd(A) || even(B) is false.
Last edited on
I have no idea what on earth you're talking about.
I know.

Please point to the proof (yours and/or the author's) that odd(AB) => odd(A) || even(B) is false.


Too easy - I can't because the Example 2 proof which effectively says odd(ab) => odd(a) and odd(b) proves beyond any shadow of a doubt that there is no such place to point to.

Edit: My bad. I can in fact point to the place where the proof shows the statement is false, both the text book and my proof that both must be odd.
Last edited on
Oh, so you're saying that odd(ab) => odd(a) and odd(b). Okay, well, odd(a) and odd(b) <=> odd(a) and !even(b), therefore:
odd(a) or even(b) <=> true or false <=> true

In other words, a corollary of your proof that odd(ab) => odd(a) and odd(b) is that odd(ab) => odd(a) or even(b). If you have any errors to point out in this reasoning then please do so, otherwise admit that you're talking crap.
Read my edit. Bottom line is odd(ab) => odd(a) || even(b) is false
Yes, I'm in agreement. Both must be odd. Therefore one is odd inclusive-or the other one is even.
I'm sorry, but you can't circularly-reason your way of this: x and y implies x or !y.

Just run this:
1
2
3
4
5
6
7
bool implies(bool a, bool b){
    return !(a && !b);
}

for (int x = 0; x < 2; x++)
    for (int y = 0; y < 2; y++)
        std::cout << implies(x && y, x || !y) << std::endl;


adam2016: You've read the arguments. Draw your own conclusions. I'm done trying to reason with this buffoon.
Last edited on

a	b	ab    
even	even	even	contradiction because a is even, and ab is required to be odd
odd	even	even	contradiction because ab is required to be odd
even	odd	even	contradiction because a is even, and ab is required to be odd
odd	odd	odd	contradiction because b is odd


QED
Topic archived. No new replies allowed.
Pages: 123