- WELCOME TO A LESSON ON TRUTH TABLES FOR COMPOUND STATEMENTS.
THE GOALS ARE TO DEFINE THE SYMBOLS USED IN TRUTH TABLES
AND COMPLETE TRUTH TABLES FOR COMPOUND STATEMENTS.
SO HERE ARE THE MOST COMMON SYMBOLS USED FOR LOGIC
AND TRUTH TABLES:
THE NEGATION SYMBOL, WHICH MEANS NOT,
THE IF-THEN SYMBOL, IF AND ONLY IF,
THE CONJUNCTION OR AND SYMBOL,
AND THE OR OR DISJUNCTION SYMBOL.
LET'S START BY MAKING THE MOST BASIC TRUTH TABLE FOR P
AND NOT P.
SO THERE ARE TWO OPTIONS FOR P-- EITHER IT'S TRUE OR IT'S FALSE.
AND THERE ARE ALSO TWO OPTIONS FOR NOT P.
NOT P CAN ALSO BE TRUE OR FALSE,
BUT NOTICE P AND NOT P CAN'T BOTH BE TRUTH
AND P AND NOT P CAN'T ALSO BE FALSE.
TO MAKE SENSE OF THIS WE CAN THINK OF P AS AN EVEN NUMBER
AND NOT P AS AN ODD NUMBER.
SO IF IT'S TRUE THAT OUR NUMBER IS EVEN,
IT'S FALSE THAT IT WOULD BE ODD.
AND IF IT'S FALSE THAT IT'S EVEN,
IT WOULD BE TRUE THAT IT'S ODD,
ASSUMING WE'RE TALKING ABOUT INTEGERS OR WHOLE NUMBERS.
NOW LET'S LOOK AT THE TRUTH TABLE OF CONJUNCTION.
TO DO THIS WE'LL MAKE A TRUTH TABLE INCLUDING P, Q,
AS WELL AS P AND Q.
SO NOTICE WE HAVE THREE COLUMNS.
BECAUSE THERE ARE TWO OPTIONS FOR P BEING TRUE OR FALSE,
AND TWO OPTIONS FOR Q BEING TRUE OR FALSE,
WE'RE GOING TO HAVE TO HAVE FOUR ROWS
TO LIST ALL THE POSSIBLE COMBINATIONS OF P AND Q
BEING TRUE OR FALSE AS WE SEE HERE AND HERE.
SO WE'RE GOING TO MAKE TWO TRUES AND TWO FALSES.
SO FOR THE FIRST ROW WE'LL HAVE TRUE-TRUE.
WE COULD ALSO HAVE TRUE-FALSE.
AND THEN WHEN P IS FALSE WE COULD HAVE FALSE-TRUE
AS WELL AS FALSE-FALSE.
NOW TO MAKE SENSE OF THIS LAST COLUMN...
NOW THERE'S A COUPLE WAYS TO MAKE SENSE OF THIS THIRD COLUMN.
IN ORDER FOR P AND Q TO BE TRUE,
AND MEANS BOTH P AND Q MUST BE TRUE,
OTHERWISE P AND Q WOULD BE FALSE.
SO NOTICE THE ONLY TRUE IN THIS COLUMN OCCURS
WHEN P AND Q ARE BOTH TRUE.
EVERYTHING ELSE IS FALSE.
AN EXAMPLE OF THIS WOULD BE,
IF P IS TRUE THE NUMBER IS DIVISIBLE BY 2,
IF Q IS TRUE, THE NUMBER IS DIVISIBLE BY 3.
SO IF P AND Q ARE TRUE,
THE NUMBER WOULD BE DIVISIBLE BY 2 AND 3, OR BY 6.
AND THE ONLY TIME A NUMBER IS DIVISIBLE BY 6
IS IF IT'S DIVISIBLE BOTH BY 2 AND 3.
IF IT'S DIVISIBLE BY 2 BUT NOT BY 3, IT'S NOT DIVISIBLE BY 6.
IF IT'S NOT DIVISIBLE BY 2 BUT IS DIVISIBLE BY 3,
IT'S STILL NOT DIVISIBLE BY 6.
AND IF IT'S NOT DIVISIBLE BY 2 AND 3,
IT'S NOT DIVISIBLE BY 6.
NOW LET'S TAKE A LOOK AT THE TRUTH TABLE FOR DISJUNCTION.
SO THE SETUP IS VERY SIMILAR TO THE PREVIOUS SLIDE,
EXCEPT NOW THE THIRD COLUMN IS P OR Q.
SO FOR P OR Q TO BE TRUE IT ONLY TAKES EITHER P TO BE TRUE
OR Q TO BE TRUE.
SO NOTICE HOW THE ONLY TIME P OR Q IS FALSE
IS WHEN BOTH P AND Q ARE FALSE.
IF THEY'RE BOTH TRUE IT'S TRUE, IF P IS TRUE IT'S TRUE,
AND IF Q IS TRUE IT'S TRUE.
AGAIN, LOOKING AT AN EXAMPLE,
WE'RE SAYING P REPRESENTS DIVISIBILITY BY 2,
Q DIVISIBILITY BY 3,
BUT NOW P OR Q IS DIVISIBLE BY 2 OR 3.
SO THE FIRST ROW, IF THE NUMBER IS DIVISIBLE BY BOTH,
IT'S DIVISIBLE BY 2 OR 3.
IF IT'S DIVISIBLE BY 2 BUT NOT 3, IT'S DIVISIBLE BY 2 OR 3.
IF IT'S DIVISIBLE BY 3, IT'S DIVISIBLE BY 2 OR 3.
AND IF IT'S DIVISIBLE BY NEITHER,
IT'S NOT DIVISIBLE BY 2 OR 3.
LET'S GO AND TAKE A LOOK AT ONE MORE EXAMPLE OF DISJUNCTION
AND THEN ONE MORE EXAMPLE OF CONJUNCTION.
SO THIS ONE THEY WANT US TO MAKE A TRUTH TABLE FOR NOT P, Q,
AND NOT P OR Q.
SO IT'S PRETTY COMMON IF THEY WANT NOT P TO ALSO LIST P.
WE LIST P AS TRUE-TRUE-FALSE-FALSE,
SO NOT P WOULD BE FALSE-FALSE-TRUE-TRUE,
AND THEN WE LIST Q.
NOTICE IN ORDER TO DETERMINE NOT P OR Q
WE'RE ONLY GOING TO LOOK AT THE SECOND COLUMN
AND THE THIRD COLUMN.
SO WE HAVE FALSE-TRUE-FALSE-FALSE
AND THEN TRUE-TRUE-TRUE-FALSE.
REMEMBER, FOR DISJUNCTION THIS MEANS OR.
IN ORDER FOR THIS TO BE TRUE
IT ONLY TAKES NOT P OR Q TO BE TRUE,
SO ONLY ONE OF THEM HAS TO BE TRUE.
SO IN OTHER WORDS, THIS IS TRUE BECAUSE Q IS TRUE,
THIS IS FALSE BECAUSE THEY'RE BOTH FALSE,
THIS IS TRUE BECAUSE THEY'RE BOTH TRUE,
AND THIS IS TRUE BECAUSE NOT P IS TRUE.
SO AGAIN, OR OR DISJUNCTION ONLY REQUIRES ONE OF THEM TO BE TRUE.
AND FOR THE LAST EXAMPLE WE'LL TAKE A LOOK AT CONJUNCTION,
MORE SPECIFICALLY THE CONJUNCTION OF NOT P AND NOT Q.
SO WE'LL LIST P, Q, NOT P, NOT Q.
AND NOTICE THAT P AND NOT P ARE JUST THE OPPOSITE,
MEANING WHEN P IS TRUE NOT P IS FALSE.
AND WHEN P IS FALSE NOT P IS TRUE.
AND THE SAME FOR Q AND NOT Q.
AND TO COMPLETE THIS LAST COLUMN OF THE TRUTH TABLE
WE'RE ONLY LOOKING AT THE THIRD AND FOURTH COLUMNS.
AND SINCE WE'RE TALKING ABOUT CONJUNCTION, WHICH MEANS AND,
BOTH OF THESE COLUMNS MUST BE TRUE
IN ORDER FOR NOT P AND NOT Q TO BE TRUE,
OR THE CONJUNCTION OF NOT P AND NOT Q.
AND NOTICE THE ONLY TIME WE HAVE TRUE, RIGHT HERE,
IS WHEN BOTH ARE TRUE.
EVERYTHING ELSE IS FALSE.
AND WE'LL STOP HERE FOR THIS VIDEO.
I HOPE YOU FOUND THIS HELPFUL.