Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Logic and Set Theory: A Comprehensive Guide with Examples - Prof. Go, Summaries of Engineering

A comprehensive overview of logic and set theory, covering key concepts, properties, and examples. It explores logical operators, truth tables, quantifiers, and de morgan's laws. Additionally, it delves into set theory, including operations like union, intersection, difference, and cartesian product. Well-structured and includes numerous examples to illustrate the concepts.

Typology: Summaries

2023/2024

Uploaded on 10/13/2024

ricah-mari-wong-preston
ricah-mari-wong-preston 🇵🇭

1 document

1 / 11

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
DISCRETE MATHEMATICS REVIEWER
MIDTERMS
I. LOGIC LAWS
1. Law of Identity
Statement: A proposition is always equal
to itself.
Symbolically:p p
Example:
Expression: A A
Simplified: Ais always equal to A.
Interpretation: "If it’s raining, then
it’s raining."
2. Law of Non-Contradiction
Statement: A proposition cannot be both
true and false at the same time.
Symbolically:¬(p ¬p)
Example:
Expression: (A ¬A)
Simplified: The statement (A and
not A) is always false.
Interpretation: "It cannot both be
raining and not raining at the same
time."
3. Law of Excluded Middle
Statement: A proposition is either true or
false; there is no middle ground.
Symbolically:p¬p
Example:
Expression: A¬A
Simplified: The statement A or not
Ais always true.
Interpretation: "Either it is raining,
or it is not raining."
4. Double Negation Law
Statement: The negation of the negation
of a proposition is the proposition itself.
Symbolically:¬(¬p) p
Example:
Expression: ¬(¬A)
Simplified: ¬(¬A) simplifies to A.
Interpretation: "It is not true that it
is not raining" means "It is raining."
5. De Morgan’s Laws
Statement: Negating a conjunction or
disjunction changes the operation
between "and" and "or".
Symbolically:
¬(p q) ¬p ¬q
¬(p q) ¬p ¬q
Example (Conjunction):
Expression: ¬(A B)
Simplified: ¬A ¬B
Interpretation: "It is not both
raining and cold" means "It is
either not raining, or it is not cold."
Example (Disjunction):
Expression: ¬(A B)
Simplified: ¬A ¬B
Interpretation: "It is not either
raining or cold" means "It is neither
raining nor cold."
6. Commutative Laws
Statement: The order of propositions in
conjunctions or disjunctions can be
swapped.
Symbolically:
For AND: pq q p
For OR: pq≡qp
Example (AND):
Expression: AB
Simplified: BA
Interpretation: "It is raining and
cold" is the same as "It is cold and
raining."
Example (OR):
Expression: AB
Simplified: BA
Interpretation: "It is raining or
cold" is the same as "It is cold or
raining."
7. Associative Laws
Statement: Grouping of propositions does
not change the truth value in conjunctions
or disjunctions.
Symbolically:
For AND: (p (q r)) ((p q)
r)
For OR: (p (q r)) ((p q)
r)
Example (AND):
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Logic and Set Theory: A Comprehensive Guide with Examples - Prof. Go and more Summaries Engineering in PDF only on Docsity!

DISCRETE MATHEMATICS REVIEWER

MIDTERMS

I. LOGIC LAWS

