chapter 1 display

Upload: julianli0220

Post on 02-Jun-2018

223 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/10/2019 Chapter 1 Display

    1/42

    1

    MATH1001/2006-07

    Chapter 1 Logic

    In this chapter we study the basic rules in using and presenting logical arguments.

    As you will see, most of these agree with our common sense. The basic objects in

    logical arguments are statements , that is, sentences which are meaningful to say

    that they are true or false.

    Examples The following are statements:

    George Washington was the rst President of the United States.

  • 8/10/2019 Chapter 1 Display

    2/42

    2

    Bicycles have six wheels.

    The 100 th digit of is 7.

    There is no life on Mars.

    If two is greater than three, then the sun rises from the west.

    But the following sentences are not statements.

    How are you doing today?

    Please come to my office tomorrow!

    Help!

  • 8/10/2019 Chapter 1 Display

    3/42

    3

    He is six feet tall.

    x is positive.

    If three is greater than two.

    This car is very stupid.

    For each statement, we say that its truth value is truth, denoted by T or 1, if it

    is considered to be true. Otherwise, the truth value is falsehood, denoted by F

    or 0. These are the only two possibilities.

    Conditionals

    In mathematics, we frequently encounter theorems which typically look like:

  • 8/10/2019 Chapter 1 Display

    4/42

    4

    (1) If T is a triangle, then the sum of the interior angles of T is radians.

    (2) If n is an integer, then n2 is also an integer.

    In both examples, they are of the form if A then B, where both A and B are

    statements. (In the rst example, A is the statement: T is a triangle and B is

    the statement: the sum of the interior angles of T is radians .)

    A statement of the form if A then B is called a conditional . We denote such a

    compound statement by A B . A is called the hypothesis and B is theconclusion or consequent . The truth value of A

    B is determined by that of A

    and B, in the following way.

    A B is false when A is true but B is false; and A B is true in all other

  • 8/10/2019 Chapter 1 Display

    5/42

    5

    situations. In particular, A B is true if A is false, irrespective of the truth valueof B.

    For example, if 2 > 3 then the Earth has two moons is a true statement.

    Another example, if you get an A in MATH1001, I will buy you an ice-cream.

    Imagine, if you dont get an A in MATH1001, then no matter I buy you an

    ice-cream or not, this statement remains true (that is, I havent broken mypromise). The truth values of A B are determined from that of A and B by theso-called truth table:

  • 8/10/2019 Chapter 1 Display

    6/42

    6

    A B A B

    T T T

    T F F

    F T T

    F F T

    We write AB (read as A implies B) as a short hand for the sentence that

    the statement A B is true. In other words, if we write AB , then eitherthe statement A is false, or the statement A as well as the statement B are bothtrue. In such situation, we also say A is a sufficient condition for B; B is a

    necessary condition for A. The statements if A then B, B only if A, A is

  • 8/10/2019 Chapter 1 Display

    7/42

    7

    sufficient for B, B is necessary for A all have the same meaning.

    Converse of A B is the statment B A. So B A means the converse of A B is true.

    Example The converse of Theorem (1) is

    If the interior angles of T is radians, then T is a triangle ,

    which turns out to be true.

    The converse of Theorem (2) is

    If n2 is an integer, then n is an integer

  • 8/10/2019 Chapter 1 Display

    8/42

    8

    which is, indeed, false.

    Therefore the truth of B A is independent of the truth or falsity of A B .

    Biconditional

    We can consider the relation between the conditionals A B and B A by thebiconditional A B (read as A if and only if B), which has the truth valueT if both A B and B A are true, and has the truth value F otherwise. Wesee from the truth table below that A B is true when, and only when, both Aand B have the same truth values simultaneously. In that case, we write AB

    and say that A and B are equivalent , or A is equivalent to B.

  • 8/10/2019 Chapter 1 Display

    9/42

    9

    A B A B B A A B

    T T T T T

    T F F T F

    F T T F F

    F F T T T

    Many theorems in mathematics are of such a form. For example,

    x2 + y2 > 0 if and only if (x, y ) = (0 , 0).

    n is an integer if and only if n + 1 is an integer.

    Conjunction and Disjunction

  • 8/10/2019 Chapter 1 Display

    10/42

    10

    We can build new, more complicated statements from given two statements A and

    B by using the connectives and and or. The new statement A

    B (

    respectively AB ), read as A and B (respectively A or B) is the statement

    whose truth value is prescribed by the following truth table.

    A B AB AB

    T T T T

    T F F T F T F T

    F F F F

  • 8/10/2019 Chapter 1 Display

    11/42

    11

    Remark AB is true if one or both of A and B is true. This is called the

    inclusive or . There is a more restrictive usage, so-called exclusive or , in

    which AB is true when exactly one of A or B is true.

    Example (A B )((A B )(B A)) .

  • 8/10/2019 Chapter 1 Display

    12/42

    12

    A B A B B A (A B )(B A) A BT T T T T T

    T F F T F F

    F T T F F F F F T T T T

    Negation

    Another important logical operation is the formation of the opposite or negation

    of a given statement A. Given A, we denote by A or A, the negation of A, the

  • 8/10/2019 Chapter 1 Display

    13/42

    13

    statement whose truth values are just the opposite of those of A. So A is true if and only if A is false.

    Examples 1. (A B )(AB ).

    A B A

    B

    A

    B

    T T T T

    T F F F

    F T T T

    F F T T

    2. AAA, AAA.

  • 8/10/2019 Chapter 1 Display

    14/42

    14

    3. A(AB )A.

    4. AA is always true, which is called a tautology ; AA is always false, whichis called a contradiction .

    5. (A B )(B A).

    This last equivalence provides another way of proving the statement A B , byway of proving (B ) (A). This last statement is called the contrapositive of A B , and such method of proof is called prove by contrapositive .Example To prove if x + y > 0 then x2 + y2 > 0.

    Proof We prove by contrapositive. So we assume that x2 + y2 0. Since both xand y are real numbers, x2 and y2 , and hence x2 + y2 , can never be negative. The

  • 8/10/2019 Chapter 1 Display

    15/42

    15

    only possibility is that x = y = 0 , x2 + y2 = 0 . Hence x + y = 0 . This last

    statement implies the negation of x + y > 0. By contrapositive, this proves our

    theorem.

    Exercises 1. (AB )(A)(B ).

    2. (AB )(A)(B ).Prove by Contradiction

    It is easy to see by writing down the truth table that any statement A and

    A F are equivalent. Thus, to prove the truth of A, one can prove insteadA

    F . This is called prove by contradiction .

  • 8/10/2019 Chapter 1 Display

    16/42

    16

    Example 1.14.3 If a > 0, then 1/a > 0.

    Proof The proof is by contradiction. The negation of the statement in the

    theorem is a > 0 and 1/a 0, which we now assume. Then there exists anonnegative number b so that

    1/a + b = 0 .

    Multiplying both sides by a, this yields

    1 + ab = 0 .

    Since a 0, b 0, so ab 0. Thus 1 plus a nonnegative number equals zero, aclear contradiction. This proves our theorem.

  • 8/10/2019 Chapter 1 Display

    17/42

    17

    Exercise Does there exist a statement formula E in X, Y,Z which has the

    following truth table?

    X Y Z E

    T T T F

    T T F F

    T F T T

    T F F T

    F T T F

    F T F T F F T F

    F F F T

  • 8/10/2019 Chapter 1 Display

    18/42

    18

    More generally, is every truth table realizable?

    Further examples

    1. John made the following statements.

    (a) I love Ann.

    (b) If I love Ann, then I also love Karen.

    Suppose that John either told the truth or lied in both cases. Does John really

    love Ann?

    Analysis It amounts to decide whether John has told the truth (in both cases) or

    not. Suppose John has lied, then according to (a), he does not love Ann. But then

  • 8/10/2019 Chapter 1 Display

    19/42

    19

    (b) is a true statement. This is a contradiction. Hence, John must have told the

    truth, and he really loves Ann.

    Formally, we can denote by p and q the two statements, John loves Ann andJohn loves Karen respectively. Then statements (a) and (b) become p and

    p q . Our analysis above merely says that p and p q cannot be both false, as

  • 8/10/2019 Chapter 1 Display

    20/42

    20

    is shown in the following truth table.

    p q pq T T T

    T F F

    F T T

    F F T

    Hence, according to our assumption, both p and p q must be true.

    2. An island has two tribes of natives, the Hons and the Liars. The Hons alwaystell the truth, while the Liars always lie. Peter arrives at the island and asks a

    native if there is gold on the island. The native answers, There is gold on the

  • 8/10/2019 Chapter 1 Display

    21/42

    21

    island if and only if I always tell the truth. Is the native an Hon or a Liar? Is

    there gold on the island?

    Analysis We cannot decide whether the native is an Hon or a Liar, but we can

    determine if there is gold on the island. Let p denote the statement the nativealways tells the truth and q denote the statement there is gold on the island.

    The answer Peter got was q p, and the nature of the two tribes tells us thatq p is true if and only if p is true, that is, (q p) p is true. But we know(X Y ) Z eq. X (Y Z ) (prove this by yourselves). Hence (q p) peq. q ( p p) eq. q T . So q T is a true statement, that is, q is a truestatement and there is gold on the island.

  • 8/10/2019 Chapter 1 Display

    22/42

    22

    Exercise Verify the above by writing out the truth table for (q p) p .

    Exercise A committee is to be selected from ve candidates a, b, c, d, e . The

    selection must satisfy all the following conditions.

    (i) Either a or b must be included, but not both.

    (ii) Either c or e or both must be included.

    (iii) If d is included, then b must be included.

    (iv) Either both a and c are included or neither is included.

    (v) If e is included, then c and d must be included.

  • 8/10/2019 Chapter 1 Display

    23/42

    23

    How should the selection be made?

    Predicates and Quantication

    x > 3 is not a statement, until a particular value (or object) is substituted for

    the variable x. Denote by P (x) the sentence

    x > 3

    Then P (1) , P (5) , P ( 2) are all statements. But P (MATH1001) is not astatement. P (x) is a predicate in the variable x.

    x + y > 0

  • 8/10/2019 Chapter 1 Display

    24/42

    24

    is a predicate in the two variables x and y. Many theorems are of the form:

    P (x)

    Q(x), where P (x) and Q(x) are predicates. The sentence

    P (x)Q(x) is not really a statement, since x is not known. The true meaning

    of it as a theorem is that, for all real numbers x, P (x)Q(x). Of course, for

    all real numbers x could be replaced by for all integers x, or for all

    matrices x, or, in general, for all x under our consideration . This phrase

    quanties the range (or set) of values of x we are considering, and with each such

    x, the sentence P (x)Q(x) becomes a statement. This phrase for all . . . is

    called the universal quantier and x is called the bound variable . The phrases

    for any , for every for each , etc., all have the same meaning.

    Examples 1. For all even integers z, z is divisible by 2.

  • 8/10/2019 Chapter 1 Display

    25/42

    25

    2. For any integers x and y, x + y > 0x2 + y2 > 0.

    Another quantication is of the form: there exists an integer x such that x2 > 10. The general form is

    there exists (some kind of) x such that P (x) is true .

    The phrase: there exists ... x such that ... is called the existential quantier .This quantied statement is true if one can exhibit (or shows that there must

    exist) such an x for which the predicate P (x) becomes a true statement. Another

    common way of writing existential quantier is P (x) for some (kind of) x,

    such as x is divisble by 3 for some integer x.

    Existential quantication is weaker than the corresponding universal

  • 8/10/2019 Chapter 1 Display

    26/42

    26

    quantication, which requires that P (x) becomes a true statement for all the x

    under consideration.

    Example The theorem that there exists x and there exists y such that

    y2 = x is much weaker than for all x and all y, y2 = x.(The last statement is

    indeed false.)

    It is important to note that when there are more than one bound variables,

    universal quantier and existential quantier cannot switch order.

    Examples 1. For every x > 0 there exists y > 0 such that y2 = x.

    2. There exists y > 0 such that for every x > 0, y2 = x.

    Clearly 1 is true while 2 is false.

  • 8/10/2019 Chapter 1 Display

    27/42

    27

    Exercise 1.3.3 Consider the predicate x = 2y about the integers x and y.

    Find all the six different statements by using existential and/or universal

    quantiers. One such example is there exists an integer x and there exists an

    integer y such that x = 2y.

    How to prove or disprove statements with quantiers?

    Consider Example 1 above. We prove it by nding for each x under consideration

    (namely x > 0), at least one y, positive, such that y2 = x. In fact y = x works.This y, in general, depends on x. On the other hand, if we try to disprove it, wend a particular x such that for whatever y one can think of, y2 = x. Such an x is

    called a counter example . In the present case, such an x cannot be found

  • 8/10/2019 Chapter 1 Display

    28/42

    28

    (because the statement is true).

    In Example 2 above, if we take a y > 0, it is not true that for every x > 0, y2

    = x.Indeed, for x = 2 and x = 3 , we cannot have 2 = y2 as well as 3 = y2 . Thus, the

    statement 2 is false.

    Negation of statements with quantiers

    Our common understanding of the meaning of the phrase for all x . . . P (x) is

    true tells us that its negation is there exists x . . . such that P (x) is false, while

    the negation of there exists y . . . such that Q(y) is true is for all y . . ., Q(y) is

    false.

    Examples 1. The negation of for all integers x, x is not divisible by 7 is

  • 8/10/2019 Chapter 1 Display

    29/42

    29

    there exists an integer x such that x is divisible by 7.

    2. The negation of there exists a function f which is monotonic increasing isfor all functions f , f is not monotonic increasing. (Note: not monotonic

    increasing is not the same as monotonic decreasing.)

    3. The negation of there exists a function f such that f (x) = f (x + 3) for all

    real numbers x is for all functions f , there exists a real number x such that

    f (x) = f (x + 3) .

    Existence Theorems

    Example Consider the theorem There exists a real number x such that

    x3 = x.

  • 8/10/2019 Chapter 1 Display

    30/42

    30

    To prove this, we rst nd, in our rough work (behind the scene), a candidate for

    x that satises the condition x3 = x. Write this down and then verify carefully

    that this candidate really qualies. The latter step is the formal proof, while the

    rst step is really the part that involves discovery and reasoning. Usually the

    verication part is quite easy. In this case, x = 1 is such a candidate.

    Consider the example there exists a line in the plane passing through the points

    (1, 1), (2, 1), and (3, 0).We gure out that this statement is false. We nd that there is one and only one

    line, namely y = 2

    3 x + 13 which passes through the points (1, 1) and (2, 1).Then it is easy to verify that this line does not pass through the remaining point

    (3, 0).

  • 8/10/2019 Chapter 1 Display

    31/42

    31

    Uniqueness Theorems

    There are often theorems which assert that some mathematical object (exist and)

    is unique. For example, there is a unique line passing through the two points

    (1, 1) and (2, 1). The usual way to do this is by assuming that y = m 1 x + c1and y = m 2 x + c2 are two lines both passing through the given two points, andthen proceed to show that these two lines are indeed identical, that is,

    m 1 = m 2 , c1 = c2 . (Substitute (x, y ) = ( 1, 1), (2, 1) in turn into the twoequations to nd that m1 = m 2 = 2

    3 , c1 = c2 =

    13

    .)

    In general, we assume T 1 and T 2 are two objects which satisfy the properties

    stipulated in the theorem and then proceed to show that, in fact, T 1 = T 2 .

  • 8/10/2019 Chapter 1 Display

    32/42

    32

    Some Applications

    1. Digital Networks

    Suppose we want to design an electronic circuit that will sound a buzzer in an

    automobile if the temperature of the engine exceeds 90 C or if the automobile is

    in gear and the driver did not have the seat-belt buckled. Clearly, we have the

    relationship

    b = p(q (r ))

    where b denotes sound the buzzer, p denotes the temperature of the engine

    exceeds 90

    C, q denotes the automobile is in gear and r denotes the driversseat-belt is buckled. There are three kinds of electronic components we can use,

    namely, AND-gate, OR-gate and NOT-gate, whose functions are described by the

  • 8/10/2019 Chapter 1 Display

    33/42

    33

    following.

    x y xyL L L

    L H H

    H L H

    H H H

    Here and henceforth, L stands for low voltage and H stands for high voltage. So,

    an OR-gate outputs high voltage whenever one or both inputs are at high voltage.

    If we regard H as true and L as false, an OR-gate simply corresponds to thestatement xy. Similarly, AND-gate and NOT-gate correspond to xy and xrespectively.

  • 8/10/2019 Chapter 1 Display

    34/42

    34

    x y xy

    L L L

    L H L

    H L L

    H H H

  • 8/10/2019 Chapter 1 Display

    35/42

    35

    x xL H H L

    A NOT-gate is also called an inverter.

    Suppose the buzzer sounds if and only if the output voltage is H . Then the circuit

    we want is the following.

  • 8/10/2019 Chapter 1 Display

    36/42

    36

    Example Consider the following circuit of an electronic device.

    The output p is actually the following expression

    p = {(ab)(ad)}{(cb)(cd)},

  • 8/10/2019 Chapter 1 Display

    37/42

    37

    which is equivalent to

    ((ac))(bd) .

    So we can replace the above circuit by the much simpler one:

    2. Switching circuits

    Another area of application of our theory concerns switching circuits. As shown in

  • 8/10/2019 Chapter 1 Display

    38/42

    38

    the diagram below, the position of a single switch allows us to control the on/off

    of an equipment.

    In many circumstances, more complicated systems of switches are needed in order

    to achieve satisfactory control of some equipments. For example, an

    air-conditioning system might be controlled by the thermostats in two rooms. If

    the temperature in either room exceeds 25

    C, the thermostat in that room willclose a switch to turn on the air-conditioning system. In such case, the switches

    should be interconnected in parallel as shown below.

  • 8/10/2019 Chapter 1 Display

    39/42

    39

    On the other hand, the door to the vault of a bank might be controlled

    electronically so that it cannot be opened unless two separate keys are used toclose two electric switches simultaneously. That is, the switches are

    inter-connected in series , as shown below.

  • 8/10/2019 Chapter 1 Display

    40/42

    40

    Clearly, when switches are in parallel, we achieve a closed circuit when either one

    or both switches are closed. This corresponds to the OR-gate. Likewise, switches

    in series corresponds to the AND-gate. So, more complicated control pattern can

    be achieved by combining parallel and series switches suitably. For example, a

    voting machine for three people p, q, r can be designed in the following way. Thestatement we want is ( pq )( pr )(q r ) (win by simple majority), which is

    realized by the following circuit.

  • 8/10/2019 Chapter 1 Display

    41/42

    41

    But, ( pq )( pr )(q r )( p(q r ))(q r ). An equivalent circuit is

    which uses fewer switches.

    Exercise Design a switching circuit for a voting machine for four people by

  • 8/10/2019 Chapter 1 Display

    42/42

    42

    which a proposal is accepted only if it has the approval of at least three people.