1 / 13

CSNB143 – Discrete Structure

CSNB143 – Discrete Structure. LOGIC. LOGIC. Learning Outcomes Student should be able to know what is it means by statement. Students should be able to identify its connectives and compound statements. Students should be able to use the Truth Table without difficulties. LOGIC.

Download Presentation

CSNB143 – Discrete Structure

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSNB143 – Discrete Structure LOGIC

  2. LOGIC Learning Outcomes • Student should be able to know what is it means by statement. • Students should be able to identify its connectives and compound statements. • Students should be able to use the Truth Table without difficulties.

  3. LOGIC • Statement or proposition is a declarative sentence with the value of true or false but not both. • Ex 1: Which one is a statement? • The world is round. • 2 + 3 = 5 • Have you taken your lunch? • 3 - x = 5 • The temperature on the surface of Mars is 800F. • Tomorrow is a bright day. • Read this!

  4. LOGIC Logical Connectives and Compound Statements • Statement usually will be replaced by variables such as p, q, r or s. • Ex 2: p: The sun will shine today. q: It is a cold weather. • Statements can be combined by logical connectives to obtain compound statements. • Ex 3: AND (p and q): The sun will shine today and it is a cold weather. • Connectives AND is what we called conjunction for p and q, written p  q. The compound statement is true if both statements are true. • Connectives OR is what we called disjunction for p and q, written p  q. The compound statement is false if both statements are false.

  5. LOGIC • To prove the value of any statement (or compound statements), we need to use the Truth Table.

  6. LOGIC Negation for any statement p is not p. written as ~p or p. The Truth Table for negation is: Ex 4: Find the value of (~pq)  p using Truth Table. Note: Always start with p, followed by q, then r, then s.

  7. LOGIC Conditional Statements • If p and q are statements, the compound statement if p then q, denoted by p  q is called a conditional statement or implication. • Statement p is called the antecedent or hypothesis; and statement q is called consequent or conclusion. The connective if … then is denoted by the symbol . • Ex 5: a) p : I am hungry q : I will eat b) p : It is cold q : 3 + 5 = 8 • The implication would be: a) If I am hungry, then I will eat. b) If it is cold, then 3 + 5 = 8. • Take note that, in our daily lives, Ex 5 b) has no connection between statements p and q, that is, statement p has no effect on statement q. However, in logic, this is acceptable. It shows that, in logic, we use conditional statements in a more general sense.

  8. LOGIC Its Truth Table is as below: To understand, use: p = It is raining q = I used umbrella • If p  q is an implications, then the converse of it is the implication q  p, and the contrapositive of it is ~q  ~p. • Ex 6: p = It is raining q = I get wet Get its: 1) converse 2) contrapositive.

  9. LOGIC • If p and q are statements, compound statement p if and only if q, denoted by p  q, is called an equivalence or biconditional. • Its Truth Table is as below: To understand, use: p = 3 > 2 q = 0 < 3-2 • Notis that p  q is True in two conditions: both p and q are True, or both p and q are false. • Another meaning that use the symbol  includes: • p is necessary and sufficient for q • if p, then q, and conversely

  10. LOGIC • In general, compound statement may contain few parts in which each one of it is yet a statement too. • Ex 7: Find the truth value for the statement (p  q)  (~q  ~p) • A statement that is true for all possible values of its propositional variables is called a tautology. • A statement that is always false for all possible values of its propositional variables is called a contradiction. • A statement that can be either true or false, depending on the truth values of its propositional variables is called a contingency

  11. LOGIC Logically Equivalent • Two statements p and q are said to be logically equivalent if p  q is a tautology. Ex 8: Show that statements p  q and (~p)  q are logically equivalent (from previous example). Contradiction. Ex 9: p  ~p Contingency Ex10: p  q (p  q) • p  q p  q p  q (p  q) T T ? F T T F

  12. LOGIC Quantifier • Quantifier is used to define about all elements that have something in common. • Such as in set, one way of writing it is {x | P(x)} where P(x) is called predicate or propositional function, in which each choice of x will produces a proposition P(x) that is either true or false. • A= {x | x is an integer less than 8} . P(1) is true, 1  A. Choice of x lead to P(x) is true. • There are two types of quantifier being used: • Universal Quantification () of a predicate P(x) is the statement “For all values of x, P(x) is true” In other words: • for every x • every x • for any x

  13. LOGIC Quantifier • Existential Quantification () of a predicate P(x) is the statement “There exists a value of x for which P(x) is true” In other words: • there is an x • there is some x • there exists an x • there is at least one x • Ex 9: Q(x) : x + 1 < 4. False or True for Universal and Existential Quantifier.

More Related