1. Law of IdentityStatement : A proposition is always equal to itself. ● Symbolically : p ≡ p ● Example : ○ Expression: A ≡ A ○ Simplified: A is always equal to A. ○ Interpretation : "If it’s raining, then it’s raining." 2. Law of Non-ContradictionStatement : A proposition cannot be both true and false at the same time. ● Symbolically : ¬(p ∧ ¬p) ● Example : ○ Expression: (A ∧ ¬A) ○ Simplified: The statement (A and not A) is always false. ○ Interpretation : "It cannot both be raining and not raining at the same time." 3. Law of Excluded MiddleStatement : A proposition is either true or false; there is no middle ground. ● Symbolically : p ∨ ¬p ● Example : ○ Expression: A ∨ ¬A ○ Simplified: The statement A or not A is always true. ○ Interpretation : "Either it is raining, or it is not raining." 4. Double Negation LawStatement : The negation of the negation of a proposition is the proposition itself. ● Symbolically : ¬(¬p) ≡ p ● Example : ○ Expression: ¬(¬A) ○ Simplified: ¬(¬A) simplifies to A. ○ Interpretation : "It is not true that it is not raining" means "It is raining." 5. De Morgan’s LawsStatement : Negating a conjunction or disjunction changes the operation between "and" and "or". ● Symbolically : ○ ¬(p ∧ q) ≡ ¬p ∨ ¬q ○ ¬(p ∨ q) ≡ ¬p ∧ ¬q ● Example (Conjunction) : ○ Expression: ¬(A ∧ B) ○ Simplified: ¬A ∨ ¬B ○ Interpretation : "It is not both raining and cold" means "It is either not raining, or it is not cold." ● Example (Disjunction) : ○ Expression: ¬(A ∨ B) ○ Simplified: ¬A ∧ ¬B ○ Interpretation : "It is not either raining or cold" means "It is neither raining nor cold." 6. Commutative LawsStatement : The order of propositions in conjunctions or disjunctions can be swapped. ● Symbolically : ○ For AND: p ∧ q ≡ q ∧ p ○ For OR: p ∨ q ≡ q ∨ p ● Example (AND) : ○ Expression: A ∧ B ○ Simplified: B ∧ A ○ Interpretation : "It is raining and cold" is the same as "It is cold and raining." ● Example (OR) : ○ Expression: A ∨ B ○ Simplified: B ∨ A ○ Interpretation : "It is raining or cold" is the same as "It is cold or raining." 7. Associative LawsStatement : Grouping of propositions does not change the truth value in conjunctions or disjunctions. ● Symbolically : ○ For AND: (p ∧ (q ∧ r)) ≡ ((p ∧ q) ∧ r) ○ For OR: (p ∨ (q ∨ r)) ≡ ((p ∨ q) ∨ r) ● Example (AND) :

○ Expression: A ∧ (B ∧ C) ○ Simplified: (A ∧ B) ∧ C ○ Interpretation : "It is raining and (cold and windy)" is the same as "(It is raining and cold) and windy." ● Example (OR) : ○ Expression: A ∨ (B ∨ C) ○ Simplified: (A ∨ B) ∨ C ○ Interpretation : "It is raining or (cold or windy)" is the same as "(It is raining or cold) or windy."

8. Distributive LawsStatement : Conjunction distributes over disjunction and vice versa. ● Symbolically : ○ p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r) ○ p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r) ● Example (AND over OR) : ○ Expression: A ∧ (B ∨ C) ○ Simplified: (A ∧ B) ∨ (A ∧ C) ○ Interpretation : "It is raining and (cold or windy)" means "It is raining and cold, or it is raining and windy." ● Example (OR over AND) : ○ Expression: A ∨ (B ∧ C) ○ Simplified: (A ∨ B) ∧ (A ∨ C) ○ Interpretation : "It is raining or (cold and windy)" means "Either it is raining or cold, and either it is raining or windy." 9. Idempotent LawsStatement : A proposition combined with itself using "and" or "or" is equivalent to the proposition itself. ● Symbolically : ○ For AND: p ∧ p ≡ p ○ For OR: p ∨ p ≡ p ● Example (AND) : ○ Expression: A ∧ A ○ Simplified: A ○ Interpretation : "It is raining and it is raining" is just "It is raining." ● Example (OR) : ○ Expression: A ∨ A ○ Simplified: A ○ Interpretation : "It is raining or it is raining" is just "It is raining." 10. Absorption LawsStatement : Combining a proposition with a conjunction or disjunction involving itself simplifies to the proposition. ● Symbolically : ○ p ∧ (p ∨ q) ≡ p ○ p ∨ (p ∧ q) ≡ p ● Example (AND with OR) : ○ Expression: A ∧ (A ∨ B) ○ Simplified: A ○ Interpretation : "It is raining and (it is raining or windy)" simplifies to "It is raining." ● Example (OR with AND) : ○ Expression: A ∨ (A ∧ B) ○ Simplified: A ○ Interpretation : "It is raining or (it is raining and windy)" simplifies to "It is raining." 11. Law of ImplicationStatement : An implication can be rewritten as a disjunction. ● Symbolically : p → q ≡ ¬p ∨ q ● Example : ○ Expression: A → B ○ Simplified: ¬A ∨ B ○ Interpretation : "If it is raining, then I will stay inside" is the same as "Either it is not raining, or I will stay inside." 12. Law of ContrapositionStatement : An implication is equivalent to its contrapositive. ● Symbolically : p → q ≡ ¬q → ¬p ● Example : ○ Expression: A → B ○ Simplified: ¬B → ¬A ○ Interpretation : "If it is raining, then I will stay inside" is the same as "If I do not stay inside, then it is not raining."

