SlideShare ist ein Scribd-Unternehmen logo
1 von 13
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
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
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
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
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
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
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
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
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
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. 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
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
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

Weitere Àhnliche Inhalte

Was ist angesagt?

S2 1
S2 1S2 1
S2 1
IIUM
 
Propositional And First-Order Logic
Propositional And First-Order LogicPropositional And First-Order Logic
Propositional And First-Order Logic
ankush_kumar
 
Mathematical Logic
Mathematical LogicMathematical Logic
Mathematical Logic
Septi Ratnasari
 
CPSC 125 Ch 1 sec 2
CPSC 125 Ch 1 sec 2CPSC 125 Ch 1 sec 2
CPSC 125 Ch 1 sec 2
David Wood
 

Was ist angesagt? (19)

Chapter1p1
Chapter1p1Chapter1p1
Chapter1p1
 
C2.0 propositional logic
C2.0 propositional logicC2.0 propositional logic
C2.0 propositional logic
 
S2 1
S2 1S2 1
S2 1
 
#3 formal methods – propositional logic
#3 formal methods – propositional logic#3 formal methods – propositional logic
#3 formal methods – propositional logic
 
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro ŰŻ. ŰźŰ§Ù„ŰŻ ŰšÙƒŰ±Ùˆ
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro ŰŻ. ŰźŰ§Ù„ŰŻ ŰšÙƒŰ±ÙˆDiscrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro ŰŻ. ŰźŰ§Ù„ŰŻ ŰšÙƒŰ±Ùˆ
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro ŰŻ. ŰźŰ§Ù„ŰŻ ŰšÙƒŰ±Ùˆ
 
Propositional Logic and Pridicate logic
Propositional Logic and Pridicate logicPropositional Logic and Pridicate logic
Propositional Logic and Pridicate logic
 
Propositional And First-Order Logic
Propositional And First-Order LogicPropositional And First-Order Logic
Propositional And First-Order Logic
 
Mathematical Logic
Mathematical LogicMathematical Logic
Mathematical Logic
 
Predicate Logic
Predicate LogicPredicate Logic
Predicate Logic
 
CPSC 125 Ch 1 sec 2
CPSC 125 Ch 1 sec 2CPSC 125 Ch 1 sec 2
CPSC 125 Ch 1 sec 2
 
chapter 1 (part 2)
chapter 1 (part 2)chapter 1 (part 2)
chapter 1 (part 2)
 
Mathematical Logic
Mathematical LogicMathematical Logic
Mathematical Logic
 
Discrete mathematics
Discrete mathematicsDiscrete mathematics
Discrete mathematics
 
Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)
 
Logic (slides)
Logic (slides)Logic (slides)
Logic (slides)
 
Logic&proof
Logic&proofLogic&proof
Logic&proof
 
Discrete Mathematics - Propositional Logic
Discrete Mathematics - Propositional LogicDiscrete Mathematics - Propositional Logic
Discrete Mathematics - Propositional Logic
 
Slide subtopic 1
Slide subtopic 1Slide subtopic 1
Slide subtopic 1
 
Jarrar: First Order Logic- Inference Methods
Jarrar: First Order Logic- Inference MethodsJarrar: First Order Logic- Inference Methods
Jarrar: First Order Logic- Inference Methods
 

Andere mochten auch (7)

Slide subtopic 2
Slide subtopic 2Slide subtopic 2
Slide subtopic 2
 
Slide subtopic 2
Slide subtopic 2Slide subtopic 2
Slide subtopic 2
 
Slide subtopic 3
Slide subtopic 3Slide subtopic 3
Slide subtopic 3
 
ISU JANTINA
ISU JANTINAISU JANTINA
ISU JANTINA
 
Slide subtopic 5
Slide subtopic 5Slide subtopic 5
Slide subtopic 5
 
Slide subtopic 4
Slide subtopic 4Slide subtopic 4
Slide subtopic 4
 
Agama dan kepercayaan
Agama dan kepercayaanAgama dan kepercayaan
Agama dan kepercayaan
 

Ähnlich wie Chapter 1

Discrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part IDiscrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part I
Wongyos Keardsri
 
desmath(1).ppt
desmath(1).pptdesmath(1).ppt
desmath(1).ppt
MemMem25
 
