Logic and Sets
Truth tables, quantifiers, set operations and De Morgan's laws.
Logic studies statements that are either true or false and how connectives combine them: and (), or (), not () and if-then (). Truth tables list every case. An implication is false only when is true and is false, and it is logically equivalent to its contrapositive , but not to its converse .
Set theory is the parallel language for collections. Union, intersection and complement correspond to or, and and not, and De Morgan's laws hold in both worlds: and .
Key terms
- De Morgan's law
- The negation of a conjunction is the disjunction of the negations.
Key ideas
- Contrapositive is equivalent; converse and inverse are not.
- De Morgan: negating flips and/or (or /) and negates each part.
- Inclusion-exclusion: .
- A set with elements has subsets.
Worked example
In a class of 30, 18 take French, 12 take Spanish and 5 take both. How many take neither?
- .
- Neither: .
- A Venn diagram shows 13 French only, 7 Spanish only, 5 both, 5 neither.
Answer:
Common mistakes
- Treating the converse as equivalent to the original statement.
- Negating 'and' as 'and'.
- Adding set sizes without subtracting the overlap.
Practice questions
Try each one, then open the answer. Numerical answers on this page are verified by an automated calculation check.
1.How many subsets does a 5-element set have?
Show answer
2., , . Find .
Show answer
3.How many rows does a truth table for 3 variables have?
Show answer