4. Tips for Negating Quantifiers ● Swap ∀ and ∃ when applying negation. ● Negate the predicate inside the quantifier. ● Simplify the resulting statement, if needed, using logical equivalences such as De Morgan’s laws. III. SET THEORY AND RELATED CONCEPTS Set Theory is a branch of mathematical logic that deals with sets, which are collections of distinct objects. Set theory serves as a foundational system for mathematics and helps formalize concepts such as relations, functions, and cardinality. 1. Basic Set ConceptsDefinition of a Set : A set is a collection of distinct and well-defined objects, known as elements. Sets are typically denoted by uppercase letters like A, B, and C. Elements are listed inside curly brackets, e.g., A = {1, 2, 3}. ● Notation : ○ {}: Denotes a set. ○ ∈: Means "is an element of." For example, if x is an element of set A, it is written as x ∈ A. ○ ∉: Means "is not an element of." For example, if 4 is not in A = {1, 2, 3}, it is written as 4 ∉ A. ● Empty Set : The set with no elements, denoted by {} or ∅. Example : Let B = {red, green, blue}. ● red ∈ B (red is in set B) ● yellow ∉ B (yellow is not in set B) 2. Russell's ParadoxDefinition : Russell's Paradox is a famous problem in set theory discovered by Bertrand Russell in 1901. It shows that not all sets can be defined in a straightforward manner without leading to contradictions. ● Explanation : Consider the set R defined as "the set of all sets that do not contain themselves as a member." Does R contain itself? If R is a member of itself, then by definition it should not be a member of itself, which is a contradiction. ● Formal Representation : If R = {x | x ∉ x}, then if R ∈ R, it implies R ∉ R. Conversely, if R ∉ R, then it must be that R ∈ R. This self-referential problem is the essence of Russell’s Paradox. Example : Imagine a library catalog listing all books that do not mention themselves. Does the catalog include itself? If it does, it shouldn't; if it doesn't, it should—resulting in a paradox. 3. Union of SetsDefinition : The union of two sets A and B, denoted as A ∪ B, is a set containing all elements that are in A, in B, or in both. It combines the elements of both sets without duplicates. ● Mathematical Representation : A ∪ B = {x | x ∈ A or x ∈ B} Example : Let A = {1, 2, 3} and B = {3, 4, 5}. ● A ∪ B = {1, 2, 3, 4, 5}. ● The common element 3 appears only once in the union. 4. Intersection of SetsDefinition : The intersection of two sets A and B, denoted as A ∩ B, is a set containing only the elements that are in both A and B. ● Mathematical Representation : A ∩ B = {x | x ∈ A and x ∈ B} Example : Let A = {1, 2, 3} and B = {3, 4, 5}. ● A ∩ B = {3}. ● Only the element 3 is common in both sets. 5. Difference of SetsDefinition : The difference of two sets A and B, denoted as A - B, is a set containing the elements that are in A but not in B.

Mathematical Representation : A - B = {x | x ∈ A and x ∉ B} Example : Let A = {1, 2, 3} and B = {3, 4, 5}. ● A - B = {1, 2}. ● The elements 1 and 2 are in A but not in B.

6. Complement of a SetDefinition : The complement of a set A, denoted as A' or A^c, is the set of all elements not in A, relative to a universal set U. If U is the set of all possible elements under consideration, then A' includes everything in U that is not in A. ● Mathematical Representation : A' = {x | x ∈ U and x ∉ A} Example : Let the universal set be U = {1, 2, 3, 4, 5} and A = {1, 2}. ● A' = {3, 4, 5}. ● These are the elements in U that are not in A. 7. Cartesian Product of SetsDefinition : The Cartesian product of two sets A and B, denoted as A × B, is the set of all ordered pairs (a, b) such that a ∈ A and b ∈ B. ● Mathematical Representation : A × B = {(a, b) | a ∈ A and b ∈ B} Example : Let A = {1, 2} and B = {x, y}. ● A × B = {(1, x), (1, y), (2, x), (2, y)}. 8. Power SetDefinition : The power set of a set A, denoted as P(A), is the set of all possible subsets of A, including the empty set and A itself. ● Mathematical Representation : If A = {1, 2}, then P(A) = {∅, {1}, {2}, {1, 2}}. Example : Let A = {a, b}. ● P(A) = {∅, {a}, {b}, {a, b}}.. 9. Venn DiagramsDefinition : Venn Diagrams are visual representations of sets. They use circles to represent sets and their relationships (intersections, unions, and complements). Example : If A and B are represented by two overlapping circles, then: ● The overlapping area represents A ∩ B. ● The combined area of both circles represents A ∪ B. ● The area outside of both circles is A' ∩ B'. Union (AB) : The entire area covered by both circles is lightly shaded. Intersection (A ∩ B) : The overlapping area of the two circles is shaded more prominently. Difference (A - B) : The part of Set A that does not overlap with Set B is highlighted separately. IV. PROPERTIES OF INTEGERS AND SEQUENCES Integers are whole numbers that can be positive, negative, or zero. Understanding their properties and how they relate to mathematical sequences is crucial in various fields, from number theory to