logicproof-141212042039-conversion-gate01.pdf
logicproof-141212042039-conversion-gate01.pdflogicproof-141212042039-conversion-gate01.pdf
logicproof-141212042039-conversion-gate01.pdf
PradeeshSAI
 

Ähnlich wie Chapter 1 (20)

Logic
LogicLogic
Logic
 
Chapter 1: The Foundations: Logic and Proofs
Chapter 1: The Foundations: Logic and ProofsChapter 1: The Foundations: Logic and Proofs
Chapter 1: The Foundations: Logic and Proofs
 
Logic in Computer Science Unit 2 (1).pptx
Logic in Computer Science Unit 2 (1).pptxLogic in Computer Science Unit 2 (1).pptx
Logic in Computer Science Unit 2 (1).pptx
 
Discrete mathematics Chapter1 presentation.ppt
Discrete mathematics Chapter1 presentation.pptDiscrete mathematics Chapter1 presentation.ppt
Discrete mathematics Chapter1 presentation.ppt
 
L01.ppt
L01.pptL01.ppt
L01.ppt
 
Chapter 01 - p1.pdf
Chapter 01 - p1.pdfChapter 01 - p1.pdf
Chapter 01 - p1.pdf
 
Logic2.pptx
Logic2.pptxLogic2.pptx
Logic2.pptx
 
Drinkfromme.pptx
Drinkfromme.pptxDrinkfromme.pptx
Drinkfromme.pptx
 
UGC NET Computer Science & Application book.pdf [Sample]
UGC NET Computer Science & Application book.pdf  [Sample]UGC NET Computer Science & Application book.pdf  [Sample]
UGC NET Computer Science & Application book.pdf [Sample]
 
dm-logic.pdf
dm-logic.pdfdm-logic.pdf
dm-logic.pdf
 
Discrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part IDiscrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part I
 
Chapter1p1.pdf
Chapter1p1.pdfChapter1p1.pdf
Chapter1p1.pdf
 
desmath(1).ppt
desmath(1).pptdesmath(1).ppt
desmath(1).ppt
 
Bab 1 proposisi
Bab 1 proposisiBab 1 proposisi
Bab 1 proposisi
 
logicproof-141212042039-conversion-gate01.pdf
logicproof-141212042039-conversion-gate01.pdflogicproof-141212042039-conversion-gate01.pdf
logicproof-141212042039-conversion-gate01.pdf
 
6-Math-Logic.pptx Math logic general mathematics
6-Math-Logic.pptx Math logic general mathematics6-Math-Logic.pptx Math logic general mathematics
6-Math-Logic.pptx Math logic general mathematics
 
Chapter1p1 2.pptx
Chapter1p1 2.pptxChapter1p1 2.pptx
Chapter1p1 2.pptx
 
Per3 logika&pembuktian
Per3 logika&pembuktianPer3 logika&pembuktian
Per3 logika&pembuktian
 
Nature of Logic.pptx
Nature of Logic.pptxNature of Logic.pptx
Nature of Logic.pptx
 
Propositional Logic.pdf
Propositional Logic.pdfPropositional Logic.pdf
Propositional Logic.pdf
 

Mehr von Eli Lilly and Company (13)

Chapter 4
Chapter 4Chapter 4
Chapter 4
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
 
Akses dan ekuiti
Akses dan ekuitiAkses dan ekuiti
Akses dan ekuiti
 
Isu profesional guru dalam pengajaran matematik
Isu profesional guru dalam pengajaran matematikIsu profesional guru dalam pengajaran matematik
Isu profesional guru dalam pengajaran matematik
 
kurikulum dan kelainan upaya
kurikulum dan kelainan upayakurikulum dan kelainan upaya
kurikulum dan kelainan upaya
 
jantina dan bangsa
jantina dan bangsajantina dan bangsa
jantina dan bangsa
 
jantina dan bangsa
jantina dan bangsajantina dan bangsa
jantina dan bangsa
 
Jantina dan bangsa
Jantina dan bangsaJantina dan bangsa
Jantina dan bangsa
 
Qayyum
QayyumQayyum
Qayyum
 
Trend kurikulum
Trend kurikulumTrend kurikulum
Trend kurikulum
 
Isu profesional guru dalam pengajaran matematik
Isu profesional guru dalam pengajaran matematikIsu profesional guru dalam pengajaran matematik
Isu profesional guru dalam pengajaran matematik
 

KĂŒrzlich hochgeladen

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

KĂŒrzlich hochgeladen (20)

On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
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