Está en la página 1de 7

TOPIC 1

BASIC LOGIC

This topic deals with propositional logic, logical connectives and truth tables and

validity. Predicate logic, universal and existential quantification are discussed 1.1 PROPOSITION LOGIC

Propositions A proposition is a declarative sentence (a sentence that declares a fact) that is either true or false, but not both. Example 1: All the following declarative sentences are propositions. i. Kuala Lumpur is the capital of Malaysia. (True) ii. Perak is the biggest state in Malaysia. (False) iii. 1 + 1 = 2 (True) iv. 2 + 2 = 3 (False) Example 2: All the following not declarative sentences are not propositions. i. What time is it? ii. Read this carefully. iii. x+1=2 iv. x+y=z Letter (p, q, r, s,) are used to denote the propositional variable. True propositional truth value is True and denoted by T. False propositional truth value is False and denoted by F.

Compound Propositions The combination of one or more propositions. Are formed from existing propositions using logical operators. The types of compound propositions:I. Negation II. Conjunction III. Disjunction inclusive or IV. Disjunction exclusive or V. Conditional statements Converse Contrapositive Inverse VI. Biconditional statements

Negation Let p be a proposition. The negation of p, denoted by p (also denoted by ), read as not p, is the statement It is not the case that p. Example 3:

Proposition (p) Negation of proposition (p) Today is Friday Today is not Friday 3+57 3+5=7 32 3<2 TABLE 1: The Truth Table for the negation of a proposition:p T F

p
F T

Conjunction Let p and q be a proposition. The conjunction of p and q, denoted by p q, is the proposition p and q. The conjunction p q is true when both p and q are true and is false otherwise. Example 4: p : It is raining. q : It is cold. The proposition It is raining and cold. (p q) is consider as TRUE when it is raining (p is True) and it is cold (q is True). Otherwise or other situation is FALSE. In Logic the word but sometimes is used instead of and in a conjunction. For example, the statement The sun is shining, but it is raining. is another way of saying The sun is shining and it is raining. TABLE 2: The Truth Table for the conjunction of two propositions:p q pq T T T T F F F T F F F F Disjunction inclusive or Let p and q be a proposition. The disjunction of p and q, denoted by p q, is the proposition p or q. The disjunction p q is false when both p and q are false and is true otherwise. Example 5: p : It is raining. q : It is cold. The proposition It is raining and cold. (p q) is consider as FALSE when it is not raining (p is False) and it is not cold (q is False). Otherwise or other situation is TRUE. TABLE 3: The Truth Table for the disjunction of two propositions:p q pq T T T T F T F T T F F F Disjunction exclusive or

Let p and q be a proposition. The exclusive or of p and q, denoted by p q, is the proposition that is true when exactly one of p and q is true and is false otherwise. TABLE 4: The Truth Table for the Exclusive Or of two propositions:p q pq T T F T F T F T T F F F

Conditional statements Let p and q be a proposition. The conditional statement (or implication) p q is the proposition if p, then q. The conditional statement p q is false when p is true and q is false and true otherwise. In the conditional statement p q, p is called the hypothesis (or antecedent or premise) and q is called the conclusion (or consequence). The following common ways to express the conditional statement p q: if p, then q p implies q if p, q p only if q p is sufficient for q a sufficient condition for q is p q if p q whenever p q when p q is necessary for p a necessary condition for p is q q follows from p q unless p Example 6: p : Maria learns Discrete Mathematics. q : Maria will find a good job.. There are many ways to represent this conditional statement in English: If Maria learns Discrete Mathematics, then she will find a good job. Maria will find a good job when she learns Discrete Mathematics. A sufficient condition for Maria to find a good job is learns Discrete Mathematics. Maria will find a good job unless she does not learn Discrete Mathematics. The conditional statement If Maria learns Discrete Mathematics, then she will find a good job. (p q) is consider as FALSE when Maria learns Discrete Mathematics (p is True) but she does not get a good job (q is False). Otherwise or other situation is TRUE. TABLE 5: The Truth Table for the conditional statement p q: p q pq T T T T F F F T T F F T q p is called the converse of p q. q p is called the contrapositive of p q. p q is called the inverse of p q.

