0% found this document useful (0 votes)
18 views

Introduction To Logic

Uploaded by

tbcruz7476ant
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Introduction To Logic

Uploaded by

tbcruz7476ant
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Chapter 1: Formal Logic Discrete Structures

- Are the abstract mathematical structures used to


Structure represent discrete objects and relationships
- Something that is being established (gawa na) between these objects.
- The only thing we need to do is analyze how the - Include set, permutations, relations, graphs, trees,
process are being done and executed and finite—state machines.
- We are entitled to relate the first statement to
Discrete another statement to see the relationship between
- They are the same in a way that they are different. them.

Discrete Structure Algorithmic Thinking


- We are about to know what must be the difference - Muḥammad ibn Mūsā al-Khwārizmī is the man
of the same process that we are about to do. behind algorithm. (introduced algorithm to be able
- The process can be identified through the structure to solve a problem in a step-by-step arrangement.)
that is being given. - Certified classes of problems are solved by the
- Being distinct to each other specification of an algorithm.

Logic Application and Modelling


- Is answerable by yes or no, true or false. - Discrete mathematics has applications to almost
every conceivable are of study.
Introduction to Logic - There are many applications to computer science
and data networking.
Mathematics can be broadly classified into two - Modelling: we are following a pattern.
categories:
What is a Logic?
Continuous mathematics It is technically defined as “the science or study of how
- Continuous number line or the real numbers. to evaluate arguments and reasoning.”
- Almost always an infinite set of numbers.
Logical Reasoning
Discrete Mathematics - It is used in mathematics to probe theorems
- Involves distinct values; between any two points,
there are a countable number of points. Mathematical Logic (symbolic logic)
- If we have a finite set of objects, the function can - It is a branch of mathematics with close
be defined as a list of ordered pairs. connections to computer science.
- Involves discrete elements that use algebra and
arithmetic. Four Divisions:
- A very good tool for improving reasoning and 1. Set Theory
problem-solving capabilities. 2. Model Theory
3. Recursion Theory
- Algebra: is a branch of mathematics that deals 4. Proof Theory
with different types of equations. (ex. Quadratic,
linear equation, functions, real numbers, Mathematical Logic
proper/improper fraction)
- Arithmetic: being represented by addition, Definition: methods of reasoning, provides rules and
subtraction, multiplication, and division. There must techniques to determine whether an argument is valid.
be an operation within a given equation.
Theorem: a statement that can be shown to be true
Goals of Discrete Mathematics (under certain conditions)

Mathematical Reasoning Example: if x is an even integer, then x+1 is an odd


- Includes discussion of mathematical logic which integer. (This statement is true under the condition that x
serves as a foundation for the subsequent is an integer is true.)
discussion of method of proof. Let x = 98
x+1 =
Combinatorial Analysis (combine) 98+1 = 99
- An important problem-solving skill; is the ability to
count or enumerate objects.
- Includes the discussion of basic techniques of
counting.
A statement or a proposition is a declarative sentence Conjunction
that is either true or false, but not both. - Let p and q be statements. The conjunction of p
and q, written p^q, is the statement formed by
There must always be a constant variable that joining statements p and q using the word “and”
represents propositions. (P, Q, R) - The statement p^q is true if both p and q are true;
otherwise p^q is false.
Uppercase letters denote propositions
- P: 2 is an even number (true) P Q P^Q
- Q: 7 is an even number (false) F F F
- R: A is a vowel (true) F T F
T F F
The following are not propositions: T T T
- P: My cat is beautiful.
- Q: My house is big. Disjunction
- Let p and q be statements. The disjunction of p
Truth Value and q, written p˅q, is the statement formed by
One of the values “truth” (T) or “falsify” (F) assigned to a joining statements p and q using the word “or”
statement. - The statement p˅q is true if at least one of the
statements p and q is true; otherwise p˅q is false.
Ex. - The symbol ˅ is read “or”
1. Manila is the capital of the Philippines. (T)
2. What day it is? (T) P Q P˅Q
3. Help me, please. (F) F F F
4. He is handsome. (T) F T T
T F T
Logical Connectives
T T T
Proportional Variable
Negation
- It is a variable which used to represent a
- The negation of the statement p is denoted by ~p
statement.
where ~ is the symbol for not.
- If p is true, the symbol ~ is read as not, ~ is false
Logical Connectives
- Are used to combine simple statement which are
P Q ~P ~Q
referred as compound statement.
- and, or, if then, not, if and only if, exclusive-or F F T T
F T T F
Compound Statement T F F T
- It is a statement composed of two or more simple T T F F
statements connected by logical connectives.
- 1+1 = 2 AND 2+5 = 7 Conditional or Implication
- Let p and q be statement. The statement “if p then
Simple (atomic) statement q” is called an implication or condition.
- A statement which is not compound. - The conditional statement p → q is false only when
- 1+1 = 2 p is true and q is false.
- 2+5 = 7 - The implication “if p then q” is written p → q
- p is called the hypothesis; q is called the
Logical Connectives conclusion.

