17

[ PROPOSITIONAL LOGIC] - KopyKitab€¦ · [ PROPOSITIONAL LOGIC] ... Truth tables: Truth table is a ... whose value is derived from simple propositions, connectives of that of compound

  • Upload
    dangbao

  • View
    260

  • Download
    0

Embed Size (px)

Citation preview

  • [ PROPOSITIONAL LOGIC] THE GATEBOOK COMPLETE BOOK FOR GATE preparation

    Proposition:

    Proposition is a statement which is either true or false but not both at a time.

    Example: 1. 22=5

    2. 3+3=6

    3. Mr. Manmohan Singh is pm of India.

    Connective: It is used to connect one or more propositions.

    The basic connectives are

    1 .Negation

    2. Conjunction

    3. Disjunction

    4. Implication

    5. Bi implication

    Truth tables: Truth table is a collection of truth values of a compound proposition whose value is derived from simple propositions, connectives of that of compound

    proposition.

    Truth table of ~P:

    P ~P

    T F

    F T

    Truth value of ~P is exactly opposite to truth value of P.

    Truth table of P Q:

    P Q PQ

    T T T

    T F F

  • [ PROPOSITIONAL LOGIC] THE GATEBOOK COMPLETE BOOK FOR GATE preparation

    PQ is true if and only if P=T Q=T.

    Truth table of P Q:

    P Q P Q

    T T T

    T F T

    F T T

    F F F

    It is false if and only if P = F Q = F.

    Truth table of P Q:

    It is read as if P then Q and also Q whenever P.

    P Q P Q

    T T T

    T F F

    F T T

    F F F

    It is false if and only if P = T Q = F.

    Example: If 22 = 5 then 33 = 10

    It is nothing but P Q where P = 22 = 5 and Q = 33 = 10

    Truth value of P = F.

    Truth value of Q = T.

    Truth value of P Q is F T T.

    Truth table of P bi implication Q (PQ):

    It can be read as P if and only if Q or P iff Q

    P Q PQ

    T T T

    T F F

    F T F

    F F T

    F T F

    F F F

  • [ PROPOSITIONAL LOGIC] THE GATEBOOK COMPLETE BOOK FOR GATE preparation

    `Example: Delhi is capital of America

    iff

    Newyork is capital of India.

    Here P: Delhi is capital of America (F).

    Q: Newyork is capital of India (F).

    Truth value of (P Q) (F F) T.

    Propositional function: is called propositional function over n variables from {T, F}.

    An example of propositional function on 2 variables.

    = {(T,T),(T,F),(F,T),(F,F)} = {T,F}{T,F}

    {T, F}

    Propositional Formula:

    A formula can be recursively defined as follows

    1. T, F are formulae

    2. Any simple proposition is a formula.

    Example: P, Q, R.

    3. If F1, F2 are formulae then F1 F2, F1 F2, ~F1 are also formulae.

    P, P P, P P are different formulae whose corresponding propositional functions are same.

    A formula can be classified into three ways

    1. Tautology: A propositional formula is said to be Tautology iff it is true in all the cases.

    It is denoted by (T).

    (T, T)

    (T, F)

    (F, T)

    (F, F)

    T

    F

  • [ PROPOSITIONAL LOGIC] THE GATEBOOK COMPLETE BOOK FOR GATE preparation

    Example: P P

    Truth table of p p

    P P P P

    T T T

    F F T

    2. Contradiction: Propositional formula is called contradiction iff it is false in all the cases.

    It is denoted by (F).

    Example: P ~P

    P ~P P ~P

    T F F

    F T F

    3. Contingency: A propositional formula is called contingency iff it is neither Tautology nor contradiction.

    Priorities of the operators:

    has greater priority than , .

    has greater priority than .

    Note:- ~ > > > >

    Associativity: 1. , are associative. That means P Q R P (Q R) (P Q) R

    Similarly for operator. 2. has right associativity.

    That means PQR = P (QR)

    Equivalence: Two propositional formulae are said to be equivalent iff F1F2 is tautology.

    That means both are true or none is true (both are false).

    Example: ~ (p Q) ~p ~Q P Q (P

    Q)

    ~ (P Q) ~P ~Q F1 F2

    T T T F F T

    T F F T T T

    F T F T T T

  • [ PROPOSITIONAL LOGIC] THE GATEBOOK COMPLETE BOOK FOR GATE preparation

    F F F T T T

    Equivalence Rules: Following axioms are called equivalence rules, which are helpful in

    simplifying the formula.

    Some other useful equivalence

    P Q ~p Q P Q (P Q) (Q P)

    Logical Implication: ( )

    P Q P logically imply Q

    Q logically follows p

    P Q iff P Q is a tautology. Note: Whenever F1 F2 then it cannot be possible to have F1 as true and F2 as false at same time.

    Validity : A formula is said to be valid iff it is true in all the cases.

    Example: P Q P Q

    P T P P F p

    Identity laws

    P T T P F P

    Domination laws

    P P P P P P

    Idempotent laws

    ~( ~P) P Double negation laws

    (P Q) (Q P) (P Q) (Q P)

    Commutative laws

    P (Q R) (P Q) R P (Q R) (P Q) R

    Associative laws

    P (Q R) (P Q)(P R) P (Q R) (P Q)(P R)

    Distributive laws

    ~(P Q) ~p ~Q ~(P Q) ~P ~Q

    Demorgans law

  • [ PROPOSITIONAL LOGIC] THE GATEBOOK COMPLETE BOOK FOR GATE preparation

    Satisfiability: A formula is said to be satisfiable iff it is true in at least one case.

    Example: PQPQ P Q P Q PQ P Q P Q

    T T T T T

    T F T F F

    F T T F T

    F F F F T

    Above formula is satisfiable but not valid.

    Inference System: Formula P1 P2 P3 .. Pn C is called an inference system. An inference system is called valid when P1 P2 P3 .. Pn C is

    tautology.

    P1, P2, P3.. Pn are called premises and C is conclusion. There is no world or Universe where P1, P2, P3.. Pn are true and C is false at

    same time if the inference system is valid.

    If an inference system is not valid then it is called invalid and conclusion is called invalid conclusion.

    Inference system P1 P2 P3 .. Pn C can be viewed as P1

    P2

    P3

    Pn

    C

    P Q P Q P Q (P Q)(PQ)

    T T T T T

    T F F T T

    F T F T T

    F F F F T

  • [ PROPOSITIONAL LOGIC] THE GATEBOOK COMPLETE BOOK FOR GATE preparation

    Inference rules:

    Each inference rule is valid inference system.

    1. p q

    . . p q

    p q p q Conjunction

    2. p

    . . p q

    p p q Addition

    3. p q

    . . p

    p q p Simplification

    4. p p q

    . . p

    P (p q) q Modus ponens

    5. ~q p q

    . . ~ p

    ~q (p q) ~p Modus tollens

    6. p q q r

    . . p r

    (p q) (q r) (p r) Hypothetical syllogism

    7. p q ~p

    . . q

    (p q) ~p q Disjunctive syllogism

    8. p q

    ~p r

    . . q r

    (p q) (~p r) (q r) Resolution

    Practice Questions and Explanations: 1) The number of propositional functions on n variables?

    a) b) c)

    d)

    An n variable propositional is a mapping from {T, F}

  • [ PROPOSITIONAL LOGIC] THE GATEBOOK COMPLETE BOOK FOR GATE preparation

    2

    n

    Each propositional function is mapping these 2n rows to {T, F}.so that each row

    can be mapped to either T or F

    Forming propositional function is nothing but mapping each row with 2 options

    (T or F)

    The number of different mappings for 2n rows = 2 X 2 X 2 X 2n times=

    2) p (p q) is a a) tautology b)contradiction c) contingency d)none

    Solution: It can be verified using truth table of p (p q) q but it takes more time.

    The clever way of doing this is shown below.

    A formula F1 F2 cannot be tautology if F1 = T, F2 = F

    Here p (p q) q can be viewed as F1 F2 where F1= p (p q),

    F2 = q

    To prove that F1 F2 is not tautology fix F1 = T and F2 = F

    F1: p (p q) = T

    then p = T and p q = T (this is the only possibility, there is no other

    possibility) p q = T can be done in so many ways but when p = T then

    p q = T can be possible only in one way, that is, q= T.

    Now we can verify that when F1 = T then p = T q = T.

    Consider the complete formula F1 F2

    p (p q) q

    But we wanted to make F2 = F; since F2 = q, that means q = F

    But already we know that q = T that means whenever F1 = T, F2 cannot be.

    Hence F1 F2 cannot be false.

    Hence F1 F2 p (p q) q is tautology.

    3) p (p q) (q r) r is a

    p1 p2 p3 pn f T T T .. F

    T T T .. F

    . . .. ....

    F F F ..

    F

  • [ PROPOSITIONAL LOGIC] THE GATEBOOK COMPLETE BOOK FOR GATE preparation

    a) Tautology b) contradiction c) contingency d) none

    Solution: let F1 = p (p q) (q r) and F2 = r

    To prove that F1 F2 is not tautology try to assign F1 = T, F2 = F

    F2 = r = F ---------------------------------(Eq1)

    F1 = T means p (p q) (q r) = T

    Any formula F3 f4 F5 = T means F3 = T and F4 = T F5 = T

    Here F5 = q r = T---------------------------(eq2)

    F4 = p q = T---------------------------(eq3)

    F3 = p = T --------------------------------(eq4)

    From eq1 and eq2

    r = F

    q r = T

    q F = T

    Q should be false that means q = F--------------------------(Eq5)

    From eq5 and eq3

    p q = T and q = F

    p cannot be true (think why?)

    p = F -----------------------------(eq6)

    from eq4 and eq6

    p = T and p = F

    this is not possible. Hence we cannot make F1 = T and F2 = false at a time.

    F1 F2 is always true

    F1 F2 = p (p q) (q r) is tautology.

    4) p q p q is a) Tautology b) contradiction c) contingency d) none of the above

    Solution: F1 = p q and F2 = p q It is possible to get F1 F2 as false. So it cannot be tautology

    F1 F2 cannot be false when p = F, q = F. That means F1 F2 cannot be

    contradiction. Hence it is contingency.

    5) The proposition p ( ~p q ) is logically equivalent to a) Tautology b) logically equivalent to p q

    c) logically equivalent to p q d) none

    Solution: p (~p q) (p ~p) (p q) (distributive law)

    F (p q) [p ~p F]

    p q

    There fore give proposition is logically equivalent to p q

    6) [p (p q) (q r) r] is equivalent to a) T b) F c) R d) ~R Solution: let F1 = p

    F2 = p q

    F3 = q r

  • [ PROPOSITIONAL LOGIC] THE GATEBOOK COMPLETE BOOK FOR GATE preparation

    F4 = r

    F1 F2 F3 F4

    ~ (F1 F2 F3) F4 [XY = ~X V Y] ~F1 ~F2 ~F3 F4 ~ p ~ (p q) ~ (q r) r ~p ~ (~p q) ~ (~q r) r ~p (p ~q) (q ~r) r (~p p) (~p ~q) (q ~r) r T (~p ~q) (q ~r) r (~p ~q) (q ~r) r (~p ~q) ((r ~r) (r q)) (~p ~q) (T (r q)) ~p ~q r q ~p r ~q q ~p r T T

    7) The binary operation is defined as follows

    P Q p q

    T T T

    T F T

    F T F

    F F T

    Which one of the following is equivalent to p q? a) ~q ~p b) p ~q c) ~p q d) ~P ~Q

    Solution: p q q p ~q p p q q p ~(~q) p p ~q

    Option (b) is correct answer.

    8) Consider the following logical inferences I1: If it rains then the cricket match will not be played

    The cricket match was played.

    Inference: There was no rain

    I2: If it rains then the cricket match will not played

    It did not rain

    Inference: The cricket match was played

    Which of the following is TRUE?

    a) Both I1 and I2 are correct inferences

    b) I1 is correct but I2 is not a correct inference

    c) I1 is not correct but I2 is correct inference

  • [ PROPOSITIONAL LOGIC] THE GATEBOOK COMPLETE BOOK FOR GATE preparation

    d) Both I1 and I2 are not correct inferences.

    9) F1: P ~P F2: (P ~P) (~P P) a) F1 is satisfiable and F2 is valid

    b) F1 is unsatisfiable and F2 is satisfiable

    c) F1 is unsatisfiable and F2 is valid

    d) F1 and F2 are both satisfiable

    Solution: 1. When P = T, ~P = F F1 will become F

    It cannot be valid but satisfiable because it can be true when P = F.

    2. When P = T then ~P = F but F2 is true When P = F then ~P = T but F2 is true

    F2 is always true that means it is valid.

    10) Which of the following is not a valid logical implication?

    a) P (P Q) Q

    b) ~P (P Q) ~Q

    c) P Q P Q

    d) (P Q) ~Q ~p

    Solution: If F1 F2 and F1 = true, then F2 cannot be false.

    In option b)

    ~P (P Q) ~Q

    When Q = T and P = F

    ~ (F) (F T) F

    T T F

    T F

    Hence option (b) is correct answer

    Practice Questions from Propositional Logic: 1) ~ (P Q) V (~P V Q)

    a) P b) Q c) ~P d) T

    2) ~ (P Q) is equivalent to

    a) ~P ~Q

    b) ~P Q

    c) (P Q) (~P ~Q)

    d) (P ~Q) (~p Q)

    3) ((P Q)~Q) ~P is a) Tautology b) Contradiction c) Contingency d)none

  • [ PROPOSITIONAL LOGIC] THE GATEBOOK COMPLETE BOOK FOR GATE preparation

    4) Which of the following arguments is invalid?

    a) P Q, ~P R, Q S R S

    b) P ~Q, R Q, R ~P

    c) P R, Q R, Q P R

    d) P ~Q, ~Q P

    5) Which of the following arguments are invalid? S1: If it rains Erick will be sick

    It did not rain

    Erick was not sick

    S2: If I study then I will not fail mathematics

    If I do not play basket ball, then I will study

    But I failed mathematics

    Therefore I must have played basket ball

    a) Only S1 b) Only S2 c) both S1 and S2 d) neither S1 nor S2

    6) (P Q) (~Q ~P) is equivalent to

    a) T b) F c) P d) Q

    7) ((P Q) P) (Q P)

    a) T b) F c) P d) Q

    8) (P Q) (~P R) is equivalent to

    a) T b) F c) Q R d) none

    9) (P Q) (~Q R) (~R P)

    a) T b) F c) P Q d) P Q R

    10) Which of the following inference system is invalid?

    a) R S, ~S ~R

    b) ~R, P Q, Q R ~P

    c) ~R (S ~T), ~R W, ~P S, ~W T P

    d) P Q ~T, W R, W P, R Q (W R) ~T

    11) If P then Q unless Z is equivalent to

    a) (P Q) ~Z b) P Z Q c) ~Z (P Q) d) (P Q) ~Z

    12) Which of the following statement is true?

  • [ PROPOSITIONAL LOGIC] THE GATEBOOK COMPLETE BOOK FOR GATE preparation

    S1: (P Q) ~R P R Q

    S2: P (Q ~Z) ~(P Q Z)

    a) Only S1 is correct b) Only S2 is correct c) S1 and S2 both are correct d) Neither S1 nor S2 is correct

    13) Which of the following is not a tautology?

    a) P Q P b) P P Q c) ~P (P Q) Q d) ~ (P Q) Q

    14) Which of the following is a contradiction?

    a) ~ (P Q) Q

    b) ~ (P Q) P

    c) ~ (P Q) ~Q

    d) ~ (~ P (~P Q))

    15) S1: P (P Q) P

    S2: P (P Q) Q

    a) Only S1 b) Only S2 c) Both of them are correct d) neither S1 nor S2

    16) S1: P Q ~Q ~P

    S2: ~ (P Q) ~P ~Q

    a) Only S1 b) Only S2 c) both S1 and S2 d) neither S1 nor S2

    17) (P Q) R is equivalent to

    a) P (Q R) b) P Q R c) P Q R d) none

    18) P (Q R) is equivalent to

    a) (P Q) R b) P Q R c) P Q R d) P ~Q R

    NOTE: The dual of compound proposition that contains only the logical operators

    , , ~ is the proposition obtained by replacing each , , by each , . Each T by F and each F by T. The dual proposition of S is denoted by Sd then

    19) (P F) (Q T) d

    a) (P F) (Q T)

    b) (P T) (Q F)

    c) (~P T) (~Q F)

    d) (~P F) (~Q T)

    20) If S d is a dual of S then (S d )d

    a) ~S b) S c) T d) F

  • [ PROPOSITIONAL LOGIC] THE GATEBOOK COMPLETE BOOK FOR GATE preparation

    21) S1: If P, Q, R are three compound propositions and If P does not logically equivalent to Q and Q does not logically equivalent to R then P does not logically

    equivalent to R

    S2: If P, Q, R are three compound propositions and P Q and Q R then P R

    a) Only S1 b) Only S2 c) both S1 and S2 d) neither S1 nor S2

    22) S1: A formula is valid iff its complement is not satisfiable

    S2: A formula is satisfiable iff its complement is not valid.

    a) Only S1 b) Only S2 c) both S1 and S2 d) none

    23) Consider a binary operator defined as follows

    P Q P Q

    T T F

    T F F

    F T T

    F F F

    The propositional formula P Q is equivalent to

    a)~P ~Q b)~P Q c)P ~Q d)P Q

  • continue

    PRODUCT NOT FOUND!

    Product not found!

    School BooksOswaal BooksClass 9th BooksClass 10th BooksClass 11th BooksClass 12th Books

    Engineering BooksRGPV Books & NotesVT U Books & NotesFree Engineering BooksInformation T echnology BooksElectrical Engineering Books

    Competitive ExamsBank PO Exam

    Login | Register 0

    Search by Title / Author / ISBN / Description

    javascript:void(0)http://www.kopykitab.com/index.php?route=account/loginhttp://www.kopykitab.com/index.php?route=account/registerhttp://www.kopykitab.com/download-kopykitab-ebook-readerhttp://www.kopykitab.com/http://www.kopykitab.com/higher-education-ebookshttp://www.kopykitab.com/Professional-Courseshttp://www.kopykitab.com/Competitive-Exams-eBookshttp://www.kopykitab.com/School-Education-eBookshttp://www.kopykitab.com/free-ebooks-download/index.php?route=product/category/byParams&product_type[]=test_preparation&product_type[]=mock_testhttp://www.kopykitab.com/blog/http://www.kopykitab.com/http://www.kopykitab.com/Oswaal-Bookshttp://www.kopykitab.com/School-Education-eBooks/eBooks-for-Class-9thhttp://www.kopykitab.com/School-Education-eBooks/eBooks-for-Class-10thhttp://www.kopykitab.com/School-Education-eBooks/eBooks-for-Class-11thhttp://www.kopykitab.com/School-Education-eBooks/eBooks-for-Class-12thhttp://www.kopykitab.com/index.php?route=product/search&filter_name=rgpv&filter_description=truehttp://www.kopykitab.com/index.php?route=product/search&filter_name=vtu&filter_description=truehttp://www.kopykitab.com/engineering-ebooks-free-downloadhttp://www.kopykitab.com/engineering-eBooks/Information-Technology-eBookshttp://www.kopykitab.com/engineering-eBooks/electrical-engineering-ebookshttp://www.kopykitab.com/eBooks-For-Bank-PO

  • Gate BooksT eaching Exams BooksAIEEE-NIT -JEE MAINS BooksUPSC Books

    Professional CoursesICSI Books & Study MaterialsChartered Accountant BooksCompany Secretary BooksICSI 7 days T rialLatest Scanners

    About KopyKitab.com

    Kopykitab is India's largest Digital platform with Multiple publishers. Kopykitab has the largest collection ofeBooks & branded digital content in Higher Education, School (K12), Professional & Competitive Exams. Wehave a strong foundation of leading publishers & tutorials as content partners.

    We offer eBook, Test Preparation, Notes, Videos & LMS for a variety of curriculum to Students, Professionals &Institutes. Our goal is to make education affordable & accessible.A user can access the content in all electronic devices e.g. Mobile, PC & Tabs

    Informat ion

    About Us

    FAQ

    Privacy Policy

    T erms & Conditions

    Payment Information

    Links

    ICSI eLibrary

    KopyKitab eBook Reader

    Contact Us

    Site Map

    My Account

    Refer & Earn

    My Account

    Order History

    Wish List

    Newsletter

    My Library

    Office 365 Email Login

    Google Login

    Verified By

    2017 DigiBook Technologies (P) Ltd, All Rights Reserved. An ISO 9001:2008 Certified Company

    http://www.kopykitab.com/eBooks-For-GATEhttp://www.kopykitab.com/eBooks-for-teaching-examshttp://www.kopykitab.com/Competitive-Exams-eBooks/eBooks-For-AIEEE-NIT-JEE-MAINShttp://www.kopykitab.com/Competitive-Exams-eBooks/eBooks-For-UPSChttp://icsi.kopykitab.com/content/http://www.kopykitab.com/Chartered-Accountanthttp://www.kopykitab.com/Company-Secretaryhttp://icsi.kopykitab.com/#free-trialhttp://www.kopykitab.com/Shuchita-Prakashan-solved-scanners-cs-ca-books-ebooks-publishershttp://www.kopykitab.com/about_ushttp://www.kopykitab.com/KopyKitab-FAQhttp://www.kopykitab.com/Kopykitab-Privacy-Policyhttp://www.kopykitab.com/Terms-and-Conditionshttp://www.kopykitab.com/payment-informationhttp://icsi.kopykitab.com/https://play.google.com/store/apps/details?id=com.kopykitab.ereaderhttp://www.kopykitab.com/index.php?route=information/contacthttp://www.kopykitab.com/index.php?route=information/sitemap/index.php?route=account/referralhttp://www.kopykitab.com/index.php?route=account/accounthttp://www.kopykitab.com/index.php?route=account/orderhttp://www.kopykitab.com/index.php?route=account/wishlisthttp://www.kopykitab.com/index.php?route=account/newsletterindex.php?route=/account/profilehttps://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=c10b242b-fb71-4e65-901c-94d505ff6ca7&redirect_uri=https%3A%2F%2Fwww.kopykitab.com%2Fmicrosoftonline&response_type=code&scope=openid+email+profile+https%3A%2F%2Foutlook.office.com%2Fmail.readhttps://accounts.google.com/o/oauth2/v2/auth?client_id=1034096850870-11b3ebbb69vs8p5avn49ec14f677thbq.apps.googleusercontent.com&redirect_uri=https%3A%2F%2Fwww.kopykitab.com%2Fgoogle_oauth&response_type=code&scope=openid+email+profile+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fandroidpublisher

    PRODUCT NOT FOUND!About KopyKitab.comInformationLinksMy Account