Example 7: What are the converse, the contrapositive and the inverse of the conditional statement The home team wins whenever it is raining.? Because q whenever p is one of the ways to express the conditional statement, thus p : It is raining. q : The home team wins. The converse is If the home team wins, then it is raining. The contrapositive is If the home team does not win, then it is not raining. The inverse is If it is not raining, then the home team does not win. Only the contrapositive is equivalent to the original statement. Biconditional Statements Let p and q be propositions. The biconditional statement (or bi-implications) p q is the proposition p if and only if q. The biconditional statement p q is true when p and q have the same truth values, and is false otherwise. There are some other common ways to express p q: p is necessary and sufficient for q if p then q, and conversely p iff q p q has exactly the same truth value as (p q) (q p). Example 8: p : You can take the flight. q : You buy a ticket. The statement You can take the flight if and only if you buy a ticket (p q) is consider as TRUE if p and q are either both true or both false, that is - If you buy a ticket (q is True) and you can take a flight (p is True). - If you do not buy a ticket (q is False) and you cannot take the flight (p is False). The statement You can take the flight if and only if you buy a ticket (p q) is consider as FALSE if p and q have opposite truth values, that is - When you do not buy a ticket (q is False) but you can take the flight (p is True). - When you buy a ticket (q is True) but you cannot take the flight (p is False). TABLE 6: The Truth Table for the biconditional statement p q: p q pq T T T T F F F T F

Truth Tables of Compound Propositions We can construct a truth table of the compound proposition by using the precedence of logical operator: Operator Precedence 1 2 3 4 5 Example 9: Construct the truth table of the compound proposition (p q) (p q). p q q p pq (p q) (p q q) T T F T T T T F T T F F F T F F F T F F T T F F Example 10: Construct the truth table of the compound proposition (p q) (r). p q r p q (p r (p q) (r) q) T T T T F F F T T F T F T T T F T F T F T T F F F T T T F T T F T F T F T F F T T T F F T F T F T F F F F T T T Propositional Equivalences A tautology is the compound proposition that is always true. A contradiction is the compound proposition that is always false. A contingent statement is one that is neither a tautology nor a contradiction. Example 11: Show that p q q p is tautology. p q p q pq q p p q q p T T F F T T T T F F T F F T F T T F T T T F F T T T T T

Because all the truth values are True, thus p q q p is tautology.

TUTORIAL EXERCISE 1.1 1. Which of these sentences are propositions? What are the truth values of those that are proposition? a) Malaysia is the biggest century in Asia. b) 2 + 3 = 5. c) Do not pass go. d) 5 + 7 < 10
e) 4 + x = 5.

f) Polytechnic Ungku Omar is the Polytechnic Premier. 2. What is the negation of each of these propositions? a) I will go to find you later. b) There is no population in New York. c) 2 + 1 = 3. d) The summer in Taipei is hot and sunny. 3. Let p and q be the propositions p : Mei has saving ten thousand dollar in bank. q : Mei will has a trip to Hawaii. Express each of these propositions as English sentence. a) p b) p q c) p q d) p q e) p q f) p (p q) 4. Let p and q be the propositions p : It is a sunny day. q : We will go to the beach Write these propositions using p and q and logically connectives.

a) b) c) d)

It is a sunny day and we will go to the beach. It is a sunny day but we do not go to the beach. It is not a sunny day or we go to the beach. We will go to the beach when it is a sunny day. e) It is a sunny day if and only if we will go to the beach. 5. Determine whether each of these statements is true or false. a) 1 + 1 = 3 if and only if monkey can fly. b) 0 > 1 if and only if 2 > 1. c) 2 + 2 = 4 if and only if 1 + 1 = 2. d) If 1 + 1 = 2, then 1 is a integer number. e) If monkey can fly, then 1 + 1 = 2. f) If 1 + 1 = 2, then monkey can fly. g) If 8 5 = 2, then 5 + 2 = 8. 6. Write each of these propositions in the form if p, then q in English. a) It is necessary to wash the bosss car to get promoted. b) John gets caught whenever he cheats. c) Mary will go swimming unless the water is too cold. d) I will remember to send you the address only if you send me an e-mail message. 7. Write each of these propositions in the form p if and only if q in English. a) If you read the newspaper every day, you will be informed, and conversely. b) The trains run late on exactly those days when I take it. c) If it is hot outside you drink an ice tea, and if you drink an ice tea it is hot outside. d) For you to win the contest it is necessary and sufficient that you have the only winning ticket. 8. State the converse, contrapositive, and inverse of each of these conditional statements. a) If it raining tonight, then I will stay at home. b) I come to class whenever there is going to be a quiz.

9. Construct a truth table for each of these compound propositions and determine whether these compound propositions are a tautology. a) (p q) (q p) b) (p q) (p q) c) (p q) (p r)

También podría gustarte