in this video we're going to discuss truth tables now what are truth tables well truth tables will tell us all possible outcomes of statements and connectives so for instance let's recall that each statement is either true or false and true is a one false is a 0 we have some statements here like 32 is even and this just has a truth value so this is true which we can do as a tea or we can do with a 1 I'll show you both now and then we have another statement like a is a subset of
B if and only if X in B implies X in a this is false it is in fact the other way around so we can do an F or a 0 and these are really specific statements but what happens if we want to think about truth values for more general statements for instance what if we had X is even and we want to think of all possible outcomes well this is what tables are for and all connectives take a truth value and output a new truth value so depending on the connective the truth values can
change let's take a look at each connective individually and see how this affects our truth values so first of all we have a truth table and a truth table shows all possible combinations of truth conditions so for instance P can either be true or it can be false so what is negation do well if P is true then the negation of P is going to be false if P is false then the negation of P is going to be true so we can see that what the negation does is neg P just takes the value
of P or should I say it takes one and then subtracts P so for instance if P is equal to 1 as in the first row here then not P is equal to 1 minus P which is just equal to 0 so that's a nice mathematical way we can find the value of the negation let's take a look at connectors that involve more than one statement so for example conjunction and you will see either the carrot the + symbol or the dot for conjunction I will always use the carrot because it's typically used in most
discrete math texts okay so here conjunction it takes two statements and combines them so how do we build a truth table for two statements well Q can either be true or false and P can be true or false so all possible combinations well Q can be true false true false and then P world there's two situations where P will be true and to situations where P will be false and now we can see that we have all possible combinations of P's and Q's so if we have two statements we need four rows because each one
can be true or false which means that there's two possibilities for Q and two possibilities for P which means we need four roads if we have another statement R then we need another doubling because R can be true or false and we need to eight total rows so the number of rows is equal to 2 raised to the number of statements such as building a truth table now what does P and Q do to the truth out well P and Q is true only if P is true and Q is true so it's only true
in the first scenario where both P and Q are true in every other scenario it is false so what's the mathematical way of looking at this well you say the value of P and Q is just equal to the minimum of P and Q so for instance the minimum of P and Q in the first row is 1 because the lowest value between P and Q is 1 in the second row the minimum of P and Q is 0 because Q is the lowest value in the third row P is the lowest value at 0
and in the fourth row both P and Q are 0 so that's conjunction and of course conjunction is and let's take a look now at disjunction and disjunction you'll either see the V or you'll see a plus sign the plus sign more in abstract boolean algebra but what does P or Q do well P or Q is true if at least one of P Q are true which means in the first row is true because both are true in the second row is true because P is true in the third row it's true because Q
is true but in the fourth row neither P nor Q are true therefore P or Q is false so again mathematically we can think of this as P or Q just takes the maximum of P and Q so in the first row both are ones one is the highest value so it's true in the second row P is a one that's the highest value therefore it outputs a 1 in the third row Q is a 1 which is the highest value which means it outputs a 1 within the 4th row the highest value is 0
so we output a 0 that is disjunction now what about the conditional and the conditional we usually see the arrow and occasionally we see the superset symbol but this is more for philosophical logic and not seem too much in any math texts so this is an interesting one this is the truth patient for F P then Q and it is only false if P is true and Q is false the rest of the times it will be true and this is kind of hard to wrap our brains around and I'll emphasize this more in an
upcoming video on just conditionals on their own but for now let's say that I tell you if it's sunny I will wear sunscreen so let's say I tell you this when am i lying to you I am lying to you if it is sunny out which would be P is true and I'm not wearing sunscreen this is like my promise to you I'm saying look if it's sunny out I promise I will wear sunscreen and if it is sunny and I'm not wearing sunscreen I lied to you therefore the conditional is false but if it's
not sunny outside so I'm not lying to you am I it doesn't matter if I'm wearing sunscreen or not it's not sunny outside therefore I'm not violating any truth conditions therefore it is true in the bottom two cases and this is a very difficult thing to wrap our heads around because we think well if it didn't happen then we can't say it's true or false but think of the conditional in terms of when am i lying to you I'm only lying to you in this one situation so we say that mathematically anyway P arrow Q
is one if the value of P is less than or equal to Q so in the second scenario here one is not less than or equal to zero therefore we get a zero but everywhere else P is less than or equal to Q so we output a one and that's a mathematical way of looking at things if the explanation reasoning is just a little bit too confusing or maybe you don't accept it we can just define it in terms of these mathematics here so those are the four main connectives and they're truth tables but there's
two more connectives that we can define in terms of the other connectives but let's just treat them as if they're their own active for now the first one is the biconditional and this is usually if and only if so this is written if with two EPs or just if and only if and typically will use the double arrow here however some texts use the equivalency symbol this is like kind of weird to use I would never use this myself but I've seen it before so write it here just in case you encountered as well and
the way pnq works or P if and only if Q works is if P is equal to Q then we have that P arrow Q is equal to one so if they're the same value at outputs of one so when P and Q are both true the biconditional is true and when P and Q are both false the biconditional is true if the values are separate or different from each other then it's false so in the second row P is 1 and Q is 0 therefore it outputs a 0 if P is 0 and Q
is 1 it outputs a 0 because the values aren't the same that's the biconditional finally we have exclusive or an exclusive lawyer is really our idea of what war means in English so this is the opposite of the biconditional so if P is not equal to Q then P exclusive or Q is equal to 1 and typically we see it with the circle with the line through we might also see the disjunction with the little underlying both are commonly used I like the circle because it's very obvious that I'm talking about exclusive or and we
also use the same symbol in set theory sometimes so it's just the opposite of the biconditional so P true and Q true means that P exclusive or Q is false and similarly if they're both false then that also outputs a false but if the values are different such as in rows 2 & 3 we get true so those are truth tables in the next video we'll learn how to use these connectors and truth tables to prove that two statements are logically equivalent