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

Pages: 123
I could be wrong but no from what I can tell (x && y) && !(x || y) will always be false.
Okay, then.

Now, assuming A => B, is it true that ((C => A) => (C => B))? Hint: (x => y) <=> !(x && !y)

That's what material implication is; P => Q means that under no circumstances P && !Q (i.e. !(P && !Q) is a tautology).


that kind of makes sense, I drew out a truth table and yes indeed P => Q <=> !(P && !Q)
but I'm still not sure how if there is no cases above that are true then (x && y) => (x || y).


assuming A => B, is it true that ((C => A) => (C => B))? Hint: (x => y) <=> !(x && !y)


I made a truth table for that statement, I hope that isn't cheating


C A B ~C ~A ~B  C => A  C => B  (C => A) => (A => B)
------------------------------------------------------------------
T T T  F  F  F    T       T            T
T T F  F  F  T            F
T F T  F  T  F    F                    T
T F F  F  T  T
F T T  T  F  F    T       T            T
F T F  T  F  T            T
F F T  T  T  F    T                    T
F F F  T  T  T



judging from my truth table if it's correct then yes (C => A) => (A => B)





O = odd

O(A) O(B)  O(A) ^ O(B)  O(A) v O(B)  O(A) ^ O(B) => O(A) v O(B)
---------------------------------------------------------------------------
  T     T               T                 T                              T
  T     F               F                 T                              T
  F     T               F                 T                              T
  F     F               F                 F                              T




Also from this truth table odd(A) || odd(B) => odd(A) && odd(B) right, since all the values are true

so as you said you can replace the odd(AB) = odd(A) && odd(B) with odd(AB) = odd(A) || odd(B), but when you read that paragraph how can one assume the author is going by propositional logic or by normal logic?

by normal logic odd(AB) != odd(a) || odd(b) as said before this would only result in an odd number if both operands in the consequent ( but can we even call it a consequent if we are not going by propositional logic? )

Last edited on
If starting from the same premises, "normal logic" makes you reach a different conclusion than propositional logic, which of the two is wrong? If it makes you reach the same conclusion, how is it different from propositional logic?
I'ts hard to answer.

If it makes you reach the same conclusion, how is it different from propositional logic?


but if you reach the same conclusion both are correct, but from normal logic odd(AB) will have to be odd(A) and odd(B) but in propositional logic odd(AB) = odd(A) || odd(B) but that means that odd(AB) could potentially equal 3(true) and 4(false), yes the first condition is true but we never check for the second since the first is true and the second condition could potentially be an even number
Last edited on
in propositional logic odd(AB) = odd(A) || odd(B)
No, that's plainly incorrect. Who ever said that?
odd(AB) => odd(A) || odd(B)
actually my bad

I should have said that odd(AB) =>odd(A) && odd(B) in normal logic

and in propositional odd(AB) => odd(A) || odd(B)

maybe I'm still messing up on the concept of implication.

*EDIT

is this truth table right?




O = odd

O(A) O(B)  O(A) ^ O(B)  O(A) v O(B)  ( O(A) ^ O(B) => O(A) v O(B) )
---------------------------------------------------------------------------
  T     T        T                 T                         T
  T     F        F                 T                         F
  F     T        F                 T                         T
  F     F        F                 F                         T




but isn't it always going to be the case that the second row in a material implication truth table will always be false ( ie when the antecedent is true and the consequent is false)?

but if that's always the case how does Odd(A) || Odd(B) => Odd(A) && Odd(B)? is it because both results in the truth table are matching?
Last edited on
I should have said that odd(AB) =>odd(A) && odd(B) in normal logic

and in propositional odd(AB) => odd(A) || odd(B)
That's still nonsense, because both (odd(AB) =>odd(A) && odd(B)) and (odd(AB) => odd(A) || odd(B)) are true statements, they just have different logical strength.

odd(AB) => odd(A) || odd(B)
is implied by
odd(AB) => odd(A) && odd(B)
is implied by
odd(AB) <=> odd(A) && odd(B)

There's no such thing as "normal logic". Again, if you reach a different conclusion from the same premises then the result is wrong (necessarily, in an axiomatic system with only two values). If the result is the same then it's just propositional logic.

is this truth table right?
No, that's wrong. Look carefully at the second and third rows. In both O(A) && O(B) is false and O(A) || O(B) is true, but the final result is different.
Last edited on
Oh ok I think I see the mistake



O(A) O(B)  O(A) ^ O(B)  O(A) v O(B)  ( O(A) ^ O(B) => O(A) v O(B) )
---------------------------------------------------------------------------
  T     T        T                 T                         T
  T     F        F                 T                         T   // this one 
  F     T        F                 T                         T
  F     F        F                 F                         T




second row - the reason why this is true is because the antecedent ( O(A) ^ O(B) ) is false but the consequent is O(A) v O(B) is true.

third row - I can't see the problem in the third row though. The antecedent is false and the consequent is true , so wouldn't this give true
Last edited on
I didn't say they were both wrong, I was merely pointing out that you reached different results by giving the same operands to the same operator:

