Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

MATHEMATICAL CONCEPT

TOPIC 1: Proposition Example:


- It is declarative sentence which is either true or false, but Where p is the proposition “John’s PC has more than 16 GB
not both. free disk space” and q is the proposition “The processor in
- The truth value of the statement is the truth and falsity of John’s PC runs faster than 1 GHz.”
the statement. Answer:
The conjunction of these propositions, p ∧ q, can be
Logic expressed more simply as “John’s PC has more than 16 GB
- It is “THE SCIENCE OR STUDY OF HOW TO EVALUATE free hard disk space, and its processorruns faster than 1
ARGUMENTS AND REASONING” GHz.
- Other defines it as “DISCIPLINE THAT DEALS WITH THE
METHODS OF REASONING”. Disjunction
- LOGICAL REASONING IS USED ON MATHEMATICS TO PROVE - THE DISJUNCTION OF THE STATEMENT P, Q IS THE
THEOREMS, IN COMPUTER SCIENCE TO VERIFY THE COMPOUND STATEMENT “P OR Q”.
CORRECTNESS OF PROGRAMS AND TO PROVE THEOREMS. SYMBOLICALLY, P  Q, WHERE  IS THE SYMBOL ‘OR’.
- PROPERTY 2. IF P IS TRUE OR Q IS TRUE OR BOTH P OR Q
Mathematical Logic ARE TRUE, THEN P  Q IS TRUE; OTHERWISE P  Q IS FALSE.
- It is a branch of Mathematics with close connections to MEANING THE DISJUNCTION OF TWO STATEMENTS IS FALSE
computer science. ONLY IF EACH STATEMENT IS FALSE.
- It includes both the mathematical study of logic and the
applications of formal logic to other areas of mathematics. Truth Table for Disjunction
- It includes the study of the deductive formal proofs systems P Q P Q
and expressive formal systems. T T T
- It has four divisions: T F T
Set Theory F T T
Model Theory F F F
Recursion Theory
Proof Theory Example:
Where p is the proposition “John’s PC has more than 16 GB
TOPIC 2: Logical Connectives free disk space” and q is the proposition “The processor in
- A PROPOSITIONAL VARIABLE IS A VARIABLE WHICH USED TO John’s PC runs faster than 1 GHz.”
REPRESENT A STATEMENT.
- A FORMAL PROPOSITIONAL WRITTEN USING LOGIC Answer:
NOTATION, p, q, r, ARE USED TO REPRESENT STATEMENT. John’s PC has at least 16 GB free hard disk space, or the
- A COMPOUND STATEMENT IS A STATEMENT COMPOSED OF processor in John’s PC runs faster than 1 GHZ.
TWO OR MORE SIMPLE STATEMENTS CONNECTED BY - The use of the connective or in a disjunction corresponds to
LOGICAL CONNECTIVES “and”, “or”, “if then”, “if and only if”, one of the two ways theword or is used in English, namely, as
and “exclusive-or”. an inclusive or. A disjunction is true when at least one of the
two propositions is true.
Six Logical Main Connectives - For instance, the inclusive or is being used in the statement
1. Conjuction “Students who have taken calculus or computer science can
2. Negation take this class.” Here, we mean that students who have taken
3. Biconditional both calculus and computer science can take the class, as
4. 4. Disjunction well as the students who have taken only one of the two
5. Conditional subjects.
6. Exclusive-or - On the other hand, the exclusive or is used when a menu at
a restaurant states, “Soup or salad comes with an entrée,”
Conjuction the restaurant almost always means that customers can have
- THE CONJUNCTION OF THE STATEMENT P AND Q IS THE either soup or salad, but not both. Hence, this is an exclusive
COMPOUND STATEMENT “ P AND Q“. In SYMBOL, P Q, or, rather than aninclusive or.
where  is the symbol for “and”.
Exclusive-Or
Property 1: If P is true and q is true, then p  q is true; - THE EXCLUSIVE-OR OF THE STATEMENT P AND Q IS THE
otherwise p  q is false. Meaning , the conjunction of two COMPUND STATEMENT “P EXCLUSIVE-OR Q.”
statements is true only if each statement is true. SYMBOLICALLY, P  Q, WHERE  IS THE SYMBOL FOR
“EXCLUSIVE-OR.”
Truth Value For Conjuction - PROPERTY 6. IF P AND Q ARE TRUE OR BOTH FALSE, THEN P
P Q P Q  Q IS FALSE; IF P AND Q HAVE OPPOSITE TRUTH VALUES,
T T T THEN P  Q IS TRUE.
T F F - IT CAN BE NOTED THAT THE TRUTH VALUES OF P  Q IS THE
F T F NEGATION OF THE TRUTH VALUES OF P Q.
F F F
“John will find a good job when he learns discrete
Truth Value for Exclusive-Or mathematics.”
P Q P Q “For John to get a good job, it is sufficient for him to learn
T T F discrete mathematics.”and
T F T “John will find a good job unless he does not learn discrete
F T T mathematics.
F F F
Special names or Conditional Statements
Example: - Coverse
“It is not the case that John’s PC runs Linux.” - Contrapositive
This negation can be more simply expressed as “John’s PC - Inverse
does not runLinux.”
Some new conditional statements can be form starting with a
Negation conditional statementp → q
- THE NEGATION OF THE STATEMENT P IS DENOTED BY P,
WHERE  IS THE SYMBOL FOR “NOT’. The following are the three related conditional statements:
- PROPERTY 3: IF P IS TRUE, P IS FALSE. MEANING THE
TRUTH VALUE OF THE NEGATION OF A STATEMENT IS The proposition q → p is called the converse of p → q.
ALWAYS THE REVERSE OF THE TRUTH VALUE OF THE The contrapositive of p → q is the proposition ¬q → ¬p.
ORIGINAL . The proposition ¬p → ¬q is called the inverse of p → q.

