Science Saturday OT: Logic Pt 1 – Deduction

 19 replies

Tony does his best to make you smarter, despite the comments section.

Here’s the first in a 3 part series on logic, which is obviously important for science. This first part will be on deduction, then next week will be on induction (which is the main method used in the sciences), and finally we’ll talk about the very controversial Bayesian logic.

Deduction is when you take a set of assumptions, apply rules to them, and reach a conclusion. Math is a form of deduction, as is computer programming (computers are essentially just deduction machines). These assumptions are either true or false, there is no in-between, and therefore the conclusions they reach are also either 100% true or 100% false.

These assumptions (and conclusions) are often represented by single letters. The most common are p and q, but I prefer using A and B since they’re a bit more distinctive. For example let’s say:

A: “It is raining outside”

B: “My driveway is wet”

With that in mind, let’s look at our first logical operation, NOT. (No, not the Wayne’s World not, the logical not)

ANOT A
TrueFalse
FalseTrue

This is called a truth table. It goes through all the possible truth values of the inputs and lists the truth value of the output. In this case we only have one input, so we only have 2 rows (A can be either true or false). As you can see (and as you could probably have guessed without a table), NOT is the opposite of whatever the original is. If A is “It is raining outside”, then NOT A would be “It is not raining outside”. So if it really is raining outside then A would be true and NOT A would be false. If it was sunny with no clouds then A would be false and NOT A would be true.

One last note before we move on, most of these logical operations have symbolic shorthand. NOT has a lot, on a keyboard ~ would be pretty common (~A = NOT A), while in writing software it would be ! (so != would be “not equals”).

Ok, let’s do AND.

ABA AND B
TrueTrueTrue
TrueFalseFalse
FalseTrueFalse
FalseFalseFalse

This truth table is a little more interesting since it has two inputs. As you can see, and as you would expect, AND is only true when both inputs are true. Using the A and B from above, if it is both raining outside and my driveway is wet, then A AND B would be true. But if my driveway is wet, but it’s not raining then A AND B would be false.

Now let’s do a slightly tougher one, OR.

ABA OR B
TrueTrueTrue
TrueFalseTrue
FalseTrueTrue
FalseFalseFalse

OR is tricky because it’s the first one to break the expectations set by it’s common English usage. Usually when somebody says “or” they mean one or the other, but not both. If you tell a kid they can have a chocolate bar or a pop, you’d be upset if they tried to get both. But in deduction it’s still considered true as long as one is true. The version that matches the English is called the exclusive or, represented as XOR (XOR is actually used a bit more in electronics, while OR is used more in programming).

AND and OR are kind of opposites (although obviously not exactly). A lot of times you use these with a big long list of statements (A OR B OR C OR D OR …) and you have to choose whether to use OR or AND to get the results you want. With OR, you want it to be true if even one item is true, with AND you want it to be true only if every item is true.

All of these so far have been pretty simple, but now we’re getting to the glue that holds all these together and make them actually do stuff, IF…, THEN…

ABIF A, THEN B
TrueTrueTrue
TrueFalseFalse
FalseTrueTrue
FalseFalseTrue

IF-THEN is used in English all the time. In fact, I’ve already used it in this article. It’s impossible to avoid. “If you kick a field goal, then you get 3 points.” “If you start writing a weekly science article in the offseason, then you’ll be stuck doing it for the rest of your life.”

This is where deduction gets interesting because there’s actually a bit of directionality to it. AND and OR are reversible. A AND B is the same as B AND A. But this is not so with IF-THEN. IF A THEN B is not the same as IF B THEN A. You can even check on the truth table if you want. (If you want one that is reversible then IF AND ONLY IF, or IFF, is the one you want.)

But it also gets a bit tricky. The first row of the truth table makes sense (A and B are both true, so of course IF A THEN B is true), and the second row also makes sense (If you say IF A, THEN B, and A is true, but B doesn’t follow, then that statement isn’t true). The third row also makes sense, although it’s a little weird (If A is false, then you’d expect B to also be false). But why is the 3rd row true?

