Part 3: Truth Tables
Why Truth Tables Matter
Remember playing a board game where you check all possible moves before you make a decision? Truth tables do something similar for logical statements. They list every possible combination of truth values for your basic propositions (like "It's raining" or "I have an umbrella") and show whether a larger, compound statement (like "It's raining AND I have an umbrella") is true or false in each scenario.
Building on What We've Learned
In Part 2, we introduced the three connectives: * Negation: "not" (\(\neg\)) * Conjunction: "and" (\(\land\)) * Disjunction: "or" (\(\lor\), used in the inclusive sense)
Now, we'll systematically show how each connective behaves in every possible scenario of truth and falsehood. This helps us avoid mistakes like confusing exclusive and inclusive "or."
Connecting Back
In Part 2, we saw informal rules: * "\(\neg p\)" flips p's truth value. * "\(p \land q\)" is only true if both p and q are true. * "\(p \lor q\)" is true if either p is true, q is true, or both are true.
Truth tables make these rules crystal-clear by enumerating all possibilities.
Truth Table for Negation (\(\neg\))
Consider a single proposition p. It can be either true (T) or false (F).
\(p\) | \(\neg p\) |
---|---|
T | F |
F | T |
- If p is true, \(\neg p\) (not p) is false.
- If p is false, \(\neg p\) (not p) is true.
Flipping a Coin
- p = "The coin shows heads."
- \(\neg p\) = "It is not the case that the coin shows heads," i.e., "The coin shows tails."
When p is true (heads), \(\neg p\) is false (it's not tails). When p is false (not heads), \(\neg p\) is true (tails).
Truth Table for Conjunction (\(\land\))
When we deal with two propositions p and q, each can be either T or F. This means there are four possible combinations of truth values:
\(p\) | \(q\) | \(p \land q\) |
---|---|---|
T | T | T |
T | F | F |
F | T | F |
F | F | F |
\(p \land q\) is true only when both p and q are true. In every other case, \(p \land q\) is false.
Two Conditions for a Concert
Suppose: * p = "We have tickets." * q = "The venue allows entry."
- \(p \land q\) = "We have tickets and the venue allows entry."
For the concert outing to be successful (T), both conditions must hold: * If you don't have tickets, you can't get in. * If the venue is closed, you can't get in even if you have tickets.
The table clarifies that both must be T for the overall statement to be T.
Truth Table for Disjunction (\(\lor\))
Again, we look at two propositions p and q. The connective \(\lor\) (inclusive "or") is represented as follows:
\(p\) | \(q\) | \(p \lor q\) |
---|---|---|
T | T | T |
T | F | T |
F | T | T |
F | F | F |
\(p \lor q\) is true if at least one of p or q is true (inclusive). \(p \lor q\) is false only when both p and q are false.
Inclusive vs. Exclusive
In everyday language, people often say "or" to mean one or the other but not both (exclusive or). However, in standard logic, "\(p \lor q\)" includes the possibility that both might be true.
Example: * p = "I have a discount coupon." * q = "I have enough cash."
The statement \(p \lor q\) = "Either I have a discount coupon or I have enough cash, or both."
You can pay with cash or a coupon, and if you happen to have both*, even better—it's still valid.
Compound Truth Tables
We can also create truth tables for more complex expressions that combine multiple connectives. Let's look at an example:
Example: \(\neg p \lor (p \land q)\)
\(p\) | \(q\) | \(\neg p\) | \(p \land q\) | \(\neg p \lor (p \land q)\) |
---|---|---|---|---|
T | T | F | T | T |
T | F | F | F | F |
F | T | T | F | T |
F | F | T | F | T |
To build this table: 1. First list all combinations of truth values for \(p\) and \(q\) 2. Calculate \(\neg p\) in a separate column 3. Calculate \(p \land q\) in another column 4. Finally, combine these results to determine \(\neg p \lor (p \land q)\)
This methodical approach helps unravel even complex logical expressions.
Truth Tables and Decision-Making
Truth tables have practical applications in many fields:
Computer Science
- Circuit design: Engineers use truth tables to design logic gates
- Algorithm development: Programmers use them to map out all possible conditions
- Database queries: Database logic relies on truth tables for filtering information
Business Decision-Making
- Product launch criteria: "We'll launch if (market conditions are favorable) AND (production costs are under budget OR we secure additional funding)"
- Hiring decisions: "We'll hire a candidate if they have experience OR advanced education AND they pass the interview"
Everyday Problem-Solving
- Travel planning: "We'll take a vacation if (we have enough savings AND time off) OR (we find a great last-minute deal)"
- Home buying: "We'll make an offer if the house has enough bedrooms AND (is close to work OR has good public transportation)"
Common Misconceptions
"The truth table for 'or' in logic must exclude both being true."
Reality: We typically use the inclusive interpretation, allowing both to be true.
"A truth table is only for math classes and not relevant to everyday life."
Reality: Truth tables help clarify any situation with yes/no, true/false conditions, from planning events to troubleshooting devices.
"There's only one way to build a table for more than two propositions."
Reality: For three propositions, you have eight combinations of T/F (2³). For four, you have 16 combinations (2⁴), and so on.
"Truth tables are too complicated for simple logical reasoning."
Reality: Truth tables actually simplify complex reasoning by breaking it into a systematic, step-by-step process that eliminates ambiguity.
Exercises
3.1. Construct a truth table for exclusive or, often denoted by \(p \oplus q\). Hint: In exclusive or, the statement is true if p is true or q is true, but not both.
3.2. If you have three propositional variables (p, q, and r), how many rows would your truth table need?
Consider all possible combinations of T and F for p, q, and r.
3.3. Construct a truth table for the connective |, defined as "not ... and", i.e.,
$$
p \,|\, q \equiv \neg(p \,\land\, q)
$$
Show the truth values of p, q, and \(\neg(p \land q)\).
3.4. Create a truth table for \((p \lor q) \land \neg r\). How many rows will you need?
3.5. In everyday reasoning, we sometimes use the phrase "neither p nor q." Express this using our logical connectives and build its truth table.
3.6. Construct a truth table for the statement "If it's raining, I'll take an umbrella or wear a raincoat." Use \(p\) for "It's raining," \(q\) for "I'll take an umbrella," and \(r\) for "I'll wear a raincoat."
Real-World Application: Troubleshooting
Truth tables are excellent for systematic troubleshooting. Consider a car that won't start:
- \(p\) = "The battery is charged"
- \(q\) = "There is fuel in the tank"
- \(r\) = "The starter motor works"
For the car to start, we need: \((p \land r) \land q\)
A truth table would show all 8 possible combinations of these conditions, helping a mechanic methodically check each possibility rather than guessing randomly. This is why professional troubleshooting often follows a logical, systematic approach similar to working through a truth table.
Final Thoughts
By mastering truth tables, you're ensuring that no combination of truth values escapes your notice. It's a powerful way to see exactly why some compound statements are true or false, and it sets the stage for if-then statements, biconditionals, and more complex logical structures ahead.
Truth tables give us: * A visual representation of logical relationships * A systematic method for evaluating compound statements * A foolproof approach to analyzing complex expressions * A foundation for more advanced logical concepts
In the next part, we'll explore conditional statements ("if-then" statements) and see how truth tables help us understand when they're true or false.