1 / 39

Computing Mathematics

Computing Mathematics. Agenda. Your Lecturer and tutors Module Objective Module Assessments and Syllabus Summary Recommended readings. Your Lecturer and Tutor Are…. Mr.Ashok Dhungana. Mr. Roshan Chaudhary (Islington College) Tutor. (Islington College) Sr. Lecturer.

diella
Télécharger la présentation

Computing Mathematics

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. Computing Mathematics

  2. Agenda • Your Lecturer and tutors • Module Objective • Module Assessments and Syllabus Summary • Recommended readings

  3. Your Lecturer and Tutor Are… Mr.Ashok Dhungana Mr. Roshan Chaudhary (Islington College) Tutor (Islington College) Sr. Lecturer

  4. Me And Islington…

  5. Me And Islington…

  6. Syllabus • Week 1: Introduction to logic • Week 2 :Sets and Probability • Week 3 :Number Bases • Week 4 : Relations and Functions • Week 5 : Methods of proofs Each week there will be one lecture and one tutorial.

  7. Module Assessments • Assessments: 100% EXAM (Week 6 ) Its a closed book unseen exam of 2 hours . Note:- Students should obtain 40% on examination to pass.

  8. INTRODUCTION TO LOGIC

  9. Introduction to Logic • what logic is; • about the basis of logic: the simple statement; • how to construct a truth table; • about the five basic logic connectives ; • what makes a statement a tautology; • what makes a statement a contradiction; • what logical equivalence is; • what makes an argument valid;

  10. WHAT IS LOGIC? • Logic is the study of the principles and methods used in distinguishing valid arguments from those that are invalid. • Logic is also known as propositional calculus.

  11. SIMPLE STATEMENTS • The basic building block in logic is the statement, also referred to as a proposition. • A statement is a declarative sentence, which can only be either true or false. • Statements are represented by letters such as p, q, and r, . . . • Example: Jakarta is a city in Indonesia

  12. COMPOUND STATEMENTS • The combination of two or more simple statements is a compound statement, or compound proposition. • Example: “2 + 1 = 5” and “6 + 2 = 8” • Example: “The sky is clear” or “It is raining today” • The variables p, q, r, . . . denote simple statements in the compound proposition , where P is a proposition.

  13. BASIC LOGIC CONNECTIVES Compound statements are connected using mainly five basic connectives: • conjunction • disjunction • negation • conditional • bi conditional

  14. CONJUNCTION • Any two statements can be combined by the word “and” to form a composite statement which is called the conjunction of the original statements. • The connection of the statements p and q is symbolically represented by pΛq • If p is true and q is true then pΛq is true; otherwise pΛq is false

  15. CONJUNCTION Example 1: Sidney is in Australia and 2 + 2 = 4 Example 2: Sidney is in Australia and 2 + 2 = 5 Example 3: Sidney is in Malaysia and 2 + 2 = 4 Example 4: Sidney is in Malaysia and 2 + 2 = 5 • Only example 1 contains two simple statements which are true, the others all contain simple statements in which at least one of them is false, so only example 1 is true.

  16. DISJUNCTION • Any two statements can be combined by the word “or” , to form a new statement which is called the disjunctionof the original two statements. • The connection of the statements p or q is symbolically represented by pνq • If p is true or q is true or both p and q are true, then pνq is true; otherwise pνq is false.

  17. DISJUNCTION Example 1: Sidney is in Australia or 2 + 2 = 4 Example 2: Sidney is in Australia or 2 + 2 = 5 Example 3: Sidney is in Malaysia or 2 + 2 = 4 Example 4: Sidney is in Malaysia or 2 + 2 = 5 • Only example 4 is false. Each of the other compound statements is true since at least one of its simple statements is true.

  18. NEGATION • Given any statement p, another statement, called the negation of p, can be formed by writing “It is false that . . .” before p or, if possible, by inserting in p the word “not” • Negation can be symbolically represented by ~p, or ┐p • The truth values of ~p in a truth table: • If p is true then ~p is false; if p is false, then ~p is true. Example : If p is ‘Sidney is in Australia’, then ‘Sidney is not in Australia’ is the negation ~p

  19. CONDITIONAL Many statements, especially in mathematics, are of the form “If p then q” or “p implies q”. Such statements are calledconditional statements. Conditional statements are symbolically represented as p→q The conditional p→q is true unless p is true and q is false.

  20. Conditional Example 1: If Sidney is in Australia then 2 + 2 = 4 Example 2: If Sidney is in Australia then 2 + 2 = 5 Example 3: If Sidney is in Malaysia then 2 + 2 = 4 Example 4: If Sidney is in Malaysia then 2 + 2 = 5 • By the conditional p → q only example 2 is false. But how can this be as clearly ‘2 +2 = 4’ is true and ‘2 + 2 = 5’ is clearly false?

  21. BICONDITIONAL • Another common statement called a bi conditional statementis of the form “p iff q” • Bi conditional statements are symbolically represented as p↔q • If p and q have the same truth value, then p↔q is true; • if p and q have opposite truth values, then p↔q is false.

  22. BICONDITIONAL Example 1: Sidney is in Australia iff 2 + 2 = 4 Example 2: Sidney is in Australia iff 2 + 2 = 5 Example 3: Sidney is in Malaysia iff 2 + 2 = 4 Example 4: Sidney is in Malaysia iff 2 + 2 = 5 By the conditional p ↔ q examples 1 & 4 are true, examples 2 & 3 are false. pq can be represented as

  23. BASIC LOGIC CONNECTIVES

  24. PROPOSITIONS AND TRUTH TABLES Example : The truth table of the proposition is: Observe that the first columns of the table are for the variables p, q, . . . and there are enough rows in the table to allow for all possible combinations of T and F for these variables, i.e. the number of rows = Construct a truth table for the following: 1. (a ᴧ ~b) ↔ (a ᴧ b) 2. (a v b) → ~c

  25. TAUTOLOGY • A compound proposition that is always TRUE is called a tautology. • Example : p Ú ~p is a tautology as all entries in the last column are T’s Show that the following are tautologies : 1.(p ᴧ q) → (p v ~q) 2. [(p ↔ q) ᴧ ~p] → ~q 3. (p v ~q) ↔ ~(~p ᴧ q)

  26. CONTRADICTION • A compound proposition that is always FALSE is called a contradiction. • Example : p Ù ~p is a contradiction as all entries in the last column are F’s Show that the following are contradictions: 1.(p → q) ᴧ ( ~q ᴧ p) 2. (p ᴧ q) ᴧ ~ (p v q) 3.(p → q) ᴧ (~q ᴧ p)

  27. LOGICAL EQUIVALENCE • Two propositions and are said to be logically equivalent if the final columns in their truth tables are the same. • Logical equivalence is denoted with ≡ Example: Show that p → q and ~q → ~p are logically equivalent.

  28. LOGICAL EQUIVALENCE • Example: Show that (p→q) Λ (q→p) p↔q • Since the last two columns in the truth tables are the same the statements are logically equivalent.

  29. De MORGAN’S LAWS • De Morgan’s Laws states that: • ~ ( p ᴧ q) ≡ ~ p v ~ q • ~ ( p v q) ≡ ~ p ᴧ ~ q • Prove the De Morgan's laws using truth table.

  30. ARGUMENTS • An argument is a relationship between a set of propositions, , called premises, and another proposition Q, called the conclusion.An argument is denoted by ├ Q • An argument ├ Q is said to be valid iff is a tautology.

  31. Questions Determine the validity of the following arguments: 1. p v q , ~p Ⱶ q 2. p → q , q → r , ~r Ⱶ ~p 3. If you do not study you will fail your examination. You failed therefore you did not study. 4. If I am not in Malaysia, then I am not happy; if I am happy, then I am singing; I am into singing; therefore, I am not in Malaysia

  32. Logic Gates • NOT gate • AND gate • OR gate • NAND gate • NOR gate

  33. P P NOT P NOT P T 1 F 0 F 0 T 1 NOT P OUTPUT INPUT NOT-GATE Truth Table

  34. p q p v q 0 0 0 0 1 1 1 0 1 1 1 1 OUTPUT p v q p INPUTS q OR-GATE Truth Table OR-GATE

  35. 0 1 0 p 1 q 1 1 0 0 0 0 p ᴧ q 0 1 INPUTS OUTPUT p ᴧ q p q AND-GATE Truth Table AND-GATE

  36. 1 A 0 1 0 0 1 0 B 1 1 1 1 0 A NAND B A NAND B p q p Symbol q A NAND B NAND-GATE Truth Table

  37. Truth Table 1 1 0 A 0 1 0 1 0 B A NOR B 0 0 1 0 A NOR B A B A B A NOR B NOR-GATE

  38. Summary Propositions Basic logical connectives Tautology Contradiction Arguments Logic Gates

  39. The End

More Related