1 / 22

CPCS222 Discrete Structures I

CPCS222 Discrete Structures I. Intro + Logic. Welcome to CPCS222. Meet your Instructor.. Course Syllabus will be sent by email.. Textbook: “Discrete Mathematics and Its Applications”, by Kenneth Rosen, 6 th ed. Important Dates: 1 st Exam: Monday 3-12-1429H , 1-12-2008G

admon
Télécharger la présentation

CPCS222 Discrete Structures I

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. CPCS222 Discrete Structures I Intro + Logic

  2. Welcome to CPCS222 • Meet your Instructor.. • Course Syllabus will be sent by email.. • Textbook: “Discrete Mathematics and Its Applications”, by Kenneth Rosen, 6th ed. • Important Dates: • 1st Exam: Monday 3-12-1429H , 1-12-2008G • 2nd Exam: Monday 22-1-1430H , 19-1-2009G • Important Notes: • Absence Policy • Class Behavior

  3. Why Study Discrete Structures • Digital computers are based on discrete “atoms” (bits). • Therefore, both a computer’s • structure (circuits)and • operations (execution of algorithms) • can be described by discrete math.

  4. Starting with Logic.. • Crucial for mathematical reasoning • Used for designing electronic circuitry • Logic is a system based on propositions. • A proposition is a statement that is either true or false (not both). • We say that the truth value of a proposition is either true (T) or false (F).

  5. Propositional Logic.. “Elephants are bigger than mice.” Is this a statement? yes Is this a proposition? yes What is the truth value of the proposition? true

  6. Propositional Logic.. “520 < 111” Is this a statement? yes Is this a proposition? yes What is the truth value of the proposition? false

  7. Propositional Logic.. “y > 5” Is this a statement? yes Is this a proposition? no Its truth value depends on the value of y, but this value is not specified. This is called a propositional function or open sentence.

  8. Propositional Logic.. “Today is January 1 and 99 < 5.” Is this a statement? yes Is this a proposition? yes What is the truth value of the proposition? false

  9. Propositional Logic.. “Please do not fall asleep.” Is this a statement? no It’s a request no Is this a proposition? Only statements can be propositions

  10. Propositional Logic.. “x<y if and only if y>x.” Is this a statement? yes Is this a proposition? yes What is the truth value of the proposition? true

  11. Compound Propositions • One or more propositions can be combined to form a single compound proposition. • Formalized by: • Denoting propositions with p, q, r, and s • Logical Operators

  12. Logical Operators • Negation (NOT) • Conjunction (AND) • Disjunction (OR) • Exclusive or (XOR) • Implication (if – then) • Biconditional (if and only if) Truth tables can be used to show how these operators can combine propositions to compound propositions.

  13. Truth Tables

  14. Truth Tables

  15. Precedence of logical Operation Exercises: • (p   q)  q • (p  q)  (p  q)

  16. Logical Operators • Converse is the proposition q  p of p q • Contrapositive of p q is q  p • The proposition p  q is called the inverse of p q • Only the contrapositive always has the same truth value of p q

  17. Statements and Operations Statements and operators can be combined in any way to form new statements. (PQ) Ξ (P)(Q). (Equivalence) De Morgan’s laws

  18. Tautologies and Contradictions A tautology is a statement that is always true. Examples: • R(R) • (PQ)(P)(Q) If ST is a tautology, we write ST. If ST is a tautology, we write ST.

  19. Tautologies and Contradictions A contradiction is a statement that is always false. Examples: • R(R) • ((PQ)(P)(Q)) The negation of any tautology is a contra- diction, and the negation of any contradiction is a tautology.

  20. Logical Equivalence • A compound preposition that have the same truth values are called Logically equivalent ( Ξ ) • Examples: • Show that (p q)Ξ p q • (p q)Ξ( p q) by p qΞ p q • Ξ( p)q • Ξpq

  21. Hints • For some important equivalence check table 6 • , 7, and 8 page 25 • Table 5 in Section 1.2 shows many useful laws. • Exercises 1 and 7 in Section 1.2 may help you • get used to propositions and operators.

  22. Lecture Summary • Introducing Discrete Structures. • What is Propositional Logic. • What is a proposition. • What is a compound proposition. • What are logical operators. • What is a truth table.

More Related