Conditional Example:
- THE CONDITIONAL (OR IMPLICATION) OF THE STATEMENT P conditional statement “The home team wins whenever it is
AND Q IS THE COMPOUND STATEMENT “IF P THEN Q”. raining?”
SYMBOLICALLY, P  Q, WHERE  IS THE SYMBOL FOR “ IF
THEN”. Answer:
P IS CALLED HYPOTHESIS (OR ANTECEDENT OR PREMISE) AND Because “q whenever p” is one of the ways to express the
Q IS CALLED CONCLUSION (OR CONSEQUENT OR conditional statementp → q, the original statement can be
CONSEQUENCE). rewritten as:
- PROPERTY 4: THE CONDITIONAL STATEMENT P Q IS FALSE “If it is raining, then the home team wins.”
ONLY WHEN P IS TRUE AND Q IS FALSE; OTHERWISE P  Q IS
TRUE. MEANING P  Q STATES THAT A TRUE STATEMENT The contrapositive of this conditional statement is
CANNOT IMPLY A FALSE STATEMENT. “If the home team does not win, then it is not raining.”
The converse is “If the home team wins, then it is raining.”
Truth Value for Conditional The inverse is “If it is not raining, then the home team does
P Q P Q not win.”
T T T
T F F Bi-conditional
- THE BICONDITIONAL OF THE STATEMENT P AND Q IS THE
F T T
COMPOUND STATEMENT “P IF AND ONLY IF Q”.
F F T
SYMBOLICALLY, P  Q, WHERE  IS THE SYMBOL FOR “IF AND
ONLY IF”.
- PROPERTY 5: 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.
- Bi-conditional are also called Bi-implications.
P Q P Q
T T T
T F F
F T F
Example: F F T
p: “John learns discrete mathematics”
q :“John will find a good job.” There are some other common ways to express p ↔ q:
“p is necessary and sufficient for q”
Answer: “if p then q, and conversely” “p iff q.”
p → q represents the statement “If John learns discrete
mathematics,then she will find a good job.” Example:
p: “You can take the flight”
There are many other ways to express this conditional q : “You buy a ticket.”
statement in English. Among the most natural of these are:
Answer:
p ↔ q represents the statement:
“You can take the flight if and only if you buy a ticket.”

TOPIC 3: Truth Values of Compound Propositions


- The truth values of the compund proposition for each
combination of truth values of the propositional in it is found
in the final column of the table.

P Q
T T F F T
T F F F T
F T T T T
F F T F T
TOPIC 5: Rules of Inference And Proving
THREE IMPORTANT CLASSES OF COMPOUND STATEMENTS - Most of the rules of inference are from tautologies. Since
1. Tautology is a compound propositions that is true for all tautology is a statementwhich is “always true”, it is use in
possible combination of thetruth values of the propositional drawing conclusions. Logic proofs usually begin with
variables also called logically true. premises- statements that are allowed to be assumed, while
2. Contradiction is a compound propositions that is false for conclusion is the statementthat need to be proven. The idea
all possible combinationsof the truth values of its is to make use of the pre
propositional variables also called logically false or absurdity. mises using rules of inferenceuntil we arrive at the
3. Contingency is a compound propositions that can either
true or false, depending onthe truth values of the
propositional variables are neither tautology or
contradiction.

TOPIC 4: Logic and Bit Operations


- A bit can be used to represent a truth value, because there
are two truth values,namely, true and false. As is customarily
done, a 1 bit is use to represent true and a 0 bit to represent conclusion. Table below shows the rules of inference in logic.
false. That is, 1 represents T (true), 0 represents F (false). A
variable is called a Boolean variable if its value is either true
or false. Consequently, a Boolean variable canbe represented
using a bit

Truth Value Bit


T 1
F 0

- Computer bit operations correspond to the logical


connectives. By replacing true by a one and false by a zero in
the truth tables for the operators ∧, ∨, and ⊕, the tables
shown in Table below for the corresponding bit operations
are obtained. We will also use the notation OR, AND, and
XOR for the operators ∨, ∧, and ⊕, as is done in
variousprogramming languages.

X Y X∨Y X∧Y X⊕Y


0 0 0 0 0
0 1 1 0 1
1 0 1 0 1
1 1 1 1 0

- A bit string is a sequence of zero or more bits. The length of


this string is the number of bits in the string.
- Bit operations can be extended to bit strings. Let the bitwise
OR, bitwise AND,and bitwise XOR of two strings of the same
length to be the strings that have as their bits the OR, AND,
and XOR of the corresponding bits in the two strings,
respectively. The symbols ∨, ∧, and ⊕ are used to represent
the bitwise OR, bitwi.se AND, and bitwiseXOR operations,
respectively

You might also like