Let’s go back to the raining (A) and the wet driveway (B). The statement becomes “IF it is raining outside THEN my driveway is wet”. Just from common knowledge we can see that this statement is true, so we know the second row (It is raining, but my driveway is not wet) is wrong. We also of course know the first row is right (Raining would cause my driveway to be wet). And the last row makes sense (If it’s not raining then it makes sense for my driveway to be wet).

But what if it’s not raining, but my driveway is wet anyway? Does that mean the statement “IF it is raining outside THEN my driveway is wet” is wrong? Not necessarily. There are other ways for my driveway to become wet. I could be watering the lawn and some of the water got on the driveway. I could be washing my car. Just because it’s not raining doesn’t mean other things couldn’t have caused the driveway to be wet, and that makes the statement as a whole true.

This is actually a common logical fallacy called affirming the consequent. Whether or not B is true tells you nothing about A, even though A being true means B must be true.

That’s the basics of deduction. Outside of math and computers deduction actually isn’t all the useful in everyday life. It’s when we get to induction where things start to get interesting.

3 2 votes
Article Rating
Subscribe
Notify of
19 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
upamtn
02/27/2021 11:59 am

Arrowhead is still the LOUDEST, and while I have no doubt those chefs are serving up some yummylicious food (for a price) it ain’t LC’s Burnt Ends (’nuff said) and it sure as hayl ain’t Arrowhead Tailgatin’

Seattle ups its outdoor dining game, Seahawks-style

https://apnews.com/article/nfl-seattle-seahawks-football-coronavirus-pandemic-seattle-ddaa8a7109e8631717597f72f917e260

Last edited 1 month ago by upamtn
Severely Concussed
Severely Concussed
02/27/2021 10:04 am
upamtn
02/27/2021 9:57 am

please feel free to deduce, induce or infer whatever you’d like from the image (below) and a “non 1-star rating”
comment image

rip58lovealways
rip58lovealways
Reply to  upamtn
02/27/2021 2:40 pm

My whole Day from start to hopefully a soon finish has been a giant train wreck.
I give up, feel beaten down and defeated. I want to get away…….

rip58lovealways
rip58lovealways
Reply to  rip58lovealways
02/27/2021 2:42 pm
upamtn
Reply to  rip58lovealways
02/27/2021 2:55 pm
rip58lovealways
rip58lovealways
Reply to  upamtn
02/27/2021 2:56 pm
rip58lovealways
rip58lovealways
Reply to  upamtn
02/27/2021 2:57 pm
rip58lovealways
rip58lovealways
Reply to  rip58lovealways
02/27/2021 2:55 pm
upamtn
Reply to  Tony Sommer
02/27/2021 9:56 am

wtg (?)

finally got appt for mine – 3/11 – I’m in the 2nd Group of ‘Sposed Ta Git ‘Em (65+)

upamtn
Reply to  Tony Sommer
02/27/2021 10:06 am

that’s cool … hope it works as advertised/expected/at all (of course, new variants keep coming around, so there’s that: outta the frying pan into the fire?)

we WILL get past this pandemic, it could have been much worse, but still … it could also have been dealt with FAR FAR better (esp here in the Good Ol’ U S of A, IMO)

anyway, I knew someone would post The Logical Song (as Concussed just did) … I have an IF/THEN song for everyone (my buddy Mick)

Severely Concussed
Severely Concussed
Reply to  Tony Sommer
02/27/2021 10:06 am

comment image

upamtn
Reply to  Severely Concussed
02/27/2021 10:08 am

but that requires morals … (angelic smile)

probablyamistake
probablyamistake
Reply to  Tony Sommer
02/27/2021 11:02 am

Season 6 Episode 23 GIF by SpongeBob SquarePants - Find & Share on GIPHY

vvet818
Reply to  Tony Sommer
02/27/2021 11:29 am

Getting my first one next Tuesday thanks to VA.

upamtn
Reply to  vvet818
02/27/2021 11:53 am

props and good luck!

vvet818
Reply to  upamtn
02/27/2021 2:09 pm

Thanks,you too.

19
0
Would love your thoughts, please comment.x
()
x