■ For a=7a = 7a=7, its additive inverse is −7-7− because 7+(−7)=07 + (-7) = 07+(−7)=0.

2. Types of Sequences 1. Arithmetic Sequence : ○ Definition : A sequence of numbers in which the difference between consecutive terms is constant. This difference is called the common difference (d). ○ General Form : an =a 1 +(n−1)d ■ Where: ■ a 1 = first term ■ d = common difference ■ n = position of the term in the sequence ○ Example : ■ Sequence: 2,5,8,11,14,…2, 5, 8, 11, 14, ■ Here, the common difference d=3d ■ General form: an=2+(n−1)× 2. Geometric Sequence : ○ Definition : A sequence in which each term after the first is obtained by multiplying the previous term by a fixed, non-zero number called the common ratio (r). ○ General Form : an =a 1 × r(n−1) ■ Where: ■ A 1 = first term ■ r = common ratio ■ n = position of the term in the sequence ○ Example : ■ Sequence: 3,6,12,24,48,..... ■ Here, the common ratio r=2. ■ General form: an=3×2(n−1) 3. Fibonacci Sequence : ○ Definition : A sequence in which each term is the sum of the two preceding terms, starting from 0 and 1. ○ General Form : an =an−1+an− for n ≥ 3n Where: ■ A 1 =0, A 2 = ○ Example : ■ Sequence: 0,1,1,2,3,5,8,13,21….

  1. Harmonic Sequence : ○ Definition : A sequence formed by taking the reciprocals of an arithmetic sequence. ○ General Form : an= 1/ a 1 + (n-1) d ■ Where: ■ a 1 = first term of the corresponding arithmetic sequence ■ d = common difference ○ Example : ■ Sequence: ½, ¼, ⅙, ⅛ ■ This is a harmonic sequence formed from the arithmetic sequence 2,4,6,8,… 3. Series
  2. Arithmetic Series : ○ Definition : The sum of the terms of an arithmetic sequence. ○ Formula : Sn = n/2 (a 1 + an) ■ Where: ■ Sn = sum of the first n terms ■ a 1 = first term ■ an = nth term ○ Example : ■ Sequence: 2,4,6,8, ■ Sum: S 5 =5/2(2+10)= 5/2 x 12 = 30
  3. Geometric Series :

Definition : The sum of the terms of a geometric sequence. ○ Formula : Sn=a 1 (1- rn/ 1- r) ○ For r is not equal to 1 ■ Where: ■ Sn = sum of the first n terms ■ a 1 = first term ■ r = common ratio ○ Example : ■ Sequence: 3,6,12, ■ Sum: S 4 =3(1−2^4 / 1−2)= 45

4. Special Integer Properties in Sequences 1. Prime Numbers : ○ Definition : A prime number is an integer greater than 1 that has no positive divisors other than 1 and itself. ○ Example : ■ Sequence of prime numbers: 2,3,5,7,11,13,17,… 2. Perfect Squares : ○ Definition : A perfect square is an integer that can be expressed as the square of another integer. ○ Example : ■ Sequence: 1,4,9,16,25,… V. MATRICES 1. Matrix Operations: Addition and Subtraction Definition: Matrices can only be added or subtracted if they have the same dimensions (same number of rows and columns). Addition and subtraction are performed element-wise. 2. Matrix Multiplication Definition: Matrix multiplication is done by taking the dot product of rows and columns. It is only possible if the number of columns in the first matrix equals the number of rows in the second matrix. 3. Determinants of Matrices Definition: The determinant is a scalar value that can be calculated for square matrices and gives information about the matrix, such as invertibility. 4. Inverse Matrices Definition: The inverse of a matrix A is denoted as A−1^ and satisfies AA−1=I, where I is the identity matrix

Gauss-Jordan Elimination: Reduced Row Echelon Form Cramer's Rule Cramer's Rule is a method used to solve a system of linear equations using determinants. It is applicable for square matrices (where the number of equations is equal to the number of unknowns). The method works by expressing the solution of each variable in terms of determinants. Cramer's Rule Overview For a system of equations represented as: AX=BAX = BAX=B Where: ● A is the coefficient matrix. ● X is the column matrix of variables. ● B is the constant matrix. Cramer's Rule Formula: Example 1: Solving a 2x2 System using Cramer's Rule

Example 2: Solving a 3x3 System using Cramer's Rule