Mathematical Logic
Set Theory
- A set
is a list of items, called elements, enclosed in curly braces and
separated by commas.
- The empty
set is a set containing no elements, and is denoted by empty curly
braces, “{} “.
- A subset
of another set only contains some or all of the other set.
- An intersection
of two sets contains only the common elements found in both sets. It is
also called a conjunction, and is denoted by a “ ∩
“.
Example: If set A = {1, 2, 3} and set B = {3,
4, 5},
then
the intersection of set A and Set B is the set {3}:
A ∩ B
= {3}
- A union
of two sets contains all the elements found in both sets. It is also
called a disjunction, and is denoted by a “ U “.
Example: If set A = {1, 2, 3} and set B = {3,
4, 5},
then
the union of set A and Set B is the set {1, 2, 3, 4, 5}:
A U B = {1, 2, 3, 4, 5}
A Venn Diagram is a graphical representation of sets using
circles (potentially overlapping) to visually show set interactions.
Example:
Boolean Logic
- Similar to Set Theory, but uses only two elements:
True and False, T and F, 1 and 0.
- A Truth
Table shows all possible combinations of inputs and the result of
those combinations.
- The AND function takes two or more inputs and gives the
result of True only when all the inputs are True. It is denoted by a “ ∙ “.
Truth Table:
|
A
|
B
|
A ∙ B
|
|
F
|
F
|
F
|
|
F
|
T
|
F
|
|
T
|
F
|
F
|
|
T
|
T
|
T
|
- The OR function takes two or more inputs and gives the
result of True when any input is True. It is denoted by a “ + “, or sometimes a “ | “.
Truth Table:
|
A
|
B
|
A + B
|
|
F
|
F
|
F
|
|
F
|
T
|
T
|
|
T
|
F
|
T
|
|
T
|
T
|
T
|
- The NOT function takes one input and gives a result opposite
of the input. It is denoted by a “ ~ “.
Truth Table: