HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
Â
Chapter 1
1. SUBTOPIC 1 : PROPOSITIONS AND LOGICAL OPERATIONS.
1.1 Propositional Logic.
Definition
A proposition is a declarative sentence that is either TRUE or FALSE, but NOT BOTH.
For the example of declarative sentence that are not propositions:
Zulhelmy will not win the Thomas cup this year.
X+1=3
For the example of declarative sentence that are not propositions:
Kuala Lumpur is a capital of Malaysia.
2+2=4
Notation
We use letters to denote propositional variables (or statement variables) that is , variables
that represent propositions , just as a letters are use to denote numerical variables. The
conventional letters used to denote numerical variable. The conventional letters used for
propositional variables are p , q , r , s ,âŠ.. The area of logic that deals with propositions is
called propositional calculus or propositional logic.
Logic is more precise than natural language. The study of the principles of reasoning,
especially of the structure of propositions as distinguished from their content and of method and
validity in deductive reasoning.
1
2. Examples :
- You may have a chiken rice or spagethi ( vague )
Can I have a both?
- If you buy this karipap in advance, its cheaper.
Are there not cheap last minute karipap?
For the reason, logic is used for hardware and software specification such as given a set
logic statement and one can decide whether or not they are satisfiable, although this is a costly
process.
By George Boole, born on November 2 , 1815 in Lincoln , England. Died on December 8,
1864 in Ballintemple, Ireland at 49 years old.
In 1854, George Boole established the rules of symbolic logic in his book , The Laws Of
Though.
USE OF LOGIC GATES
Logic gates are the building block of digital electronics. They are formed by the
combination of transistors to make digital operations possible.
Every digital product like a computer, mobile phones, calculator even digital watch contains
logic gates. Thatâs mean, the logic gates are very important in the electric and electronics to
know the solution of every components.
2
3. Propositional Logic â Negation is another propositions. Let p be a proposition. The
compound proposition is âit is not the case that pâ. It called the negation of p and the denoted of
âp. The truth value of the negation of p is the opposite of the truth value of p. The proposition âp
is also can say as ânot pâ.
Example:
Discrete mathematics is Hasrulâs favorite subject. ( p )
Discrete mathematics is NOT Hasrulâs favorite subject. ( âp )
Truth the table for negation :
p âp p âp
True False or T F
False True F T
Table A Table B
The truth table presents the relations between the truth values of many propositions
involved in a compound proposition. This table has a row for each possible truth value of
propositions.
Logical operators are more interesting statements can be created through the combination
of two propositions using logical operators. Operators use to combine propositions and the result
of connecting two propositions is another proposition. The common logical are AND (Ë),OR
(Ë and NOT OR (â).
)
3
4. Propositional Logic â Conjunction is a compound proposition that has components
joined by the word and or its symbol and is true only if both or all the components are true. Let p
and q be propositions. The compound proposition âp and qâ or we can say that âp Ë qâ, is true
when both p and q are true and false otherwise. For the example in a sentence are:
Faiz is a singer (p) and dancer (q).
Truth the table for conjunction:
p q pËq
T T T
T F F
F T F
F F F
Propositional Logic â Disjunction is a proposition that presents two or more alternative
terms, with the assertion that only one is true. Let p and q be propositions. The compound
proposition âp or qâ or âp Ë qâ, is false when both p and q are false and true otherwise. The
compound proposition âp Ë qâ is called disjunction of p and q.
For the example in a sentence are:
Faiz is a singer (p) or dancer (q).
Truth the table for disjunction:
p Q pËq
T T T
T F T
F T T
F F F
4
5. Propositional Logic â Exclusive Disjunction is a Logic the connective that gives the
value true to a disjunction if one or other, but not both, of the disjunction are true. Let p and q be
proposition. The compound proposition âp exclusive or qâ, denoted âp â qâ, is true when
exactly one of p and q is true and is false otherwise. This compound proposition âp â qâ is
called exclusive disjunction of p and q.
For the example in a sentence are:
You can have a PS2 (p) or PSP (q).
Truth the table for the exclusive disjunction:
p q pâq
T T F
T F T
F T T
F F F
5
6. EXERCISE:
1. Write the truth table of each proposition
a) p Ë âq
b) (p Ë q) Ë âp
2. Formulate the symbolic expression in words using.
p: you play football
q: you miss the midterm exam
r: you pass the course
a) p Ë q
b) â (p Ë q) Ë r
6
7. SUBTOPIC 2 : CONDITIONAL STATEMENT
2.1 CONDITIONAL
Propositional Logic â Implication mean that the operator that forms a sentence from two
given sentences and corresponds to the English if ⊠then ⊠Let p and q be propositions. The
compound proposition âif p then qâ, denoted âp â qâ, is false when p is true and q is false, and
is true otherwise. This compound proposition p â q is called the implication (or the conditional
statement) of p and q.
In this implication, p is called hypothesis ( or antecedent or premise ) and q is called the
conclusion ( or consequence ).
Example:
If muzzamer is the agent of Herbalife (p), then he used the product (q).
If p, then 2 + 2 = 4.
Truth the table for the implication:
p q pâq
T T T
T F F
F T T
F F T
REMARKS:
- The implication p â q is false only when p is true then q is false.
- The implication p â q is true when p is false whatever the truth value of q.
7
8. THE IMPLICATION:
Variety of terminology is used to express the implication p â q
If p then q
p implies q
q is p
p only if q
q when p
p is sufficient for q
a sufficient condition for q is p
q follows from p
q whenever p
In natural language, there is a relationship between the hypothesis and the conclusion of
an implication. In mathematical reasoning, we consider conditional statements of a more general
sort that we use in English. The implication
âif today is Friday , then I pray in the mosque â
Is true every day except Friday, even though I pray in the mosque is false.
The mathematical concept of a conditional statement is independent of a cause and effect
relationship between hypothesis and conclusion. We only parallel English usage to make it easy
to use and remember.
8
9. 2.2 BICONDITIONAL
Definition: let P and Q be two propositions. Then, P â Q is true whenever P and Q
have the same truth values. The proposition P â Q is called biconditional or equivalence,
and it is pronounced âP if and only if Qâ. When writing, one of frequently uses âiffâ as an
abbreviation for âif and only ifâ.
The truth table is given above. The following is an example of a biconditional. Let P be the
proposition that âx is evenâ and Q be the proposition that âx is divisible by 2.â In this case, P â
Q expresses the statement âx is even if and only if x is divisible by 2.â
Let
p : Jamal receives a scholarship
q : Jamal goes to college.
The proposition can be written symbolically as p â q. Since the hypothesis q is false,
the conditional proposition is true.
The converse of the propositions is
âIf Jamal goes to college, then he receives the scholarshipâ.
This is considered to be true precisely when p and q have the same truth values.
If p and q are propositions, the proposition
p if and only if q
Is called a biconditional proposition and is denoted
pâq
9
10. Truth table for the biconditional:
p q pâq
T T T
T F F
F T F
F F T
Logical equivalences
Similarly to standard algebra, there are laws to manipulate logical expressions, given as logical
equivalences.
1. Commutative laws PVQâĄQVP
PÎQâĄQÎP
2. Associative laws (P V Q) V R ⥠P V (Q V R)
(P ΠQ) ΠR ⥠P Π(Q ΠR)
3. Distributive laws: (P V Q) Π(P V R) ⥠P V (Q ΠR)
(P ΠQ) V (P ΠR) ⥠P Π(Q V R)
4. Identity PVFâĄP
PÎTâĄP
5. Complement properties P V ïżąP ⥠T (excluded middle)
P Î ïżąP ⥠F (contradiction)
6. Double negation ïżą (ïżąP) ⥠P
7. Idem potency (consumption) PVPâĄP
PÎPâĄP
8. De Morgan's Laws ïżą (P V Q) âĄ ïżąP Î ïżąQ
ïżą (P Î Q) âĄ ïżąP V ïżąQ
9. Universal bound laws (Domination) PVTâĄT
PÎFâĄF
10. Absorption Laws P V (P ΠQ) ⥠P
P Π(P V Q) ⥠P
10
11. 11. Negation of T and F: ïżąT ⥠F
ïżąF ⥠T
For practical purposes, instead of âĄ, or â, we can use = .Also, sometimes instead of ïżą, we will
use the symbol ~.
Example:
Show that [pË (p â q)] âq is atautology.
We use ⥠to show that [pË (p â q)] âq ⥠T
[pË (p â q)] âq
⥠[pË (âp Ë q)] âq Substitution for â
⥠[(pË âp) Ë (p Ë q)] âq Distributive
⥠[F Ë (p Ë q)] âq Uniqueness
⥠(p Ë q) âq Identity
⥠â (p Ë q) Ë q Substitution for â
⥠(âp Ë âq) Ë q DeMorganâs
⥠âp Ë (âq Ë q) Associative
⥠âp Ë T Excluded middle
âĄT Domination
So, Show that [pË (p â q)] âq is a tautology (true).
11
12. 2.3 DE MORGANâS LAW FOR LOGIC
We will verify the first of De Morganâs Law
â (p Ë q ⥠âp Ë âq,
) â (p Ë q) ⥠âp Ë âq
By writing the truth table for P = â (p Ë q) and Q = âp Ë âq, we can verify that, given
any truth values of p and q, either P or Q are both true or P and true are the both false:
p q â (p Ë q) âp Ë âq
T T F F
T F F F
F T F F
F F T T
Example:
~ (B Ă C) = ~ ((B Î ~C) V (~B Î C)) =
Apply De Morgan's Laws
= ~ (B Î ~C) Î ~ (~B Î C) =
Apply De Morgan's laws to each side
= (~B V ~ (~C)) Î (~ (~B) V ~C) =
Apply double negation
= (~B V C) Î (B V ~C) =
Apply distributive law
= (~B Î B) V (~B Î~C) V (C Î B) V (C Î ~C) =
Apply complement properties
= F V (~B Î~C) V (C Î B) V F =
Apply identity laws
= (~B Î~C) V (C Î B) =
Apply commutative laws
= (C Î B) V (~B Î~C) =
Apply commutative laws
= (B Î C) V (~B Î~C) = B C
12
13. EXERCISE:
1. Assuming that p and r are false and q are true, find the truth value of each proposition:
a) p â q
b) (p â q) Ë (q â p).
2. Formulate the symbolic expression in words using:
P: today is Monday
q: it is raining
r: it is hot
a) â (p v q) r
3. Show that (p Ë q) â q is a tautology.
4. Show that â (p q) ⥠(p âq)
13