1. Conjunction (^) = and, but, also, in addition, P Q P→Q


moreover F F T
2. Disjunction (˅) = or F T T
3. Negation (~) = not, it is false that, it’s not the case T F F
that T T T
4. Conditional (→) = if then, only if, therefore, if,
whenever, is weaker than, is necessary condition. Bi-conditional (bi-implication)
5. Bi-conditional (↔) = if and only if, is equivalent to, - Let p and q be statement. The statement “p if and
is necessary and sufficient to. only if q” is called an bi-implication or bi-
6. Exclusive-or (⨁) = exclusive or conditional.
- If p and q are true or both false, then p ↔ q is true.
- If p and q have opposite truth values, then p ↔ q is
false.
- The bi-conditional “p if and only if q” is written p ↔ 1. (~p ^ q) → q
q
P Q ~P (~P ^ Q) (~P ^ Q) → Q)
P Q P↔Q F F T F T
F F T F T T T T
F T F T F F F T
T F F T T F F T
T T T
Logical Equivalence
Exclusive-or
- The exclusive-or of the statement p and q is the Logically Implies
compound statement p exclusive-or q. - An equation is considered as logically implies if p
- Symbolic, p xor q, where xor is the symbol for → q is tautology.
exclusive-or. - if then; conditional
- If p and q are true or both false, the p xor q is false.
- If p and q have opposite truth values, then p xor q Logically Equivalent
is true. - An equation is considered as logically implies if p
↔ q is tautology.
P Q P⨁Q - if and only if; bi-conditional
F F F
F T T
T F T
T T F

Precedence of logical connectives is:


• ~ = highest (NOT)
• ^ = second highest (AND)
• ˅ = third highest (OR)
• → = fourth highest (IF THEN)
• ↔ = fifth highest (IF AND ONLY IF)

Truth Tables

1. ~p ˅ ~q

P Q ~P ~Q ~P ˅ ~Q
Variation of Conditional Statement
F F T T T
F T T F T
Implication
T F F T T
T T F F F - Let p: Today is Sunday and q: I will wash the car.
- Conditional: p → q:
2. p → (p ↔ ~q) - If today is Sunday, then I will wash the car.
P Q ~Q (P ↔ ~Q) P → (P ↔ ~Q)
- The converse of this implication is written q → p
F F T F T
- If I was the car, then today is Sunday.
F T F T T
T F T T T
- The inverse of this implication is written ~p → ~p
T T F F F
- If today is not Sunday, then I will not wash the car.
Compound Statement
- The contrapositive of this implication is written ~q
→ ~p
1. Tautology – if all outputs are true.
- If I do not wash the car, then today is not Sunday.
2. Contradiction – if all outputs are false.
3. Contingency – there must be a false and true
output.

You might also like