matdis 1.1-1.2

Upload: muhammad-arif-rohman-hakim

Post on 05-Apr-2018

232 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/31/2019 matdis 1.1-1.2

    1/32

    Matematika Diskrit3 SKS

    Buku Teks :

    Discrete Mathematics and Its Applications,Kenneth H Rosen, McGraw-Hill, 6th edition

    Penilaian :

    tugas : 20%

    tes 1 : 25%

    tes 2 : 25%

    uas : 30%

  • 7/31/2019 matdis 1.1-1.2

    2/32

    discrete mathematics

    1. The foundations : Logic and Proofs

    2. Basic Structures: sets, functions, sequences, sums

    3. The Fundamentals: algorithms, the integers, matrices

    4.

    Induction and Recursion5. Counting

    6. Discrete Probability

    7. Advanced Counting Techniques

    8. Relations9. Graphs

    10. Trees

  • 7/31/2019 matdis 1.1-1.2

    3/32

    discrete mathematics

    11. Boolean Algebra

    12. Modeling Computation

    13. Appendices

  • 7/31/2019 matdis 1.1-1.2

    4/32

    Chapter 1The Foundations: Logic and Proofs

    1.1. Propositional Logic

    1.2. Propositional Equivalences

    1.3. Predicates and Quantifiers

    1.4. Nested Quantifiers1.5. Rules of Inference

    1.6. Introduction to Proofs

    1.7. Proof Methods and Strategy

    End-of-Chapter Material

  • 7/31/2019 matdis 1.1-1.2

    5/32

    Propositional Logic

    Chapter 1.1.

  • 7/31/2019 matdis 1.1-1.2

    6/32

    Proposition A propositional variable is denoted by the letters p, q, r,

    It is either true or false, but not both

    Its true value is called true (1) or false (0)

    Propositional variables are denoted by the letters p, q, etc.

    Examples : today is Tuesday

    1 + 1 = 2

    2 + 2 = 3

    Not a proposition: what time is it ?

    you may be seated

  • 7/31/2019 matdis 1.1-1.2

    7/32

    Compound Propositions

    compound statements

    Let p, q, r be simple propositions

    A compound proposition is obtained by

    connecting p, q, r using logical operators

    (or connectives)

    Example: we are studying and it is rainingSurabaya is a city or Malang is an ocean

  • 7/31/2019 matdis 1.1-1.2

    8/32

    connectives

    NOT (negation) Symbol

    AND (conjunction) Symbol

    Inclusive OR (disjunction) Symbol v

    EXclusive OR (XOR) Symbol

    Conditional statement Symbol

    (implication)

    Biconditional Symbol

  • 7/31/2019 matdis 1.1-1.2

    9/32

    Level of Precedence

    NEGATION (NOT)

    CONJUNCTION (AND)

    DISJUNCTION (OR, XOR)

    CONDITIONAL

    BICONDITIONAL

  • 7/31/2019 matdis 1.1-1.2

    10/32

    examples

    compound propositions examples:

    (p q) r

    p (q r)

    ( p) ( q)

    (p q) ( r)

  • 7/31/2019 matdis 1.1-1.2

    11/32

    Truth Table

    Negation

    example: p = today is Tuesday

    p = today is not Tuesday

    (today is Monday)

    p p

    0 1

    1 0

  • 7/31/2019 matdis 1.1-1.2

    12/32

    Truth Table

    conjunctionp q p q

    0 0 0

    0 1 01 0 0

    1 1 1

    example: p = today is Tuesday

    q = it is raining

    p q = today is Tuesday and it is raining

  • 7/31/2019 matdis 1.1-1.2

    13/32

    Truth table

    disjunction (inclusive or)

    example: p = John is a studentq = Mia is a lawyer

    p v q = John is a student or Mia is a lawyer

    p q p v q

    0 0 0

    0 1 11 0 1

    1 1 1

  • 7/31/2019 matdis 1.1-1.2

    14/32

    Truth table

    p q p q

    0 0 0

    0 1 11 0 1

    1 1 0

    example: p = John is a student

    q = Mia is a lawyerp v q = either John is a student or Mia is a lawyer

    exclusive or

  • 7/31/2019 matdis 1.1-1.2

    15/32

    Truth Table (p r) q

    p q r (p r) q

    0 0 0 (0 1) 0 = 0

    0 0 1 (0 0) 0 = 0

    0 1 0 (0 1) 1 = 1

    0 1 1 (0 0 1 = 1

    1 0 0 (1 1) 0 = 1

    1 0 1 (1 0) 0 = 0

    1 1 0 (1 1) 1 = 11 1 1 (1 0) 1 = 1

  • 7/31/2019 matdis 1.1-1.2

    16/32

    Truth Table p r q

    p q r p (r q)

    0 0 0

    0 0 1

    0 1 0

    0 1 1

    1 0 0

    1 0 1

    1 1 01 1 1

  • 7/31/2019 matdis 1.1-1.2

    17/32

    Example 18 p. 13a logic puzzle

    by Smullyan

  • 7/31/2019 matdis 1.1-1.2

    18/32

    Truth Table

    implication

    p q p q

    0 0 1

    0 1 1

    1 0 0

    1 1 1

  • 7/31/2019 matdis 1.1-1.2

    19/32

    Implication

    Notation : p q

    Examples :

    1. if 2 + 2 = 4 then x := x + 1

    2. if m > 0 then y := 2 * y

    3. if it is raining then we will not go

    Let s denote 2 + 2 = 4 and a denote x := x + 1

    The symbolic notation for example 1 : s a

  • 7/31/2019 matdis 1.1-1.2

    20/32

    Hypothesis & Conclusion

    In the implication p q

    p is called the antecedent, hypothesis, premise

    q is called the consequence,conclusion

  • 7/31/2019 matdis 1.1-1.2

    21/32

    Ways to express p q

    jika p maka q if p then q

    jika p, q if p, q

    q jika p q if p

    p hanya jika q p only if q

    p mengimplikasikan q p implies q

    see page 6

  • 7/31/2019 matdis 1.1-1.2

    22/32

    Necessary & Sufficient conditions

    p qis necessaryfor p

    is a sufficientcondition for q

  • 7/31/2019 matdis 1.1-1.2

    23/32

    Conversion & Inversion

    The conversion of p q is q p The inversion of p q is p q

    p q is not equivalent to q p

    p

    q is not equivalent to

    p

    q

    p q p q q p p q

    0 0 1 1 1

    0 1 1 0 0

    1 0 0 1 1

    1 1 1 1 1

  • 7/31/2019 matdis 1.1-1.2

    24/32

    contrapositive

    The contrapositive of p q is q p. p q and q p are equivalent

    p q p q q p

    0 0 1 10 1 1 1

    1 0 0 0

    1 1 1 1

  • 7/31/2019 matdis 1.1-1.2

    25/32

    Biconditional

    p if and only if q

    p q

    p q p q (p q) (q p)

    0 0 1 1

    0 1 0 0

    1 0 0 0

    1 1 1 1

  • 7/31/2019 matdis 1.1-1.2

    26/32

    Propositional Equivalence

    Chapter 1.2.

  • 7/31/2019 matdis 1.1-1.2

    27/32

    Tautology

    A proposition that is always true

    example: p p v q

    p q p p v q

    0 0 1

    0 1 1

    1 0 1

    1 1 1

  • 7/31/2019 matdis 1.1-1.2

    28/32

    Contradiction

    a proposition that is always false

    example : p ( p )

    p p ( p)

    0 0

    1 0

  • 7/31/2019 matdis 1.1-1.2

    29/32

    Logical Equivalence

    Notation p q ( p and q are compound propositions )

    Example : p q is logically equivalent to p q

    p q p q p q

    0 0 1 1

    0 1 1 1

    1 0 0 0

    1 1 1 1

  • 7/31/2019 matdis 1.1-1.2

    30/32

    Logical Equivalence

    See pages 24, 25

    Table 6

    Table 7

    Table 8

  • 7/31/2019 matdis 1.1-1.2

    31/32

    De Morgans Law

    (p q) ( p) ( q)

    (p q) ( p) ( q)

    p q p q p q (p q) ( p) ( q)

    0 0 1 1 0 1 1

    0 1 1 0 1 0 0

    1 0 0 1 1 0 0

    1 1 0 0 1 0 0

  • 7/31/2019 matdis 1.1-1.2

    32/32

    HomeworkChapter 1.1. no. 35 - 38

    Chapter 1.2. no. 7, 9, 16, 17