Вы находитесь на странице: 1из 6

Propositions and Connectives Logic and mathematical reasoning has numerous applications in computer science.

Rules in logic are used in the design of computer circuits, the development of computer programs, the verification of correctness of programs, and many other ways. Propositions Proposition is the basic building blocks of logic. A proposition is a declarative sentence that is either true or false, but not both. An acceptable proposition is given the decision value true T (or 1), while an unacceptable statement is assigned a decision value false F (or 0) and not both. The area of logic that deals with propositions is called propositional logic. The bases for propositional logic are the three laws of Aristotelian logic. These are: 1. Law of Identity. A thing itself. 2. Law of Excluded Middle. A statement is either true or false but not both. 3. Law of Non-Contradiction. No statement is both true and false. TELL IF THE FOLLOWING SENTENCES ARE PROPOSITION OR NOT. ______________ 1. Today is Friday. ______________ 2. 3 Divides both 9 and 15. ______________ 3. Look in thy glass and tell whose face is the fairest ______________ 4. Wow! Did you see that baseball sail out of the park? ______________ 5. I now pronounce you man and wife. ______________ 6. All swans are white. ______________ 7. Scientists have discovered the remains of a lost civilization on the floor of the Atlantic Ocean. ______________ 8. The teacher exclaimed, Dont come into class late again! ______________ 9. Answer this question. ______________ 10. The batter hit the baseball 502 feet into the center field bleachers. Exercises: SW #1. Answer the following Which of the following is propositions? Write P if proposition and Np for not proposition.

What are the truth values of those that are propositions? Write T or F.
1. On January 6, 2008, the temperature of Baguio City dropped to 100C.

2. Why should you take Discrete Mathematics before Differential Equation?


3. There is an integer x such that x2 = 4. 4. X + 7 > 9

5. I am a millionaire! 6. 4 < 7 or 3 < 2 7. If you drive then I will walk. 8. The ball is round. 9. If 7 is prime , then 100 is not prime. 10. He was the Lakas party candidate for vice president in 1984.

Logical Operators Many mathematical statements are constructed by combining one or more propositions. These new propositions are formed from existing propositions using logical operators. These logical operators that are used to form new propositions from two or more existing propositions are called connectives. These are basic logical connectives with their corresponding symbols:
1. Negation ( - ; , 2. Conjunction (^) 3. Disjunction 4. Exclusive or 5. Implication

(v) (+) ()

6. Converse, Contrapositive, and Inverse


7. Bi-conditional

()

1. Negation of p is read as not p Definition: Let p be a proposition. The statement It is not the case that p is called the negation of p, denoted by p ; p; or p Example: Let p : 5 is positive the negation of the proposition is It is not the case that 5 is positive. Or 5 is not positive. The truth table or truth matrix displays the relationships between the truth values of propositions. P 1 0 2. Conjunction Definition: Let p and q be propositions. The proposition p and q denoted by p^q, is the proposition that is true when both p and q are true and false otherwise. The proposition p^q, is called the conjunction of p and q. Examples: Consider the following statements: 1. p: 2 is an even integer. q: 3 is an odd integer. The conjunction of these propositions, p^q, is the proposition 2 is an even integer and 3 is an odd integer. 2. Let p: 3 divides 9 q: 3 divides 15 p^q, is the proposition p 0 1

3 divides both 9 and 15. The Truth Table for the Conjunction of Two Propositions P 0 0 1 1 q 0 1 0 1 p^q 0 0 0 1

Other Terms: even, though, but in spite of, although, however, nevertheless, whereas, yet, still, on the other hand, on the contrary 3. Disjunction Definition: Let p and q be propositions. The proposition p or q denoted by p v q, is the proposition that is false when both p and q are false and true otherwise. The proposition pvq, is called the disjunction of p and q. Examples: Consider the following statements: p: Students who have taken Algebra can take Discrete Mathematics. q: Students who have taken Engineering Mathematics can take Discrete Mathematics.

The disjunction of these propositions, p v q, is the proposition Students who have taken Algebra or Engineering Mathematics, but not both, can take Discrete Mathematics.

The Truth Table for the Conjunction of Two Propositions P 0 0 1 1 q 0 1 0 1 pvq 0 1 1 1

Other Terms: Or, Inclusive or, unless, and/or 4.Exclusive Or Definition: Let p and q be propositions. The exclusive or of p or q denoted by p (+) q, is the proposition that is true when exactly one of p and q is true and false otherwise.

The Truth table for the Exclusive Or of Two Propositions p 0 0 1 1 5. Implication Definition: Let p and q be propositions. The implication of p q is the proposition that is false when p is true and q is false, and true otherwise. In this implication p is called the premise or the hypothesis, and q is called the consequence or conclusion. q 0 1 0 1 p (+) q 0 1 1 0

The Truth Table for the Implication of Two Propositions p 0 0 1 1 Other Terms: if . . . then . . .; implies q; p entails q; if p, q; p hence q; p q if p; q 0 1 0 1 P q 1 1 0 1

q follows p where p , q p is sufficient condition of q; p therefore q; q is the necessary condition of p, should q, p

p only if q q whenever p q provided p

6. Bi-conditional Definition: Let p and q be propositions. The biconditional of p q is the proposition that is true when p and q have the same truth values (both false or both true), and is false otherwise. The Truth Table for the Bi-conditional of Two Propositions P 0 0 1 1 q 0 1 0 1 P q 1 1 0 1

Other Terms: p iff q, q iff p, 0r p implies q and q implies p.

Examples: 1. The curve is a circle if and only if the curve is equidistant to a point.
2. The polynomial is a triangle if and only if it has 3 sides.

7. Converse, Contra-positive, and inverse

Вам также может понравиться