Presentation on theme: "Logic: Truth Tables Constructing a Truth Table. Truth Table A truth table for a compound statement is a list of the truth or falsity of the statement."— Presentation transcript:
Logic: Truth Tables Constructing a Truth Table
Truth Table A truth table for a compound statement is a list of the truth or falsity of the statement for every possible combination of truth and falsity of its components. In other words, a truth table helps to show whether a statement is true or false.
Rows To find the number of rows used in a truth table, take the number 2 raised to the power of the number of variables. For example, if there was a p statement and a q statement, there would be 2 variables, 2^2 is 4. If there were three statements, it would be 2^3, or 8 rows.
Columns The columns under the connectives /\, and \/, stand for the conjunction, and disjunction of the expression on the two sides of that connective.
Two statement table pq T Half the rows should be true T The rows should alternate T, F TF The result should be F Half the rows should be false T one of every possibility FFTT, TF, FT, FF
The three statement table pqr T Half of the rows T Alternate TT T Alternate T should be true, T and FF F T and F T the other half FT so that there is T should be false. FF one of every FTT possibility FTF TTT, TTF, TFT FFT ect. FFF
Negation Truth Table p~ p The opposite of p is ~p TFNot true is false FTNot false is true
Conjunction Truth Table pq p /\ qp and q TTT True only if both are true. TFF FTF FFF
Disjunction Truth Table pqp \/ qp or q TTT True if either on is true TFT FTT FFF False only if both are false
Lets fill out a table pqp\/ (or) (~p (not) /\ (and) q) TT TF FT FF
Negate the p column pqp\/ (or) (~p (not) /\ (and) q) TTF TFF FTT FFT
Fill the /\ column pqp\/ (or) (~p (not) /\ (and) q) TTFFT TFFFF FTTTT FFTFF
Copy the p column pqp\/ (or) (~p (not) /\ (and) TTTFF TFTFF FTFTT FFFTF
Fill in the \/ column using the p and the /\ columns pqP\/ (or) P and (~p/\p) (~p (not) /\ (and) (~p) and (p) p TTTTFFT TFTTFFT FTFTTTF FFFFTFF
Use the final column to determine what type of statements it is \/ (or) P and (~p/\p) Tautology Always True Contradiction Always False Contingency Sometimes true, sometimes false Txx Txx Txx Fxx
Contingency Some were true, while one was false. That makes this statement a contingency.
Real life example In case that was not entirely clear, lets take a look at an everyday example. Circuits. There are two different kinds of circuits, a series circuit and a parallel circuit. When the switch is closed the light will be on. However, with a series circuit, both switches have to be closed and with a parallel circuit only one switch has to be closed for the light to go on.
Series Circuits Switch pSwitch qLight Closed On Only on if both are closed ClosedOpenOff OpenClosedOff Open Off
Parallel Circuits Switch pSwitch qLight Closed On ClosedOpenOn OpenClosedOn Open Off Only off when both are open
Conclusion That concludes the Logic: Truth Tables lesson. For more information, consult Finite Mathematics by Berresford and Rockett. Or learn logic online: 2.htm 2.htm