Second row: (F => T) = F
Third row: (F => T) = T

Exactly one of those has to be wrong.
oh ok, so yes second row was wrong then.

so since all possible states are true does this mean O(A) ^ O(B) => O(A) v O(B) ?

BUT also if we add another to the table
 O(A) v O(B) => O(A) ^ O(B)  

all four conditions will also give us true


so does that also mean O(A) v O(B) <=> O(A) ^ O(B) , surely it can't?
Last edited on
so since all possible states are true does this mean O(A) ^ O(B) => O(A) v O(B) ?
Yes.

BUT also if we add another to the table

O(A) v O(B) => O(A) ^ O(B)


all four conditions will also give us true
Are you sure?
my bad no it doesn't give the same result, I'm still trying to wrap my head around implication



O(A) O(B)  O(A) ^ O(B)   O(A) v O(B)     O(A) v O(B) => O(A) ^ O(B) 
  T     T       T                T                       T                                     
  T     F       F                T                       F                         
  F     T       F                T                       F                         
  F     F       F                F                       T      




That table should be right



If it helps, try answering this: exactly what conditions should a counterexample number meet?



let me try this again a counterexample would be a number greater than 2 and that is a prime that isn't odd or in otherwords the antecedent is true and the consequent is false

so no 9 is not a counter example as 9 is not prime,

am I on the right track now?


and lastly how is odd(AB) => odd(A) || odd(B) is equivalent to odd(AB) => odd(A)?



I'm starting to understand material implication now ( I hope... at last ) but the author in the book never used the => operator the only things he mentions is

example: if ab is odd, then a is odd or b is even.

justification: To justify this claim, consider the contrapositive, "if a is even and b is odd, then ab is even". so, suppose a = 2i, for some integer . then ab = (2i)b = 2(ib); hence ab is even


how does one decipher that the author is implying odd(ab) => odd(a) || even(b) instead of just meaning if ab is odd then a is odd or b is even? two are very different statements right? the former being correct and the latter being false as both factors of an odd product have to be odd.
Last edited on
GIVEN:
“Let a and b be integers”

TO PROVE:
“If ab is even, then a is even or b is even” (Hypothesis) (Note that it's not an exclusive or)
Which is the same as:
“ab is even => a is even or b is even”

CONSTRUCTION: (there are actually 2 'constructions')
1. The contrapositive of that last statement is:
~(“a is even or b is even”) => ~(“ab is even”)
i.e.
~( (“a is even”) or (“b is even”) ) => ~(“ab is even”)

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

Which now becomes:
“a is odd” and “b is odd” => “ab is odd”

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

PROOF:
Let a,b be odd numbers 2i + 1, 2j + 1 respectively.
ab = 4ij +2i + 2j + 1 which is odd.
QED 
Last edited on
Way to go not reading the thread, dude.
huh?

let me try this again a counterexample would be a number greater than 2 and that is a prime that isn't odd or in otherwords the antecedent is true and the consequent is false

so no 9 is not a counter example as 9 is not prime,


but am I on the right track now?
Sorry, I didn't see your edit. That's correct.

and lastly how is odd(AB) => odd(A) || odd(B) is equivalent to odd(AB) => odd(A)?
Since AB = BA, you can can assign either factor to either variable.
If you have 21, you can say that

odd(3*7) => odd(3) || odd(7)

or that

odd(7*3) => odd(7) || odd(3)

It's literally the same statement, so if you just say

odd(AB) => odd(A)

you're saying the same thing: "at least one of the factors of an odd product is odd". Again, this is only possible because multiplication is commutative. In general it's not true that (x => y || z) <=>(x => y).

how does one decipher that the author is implying odd(ab) => odd(a) || even(b) instead of just meaning if ab is odd then a is odd or b is even? two are very different statements right?
No, they're identical. In a formal context (mathematics, science, engineering, etc.), if ... then is material implication.

the former being correct and the latter being false as both factors of an odd product have to be odd.
Reread: http://www.cplusplus.com/forum/lounge/265606/#msg1143839
No, they're identical. In a formal context (mathematics, science, engineering, etc.), if ... then is material implication.


ah that makes sense, never would have looked at it like that :o

starting to make sense now :)

one final question and this is pretty much the end of the question the author asks

justification: To justify this claim, consider the contrapositive, "if a is even and b is odd, then ab is even". so, suppose a = 2i, for some integer . then ab = (2i)b = 2(ib); hence ab is even


why does the author choose 2i for a? why not an odd number like 3 or 7?

thanks helios :)
why does the author choose 2i for a?
Read that quote again. The reason why is right there.
well anything multiplied by 2 will give an even number

Oh ok I think I get it, a is even b is odd, the reason we choose a is to test the contrapositive right?

if we choose 3 as a then a obviously won't be even.
so finally everything is clicking :)

but I wonder why the author gave such a confusing example, I mean wouldn't it have been more clear if he said if AB is odd then a is odd or b is odd ?

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.

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.
Last edited on
Pages: 123