MA2185 Discrete Mathematics Lecturer: Dr. LO Wing Cheong Jon ( CA1 ) Office: Y6628 Phone: 3442-4203 E-mail: wingclo@cityu.edu.hk Lecturer: Dr. WANG Jingjing ( CB1 ) Office: Y6502 Phone: 3442-2578 E-mail: jwang985@cityu.edu.hk Teaching Pattern: Duration of course: 1 Semester, 29/08/2022 – 26/11/2022 Lecture: 2+1 hrs lecture /week + 1 hr tutorial/week Assessment Pattern: 3 Assignments 10% , 1 Midterm Test (1.5 hrs): 20%, 1 Final Exam (3 hrs): 70% Make-up test will not be offered except in extraordinary circumstances. Grading pattern : Standard (A+, A, A-, ..., D, F). To be given a pass grade (i.e. D or above), a student has to obtain at least 30% of the maximum marks in the final examination. Contents of MA0102: 1. Logic, Proof and mathematical reasoning. Recurrence relation. 2. Sets and relations and functions. Cartesian product. 3. Counting and Probability: Counting techniques. Permutations and combinations. Probability, random variables, expectation, and variance. 4. Graph Theory: Graph definition and properties. Euler and Hamiltonian circuits. Graph coloring. Planarity. 5. Number Theory: Introduction to crypto, modulus operation and Inverse and GCD. Suggested reference books: 1. Kenneth P Bogart, Clifford Stein, and L. Drysdale , Discrete Mathematics for Computer Science , Key College Publishing, 2005 2. K. H. Rosen, Discrete Mathematics and Its Applications, 7th Edition, McGraw Hill, 2012 Month Week Arrangement August September Week 01 Chapter 1 Week 02 Chapter 1 Week 03 Chapter 1 and Chapter 2 Week 04 Chapter 2 Week 05 Chapter 2 October Week 06 Chapter 2 and Chapter 3 Week 07 Chapter 3 Week 08 Chapter 3 Week 09 Midterm Test November Week 10 Chapter 4 Week 11 Chapter 4 Week 12 Chapter 4 and Chapter 5 Week 13 Chapter 5 December Exam Weeks Final Exam 1 Chapter 1 MATHEMATICAL LOGIC 1 Introduction 2 Propositions and logical operators 3 Algebra of propositions 4 Predicates and quantifiers 5 Logical inference 6 Mathematical induction 1 INTRODUCTION With the advance of computer technology, computers are essential in many engineering products. Errors in software are becoming a major issue particularly in those places where safety is of primary concern. This is because a program running perfectly with test data is not necessarily error free. We will introduce the world of mathematical reasoning and will start with the basic entities called propositions and conclude with a powerful mathematical tool called mathematical induction Program verification is always difficult and also there are commercial and manpower constraints. Nevertheless, an understanding of mathematical logic is essential to make better future software engineers. 2 PROPOSITIONS AND LOGICAL OPERATORS A proposition is a statement which can be determined to be either true (T) or false (F), but not both. Example 2.1 Which of the following statements are propositions? (a) Beijing is the capital of China. (yes) (b) . (no) (c) What time is it? (no) (d) . (yes) (e) Stop writing! (no) The letters will be proposition ( statement ) which stand for arbitrary and unspecified simple propositions . The area of logic that deals with propositions is called the propositional calculus. A compound proposition is made up of simple propositions (propositional variables) with various logical connectives ( logical operators ) like: 1 2 x + = 1 1 3 + = ! , , , p q r ! 2 Read as Notation Example 1. and and 2. or or 3. not negation ~ 4. implies (if ...then... ) implies (if...then...) 5. equivalent if and only if We can build up propositions using old ones with logical operators. Negation Conjunction Disjunction Note however that the operator is inclusive, that is, is true whenever at least one of p or q is true. This operator is known as inclusive or One can also define exclusive or , denoted by , by the following truth table. Ù p q Ù Ú p q Ú ~ p ® p q ® « p q « not p and p q or p q Ú p q Ú Å p ~ p T F F T p q T T F F T F T F T F F F p q T T F F T F T F T T T F p q T T F F T F T F F T T F p q Ù p q Ú p q Å 3 Conditional is to represent the statement “ implies ” or “if then ”. Note that the English language uses implies with various meanings and is not as helpful in constructing a truth table. The logical operator implies, denoted by , is defined by the following truth table. Students may wonder why is true when p is false. Here is an example to illustrate the point. People quite often wonder why human beings exist on this earth. Some believe that God created human beings while others believe that we come from evolution. Only one of these two beliefs is correct or both of them are wrong. Let p denote “God created human beings” and r denote “human beings exist on this earth”. You may say that p → r is true if you believe in God. Let q denote “We come from evolution” and r denote “human beings exist on this earth”. You may say that q → r is true if you believe in evolution. If you are not sure whether there is a God or whether evolution is true, you may think that both propositions are “reasonable”. In the definition of the truth table for with q being true, the proposition is considered as true even though p is false. In , p is called the hypothesis (or antecedent or premise ) and q is called the conclusion (or consequence ). In addition, in p is called a sufficient condition for and q is called a necessary condition for p Example 2.2 (Necessary & sufficient conditions) (a) Converting the following necessary condition to if – then form: “ George’s attaining age 15 is a necessary condition for his being chairman of our mathematics club .” (b) Converting the following sufficient condition to if – then form: “ The fact that John was born in Hong Kong is a sufficient condition for him to be a HKSAR citizen .” Solution: (a) “ George is attaining age 15” , “G eorge is the chairman of our mathematics club” “ George’s attaining age 15 is a necessary condition for his being chairman of our mathematics club ” is equivalent to saying “ If George is the chairman of our mathematics club, then he is at least 15 years old”, that is, (b) “ John was born in Hong Kong” , “ John is a HKSAR citizen” “ The fact that John was born in Hong Kong is a sufficient condition for him to be a HKSAR citizen ” is equivalent to saying “ If John was born in Hong Kong, then he is a HKSAR citizen ”, that is, p q ® p q p q ® p q ® p q ® p q ® p q ® q p = q = q p ® p = q = p q ® p q T T F F T F T F T F T T p q ® 4 Biconditional The logical operator equivalent, denoted by , has the following truth table. That is, is true whenever p and q have the same truth value. We say that “ p if and only if q ”. “ p only if q ” means “if not q then not p ” or , equivalently, “if p then q ”. “ p if and only if q ”, denoted by or by p iff q , means “ p if q and p only if q ”, that is, In order to reduce the number of parentheses used when we construct a compound proposition, we specify the precedence of logical operators as follows: Operator Precedence 1 2 2 3 3 Example 2.3 (a) can be expressed as (b) can be expressed as (c) can be expressed as (d) is different from (why?). A compound proposition that is always true, no matter what the truth values of the propositional variables that occur in it, is called a tautology . A compound proposition that is always false is called a contradiction The propositions and are examples of a tautology and a contradiction respectively. We will use to denote a tautology and to denote a contradiction. « p q « p q « ( ) ( ) q p p q ® Ù ® ~ Ù Ú ® « ( ) ( ) ~ p q Ù ~ p q Ù ( ) ( ) ( ) ~ ~ p q Ù ~ ~ p q Ù ( ) ( ) p q r Ù ® p q r Ù ® ~ p q Ù ( ) ~ p q Ù ! ~ p p Ú ~ p p Ù t f p q T T F F T F T F T F F T p q « 5 3 ALGEBRA OF PROPOSITIONS Two propositional forms are said to be logically equivalent if they have the same truth table. If propositions and are logically equivalent, then we write or It is often convenient to replace one proposition by a simpler one that is logically equivalent. Example 3.1 Show by using a truth table that the propositions and are logically equivalent. Solution: We find the truth table of the two propositions. Columns and are the truth values of and , respectively. Since these two columns are identical, we conclude that and have the same truth table and they are therefore logically equivalent. Example 3.2 Which of the following propositions is/are logically equivalent to ? (i) ,(ii) , (iii) Solution: From the truth table, we find that is equivalent to * ** Columns and ** are of the same. Let be propositions. Using the method illustrated in the previous examples, it is easy to obtain the following list of logical identities. Idempotent Laws Commutative Laws A B A B º A B Û ( ) ~ p q Ù ~ ~ p q Ú * • * • ( ) ~ p q Ù ~ ~ p q Ú ( ) ~ p q Ù ~ ~ p q Ú ! p q ® ~ ~ p q ® q p ® ~ ~ q p ® ~ ~ q p ® p q ® * ! , , A B C , A A A A A A º Ú º Ù , A B B A A B B A Ú º Ú Ù º Ù p q T T F F T F T F F T T F F F T F T F T T T F T T T F T F T T T T p q T T F F T F T F T F T T F T F T F F F T T T T T ( ) ~ ~ ~ p q p q Ù Û Ú p q ® ~ ~ q p ® 6 Associative Laws Distributive Laws De Morgan’s Laws Domination Laws Identity Laws Double Negation Law Implication Contrapositive Equivalence Proposition 3.1 Let be a compound proposition containing the proposition and let be a proposition that is logically equivalent to . Let be the proposition obtained from by replacing some or all occurrences of the proposition in with . Then is logically equivalent to Example 3.4 Example 3.5 Simplify the proposition using the logical identities. Solution: Example 3.6 Show that is a tautology. Solution: Note that this can also be proved by using truth tables. ( ) ( ) ( ) ( ) , A B C A B C A B C A B C Ú Ú º Ú Ú Ù Ù º Ù Ù ( ) ( ) ( ) ( ) ( ) ( ) , A B C A B A C A B C A B A C Ù Ú º Ù Ú Ù Ú Ù º Ú Ù Ú ( ) ( ) ~ ~ ~ , ~ ~ ~ A B A B A B A B Ú º Ù Ù º Ú , A t t A f f Ú º Ù º , A t A A f A Ù º Ú º ( ) ~ ~ A A º ~ A B A B ® º Ú ~ ~ A B B A ® º ® ( ) ( ) A B A B B A « º ® Ù ® ! 1 B B A B 1 A 1 B B 1 B A 1 B 1 A ( ) ( ) ( ) ~ ~ ~ p q r p q r p q r Ú Ú º ® Ú º ® ® ! ( ) ( ) ( ) ( ) p q p r q r ® Ú ® ® Ú ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ~ ~ ~ ~ ~ ~ ~ p q p r q r p q p r q r p q r q r p q r q r p q r q r p q r q r q r p q r t p q r ® Ú ® ® Ú º Ú Ú Ú ® Ú º Ú Ú ® Ú º Ú Ú Ú Ú º Ù Ú Ú Ú º Ú Ú Ù Ú Ú Ú º Ú Ú Ù º Ú Ú ! ! ( ) p q p ® Ú ( ) ( ) ( ) ~ ~ p q p p q p p p q t q t ® Ú º Ú Ú º Ú Ú º Ú º ! 7 4 PREDICATES AND QUANTIFIERS A generalization of propositions propositional functions or predicates : propositions which contain variables. Consider the statement “ x/2 is an integer ”. This statement surely has a true or false value. However, before we determine the truth value of this statement, we need to consider the following questions: (i) What is the “range” of x ? (ii) Are we talking about all values of x or a specific value of x ? Say, if the range of x is the set of even integers, then the above statement is true. On the other hand, if x can be any integer, then the above statement is NOT true for all possible values of x Example 4.1 (a) “ x/2 is an integer ” can be denoted by P ( x ). (b) “ x equals y ” can be denoted by Q ( x , y ). (c) “ x + y = z ” can be denoted by R ( x , y , z). Example 4.2 What are the truth values of (a) R (1, 2, 3) and (b) R (0, 0, 1)? Solution: (a) True . (b) False Here x , y and z are called individual variables. Values of the individual variables must be drawn from a set which is called the universe of discourse U. A quantifier may be assigned to change a predicate into a proposition. The statement “ is true for every in the universe of discourse” can be written as . Here, means “for all”, “for every” and is known as the universal quantifier. Similarly, the statement “ there exists such that is true” can be written as . Here, means “there exists” and is known as the existential quantifier. The assertions and are no longer predicates because they do not depend on the value of any variable. They are propositions because they are either true or false. Example 4.3 , , Predicates become propositions once every variable is bound . An individual variable x in a predicate can be bound in two ways. The first is to assign a value from the universe of discourse to x (interpretation). The other is to quantify x using and Example 4.4 - ! ( ) P x x ( ) xP x " " x ( ) P x ( ) xP x $ $ ( ) xP x " ( ) xP x $ { } 1, 2,3 U = ( ) ( ) ( ) ( ) 1 2 3 xP x P P P " Û Ù Ù ( ) ( ) ( ) ( ) 1 2 3 xP x P P P $ Û Ú Ú ! U " $ 8 Let and : be a predicate. P ( x ) has no truth value until the variable x is bound. (a) When x is assigned a value, for instance , they are propositions and is false, is false, is true. (b) , are propositions. Observe that is false while is true. (c) is not a proposition since the variable y has not been bound. However, is a proposition which is true. Example 4.5 Let P ( x ) = { x 2 > 10} and U = {1, 2, 3, 4}. What is the truth value of $ xP ( x )? Solution: Since P (4) is true, $ xP ( x ) is true. Example 4.6 Let Q ( y ) = { y 2 - 9 y + 25 > 0} and U is the set of real numbers. What is the truth value of " yQ ( y )? Solution: Since for all real values of y , " yQ ( y ) is true. The truth values of the propositions such as and depend on the universe of discourse. For example, let stand for “ is an integer”. Then Universe of discourse All integers All even numbers All odd numbers F T T T F F Example 4.7 Rewrite each of the following statements using predicates and quantifiers. (a) All triangles have three sides. (b) No dogs have wings. (c) Some programs are structured. Solution: (a) Let P ( x ) = “ x has three sides” and U be the set of all triangles. Then, the statement can be expressed as " xP ( x ). (b) Let Q ( y ) = “ y has wings” and U be the set of all dogs. Then, the statement has the same meaning as “It is not true that there is a dog which has wings”. The proposition form is given by ~$ yQ ( y ). In { } , 2, 1, 0,1, 2, U = - - ! ! ( ) P x 0 x > ( ) ( ) ( ) 3 , 0 , 3 P P P - ( ) 3 P - ( ) 0 P ( ) 3 P ( ) ( ) ( ) ( ) ( ) ( ) 2 1 0 1 2 xP x P P P P P " Û Ù - Ù - Ù Ù Ù Ù ! ! ( ) ( ) ( ) ( ) ( ) ( ) 2 1 0 1 2 xP x P P P P P $ Û Ú - Ú - Ú Ú Ú Ú ! ! ( ) ( ) , xP x xP x " $ ( ) xP x " ( ) xP x $ ( ) ( ) ~ 0 P y P Ú ( ) ( ) 3 ~ 0 P P Ú ! ! 0 4 19 )] 2 9 ( [ 25 9 2 2 > + - = + - y y y ! ( ) 1 2 , , , n P c c c ! ( ) ( ) , xP x xP x " $ ( ) P x 2 x ( ) xP x " ( ) xP x $ 9 fact, the statement can also be expressed as " y [ ~ Q ( y )]. (c) Let R ( z ) = “ z is structured” and U be the set of all programs. Then, the statement can be expressed as $ zR ( z ). Example 4.8 Rewrite each of the following statements using predicates and quantifiers. (a) Given any positive number, there is another positive number that is smaller than the given number. (b) There is a positive number with the property that all positive numbers are smaller than this number. Solution: Let U be the set of positive numbers and x , y are in U (a) " x $ y ( y < x ) (The statement is true.) (b) $ x " y ( y < x ) (The statement is false.) From the above example, we note that " x $ y ( y < x ) and $ x " y ( y < x ) have different truth values. If P is a predicate with n free variables, then binding an individual variable reduces the number of free variables by one. A predicate with no free variable is obviously a proposition. Example 4.9 Let stand for “ ”. (a) is a predicate with one free variable. (b) is a proposition. This proposition asserts that for any x and any z , there is y so that . Further, it is true if the universe of discourse is the set of all real numbers and is false if the universe of discourse is the set of all natural numbers. We now discuss the calculus of predicates. We first generalize the concept of logical equivalence which was introduced in the last section. Two propositions P and Q containing quantifiers are said to be logically equivalent if for every universe of discourse and for every interpretation of the predicate variables, P and Q have the same truth values. In this case, we write Example 4.10 Assume that U contains the elements x 1 , x 2 , ..., x n . Show that Solution: can be interpreted as “It is not true that for all x , P ( x ) is true”. That is ~ [ P ( x 1 ) Ù P ( x 2 ) Ù ... Ù P ( x n )] º ~ P ( x 1 ) Ú ~ P ( x 2 ) Ú ... Ú ~ P ( x n ) (De Morgan’s Law) which means “There exists x such that P ( x ) is false”, or equivalently ! ! ( ) , , P x y z x y z + = ( ) , , x yP x y z $ " ( ) , , x z yP x y z " " $ x y z + = ! P Q º ( ) ( ) ~ ~ xP x x P x " º $ ( ) ~ xP x " ( ) ~ x P x $ ! 10 Using similar arguments, we can show the following identities: Note that here proposition Q is independent of x Also take care the following: Example 4.11 Show that the identity is valid. Solution: Remark : Let be the collection of all objects under consideration, A be the collection of the objects of U which have property A , and B be the collection of objects of U which have property B. Observe that there may be three different relations between A and B (I) Every member of A is a member of B U Then is a true proposition. Therefore, we would express the case that every member of A is a member of B by Example 4.12 Let be the collection of all creatures , “ x is a human being”, B ( x ): “ x needs oxygen”. Then “every human being needs oxygen” can be expressed as ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ~ ~ ~ ~ , , , , † xP x x P x xP x x P x x yP x y y xP x y x yP x y y xP x y x P x Q x xP x yQ y x P x Q x xP x yQ y x P x Q xP x Q x P x Q " º $ $ º " " " º " " $ $ º $ $ é ù é ù " Ù º " Ù " $ Ú º $ Ú $ ë û ë û é ù é ù " Ù º " Ù $ Ù ë û ë ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) xP x Q x P x Q xP x Q x P x Q xP x Q x P x Q xP x Q x P x Q xP x Q x P Q x P xQ x x P Q x P xQ x º $ Ù û é ù é ù " Ú º " Ú $ Ú º $ Ú ë û ë û é ù é ù " ® º $ ® $ ® º " ® ë û ë û é ù é ù " ® º ® " $ ® º ® $ ë û ë û † ( ) , x yP x y " $ º ( ) ( ) ( ) , , y xP x y x P x Q x é ù $ " " Ú º ë û ( ) ( ) ( ) ( ) , xP x yQ y x P x Q x é ù " Ú " $ Ù º ë û ( ) ( ) xP x yQ y $ Ù $ ( ) ( ) ( ) ( ) ( ) x y P x Q y xP x yQ y é ù $ $ ® º " ® $ ë û ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ~ ~ ~ ~ x y P x Q y x y P x Q y x P x yQ y x P x yQ y xP x yQ y xP x yQ y é ù é ù é ù $ $ ® º $ $ Ú º $ Ú $ ë û ë û ë û º $ Ú $ º " Ú $ º " ® $ ! U ( ) ( ) x A x B x é ù " ® ë û ( ) ( ) x A x B x é ù " ® ë û U ( ) : A x ( ) ( ) x A x B x é ù " ® ë û 11 Remark: “every human being needs oxygen” expressed as is incorrect, why? (II) A and B have some member in common. U Then is true. Therefore, we would express the case that A and B have some member in common by Example 4.13 Let be the collection of all creatures , “ x is a bacterial”, B ( x ): “ x needs no oxygen”. Then “some bacterial needs no oxygen” can be expressed as (III) A and B have no members in common. U Then is true. Therefore, we would express the case that A and B have no members in common by ( ) ( ) x A x B x é ù " Ù ë û ! ( ) ( ) x A x B x é ù $ Ù ë û ( ) ( ) x A x B x é ù $ Ù ë û U ( ) : A x ( ) ( ) x A x B x é ù $ Ù ë û ! ( ) ( ) ~ x A x B x é ù " ® ë û ( ) ( ) ~ x A x B x é ù " ® ë û 12 5 LOGICAL INFERENCE Let us begin with unquantified propositions. Consider the following case. Suppose that we know “Samson is a boxing champion” and “If Samson is a boxing champion, then Samson is strong”. We can immediately conclude that Samson is strong. We put this in the language of mathematics as follows. Let and denote respectively “Samson is a boxing champion” and “Samson is strong”. Then our example is known as an argument, in which and are called hypotheses or premises and is called the conclusion. This argument can be symbolically represented as In general, if an argument has n premises and a conclusion B , then we say that the argument is valid if is a tautology. Therefore, a valid argument can be checked easily by drawing up a truth table. On the other hand, we may assume that all the premises are true. Based on this assumption, if we can show that the conclusion B is also true, then the argument is valid . If is a tautology, it is denoted as and we say that logically imply Example 5.1 Use a truth table to verify Solution: We have to show that (*) A B A A B ® B A A B B ® \ 1 2 , , , n A A A ! 1 2 n A A A B Ù Ù Ù ® ! 1 2 , , , n A A A ! 1 2 n A A A B Ù Ù Ù ® ! 1 2 n A A A B Ù Ù Ù Þ ! 1 2 , , , n A A A ! B p q p r q r Ù ® \ Ù ( ) ( ) ( ) p q p r q r é ù Ù Ù ® Þ Ù ë û p q r T T T T F F F F T T F F T T F F T F T F T F T F T T T T T T F F T F F F T T F F F F T F F F T T T F F T T F F F T T F F F F T F ( ) ( ) ( ) p q p r q r é ù Ù Ù ® ® Ù ë û 13 From the column (*), observe that is a tautology, that is, . It follows that is valid. We mention below a number of valid arguments that occur quite often in our daily life. (1) addition (2) simplification (3) modus ponens (4) modus tollens (5) hypothetical syllogism (6) disjunctive syllogism (7) conjunction (8) constructive dilemma (9) destructive dilemma The above are rules of inference. Of course, there is no need to remember all these names. Proficiency in applying these rules is more important. Example 5.2 Show the validity of Proof: 1. p 2. p 3. Assume that p º t 4. from 1, 3 5. from 2, 4 6. from 3, 5 The argument is thus valid. ( ) ( ) ( ) p q p r q r é ù Ù Ù ® ® Ù ë û ( ) ( ) ( ) p q p r q r é ù Ù Ù ® Þ Ù ë û p q p r q r Ù ® \ Ù ! A A B \ Ú A B A Ù \ A A B B ® \ ~ ~ B A B A ® \ A B B C A C ® ® \ ® ~ A B A B Ú \ A B A B \ Ù ( ) ( ) A B C D A C B D ® Ù ® Ú \ Ú ( ) ( ) ~ ~ ~ ~ A B C D B D A C ® Ù ® Ú \ Ú p q q r p r ® ® \ ® p q ® q r ® q r p r ® ! 14 Example 5.3 Show the validity of Solution: Assertions 1. p 2. p 3. p 4. from 3 5. from 2 and 4 6. from 5 7. from 1 and 6 8. from 7 9. from 8 The argument is thus valid. Example 5.4 Determine whether the following argument is valid: “If I have a lot of friends, then I will be happy. If I study the BSCM Major, then I will be clever and have a lot of friends. If I am clever and happy, then I will not have any worries in life. However, I will have worries in life. Therefore, I do not study the BSCM Major.” Solution: Let LF = “ I have a lot of friends ”, H = “ I will be happy ”, CS = “ I study the BSCM programmed ”, C = “ I will be clever ”, W = “ I will have worries in life ”. Assertions p q r s p r q s ® ® Ú \ Ú p q ® r s ® p r Ú ~ p r ® ~ p s ® ~ s p ® ~ s q ® s q Ú q s Ú ! W 4. W ~ ) H (C 3. LF) (C CS 2. H LF 1. ® Ù Ù ® ® Premises 15 The argument is thus valid. Example 5.5 Determine whether the following argument is valid: “ Taxes will increase or government spending decrease. Government spending increases or more people have jobs. If people are poor or the economy is bad, then fewer people will have jobs. Therefore, if taxes decrease people are rich .” Solution: Let I = “ Taxes will increase ”, G = “ Government spending decreases ”, J = “ More people have jobs ”, P = “ People are rich ”, E = “ Economy is bad ”. Assertions The argument is thus valid. How do we show that an argument is not valid ? ! J ~ E) P (~ 3. J G ~ 2. G I 1. ® Ú Ú Ú P I ~ ® \ Premises Conclusion 10 4, P I ~ 11. 9 T P 10. 8 6, T E ~ P 9. 7 E) ~ (P J 8. 3 E) P (~ ~ J 7. 5 2, T J 6. 4 1, T G 5. F I that Assume 4. ® º º Ù Ù ® Ú ® º º º 16 Let be the premises and the conclusion of the argument. Let be the propositional variables occurring in . To show that the argument is not valid, we need to find the truth values for which make true but false. Example 5.6 Show that is not valid. Solution: Observe that the values and make the premises true and the conclusion false. Example 5.7 Check if is valid. Solution: Look at the argument . It contains four propositional variables. To list a complete truth table to check whether is a tautology is definitely a heavy job. We may first assume that, in the truth table, there is a “F” under and then chase back the truth value of the individual proposition to see whether such a case may exist. If no such a case exists, then the argument is valid, otherwise, invalid. Same as in Example 5.6, we first assume that is invalid. That is, we have 1 2 , , , n A A A ! B 1 2 , , , s p p p ! 1 2 , , , , n A A A B ! 1 2 , , , s p p p ! 1 2 , , , n A A A ! B ( ) p q r p q r ® ® Ú \ "F", "T" p q "F" r ! p q r s p r q s ® ® Ú \ Ú ( ) ( ) ( ) ( ) p q r s p r q s ® Ù ® Ù Ú ® Ú ( ) ( ) ( ) ( ) p q r s p r q s ® Ù ® Ù Ú ® Ú " " ® p q r s p r q s ® ® Ú \ Ú 17 So , then Finally, Consider the proposition . Observe that two “F”s cannot give a “T”. Therefore, the assumption that “the argument is invalid” cannot be accepted. It follows that the argument is valid. Example 5.8 Check if the following argument is valid. “ There are many job vacancies and the unemployment rate is low. If there are many job vacancies, then either the economy is thriving or wages are too low. If wages are not too low, then the unemployment rate is low. Therefore, the economy is thriving. ” Solution: Let j denote “there are many job vacancies”, u “unemployment rate is low”, w “wages are too low”, e “economy is thriving”. There are two methods: (a) Use a truth table to check whether is a tautology. If it is a tautology then the argument is valid, otherwise the argument is not. (b) Use the rules of inference to reduce the premises to simpler form. From there deduce the conclusion or find a counter example. We will use the second method here. Assertions 1. p (premise) 2. j from 1 3. u from 1 4. p 5. from 2 and 4 6. p We cannot proceed any further from here. We guess that the argument is not valid. That is, ( ) ( ) ( ) ( ) F p q r s p r q s ® Ù ® Ù Ú ® Ú ( ) ( ) ( ) ( ) T T F p q r s p r q s ® Ù ® Ù Ú ® Ú F F T T T ) ( ) ( ) ( ) ( s q r p s r q p Ú ® Ú Ù ® Ù ® F F F F F T F F T F ) ( ) ( ) ( ) ( s q r p s r q p Ú ® Ú Ù ® Ù ® p r Ú ! ( ) [ ] ( ) ( ) ~ j u j e w w u e é ù Ù Ù ® Ú Ù ® ® ë û j u Ù ( ) j e w ® Ú e w Ú ~ w u ® 18 Then So Thus, Let Then the premises are all true, whereas the conclusion e is false. We therefore conclude that the argument is invalid. We next deal with assertions involving predicates and quantifiers. The following four rules describe when and can be deleted from or added to an assertion. These should be obvious to all. Let P be a predicate, a variable representing an arbitrary element in the universe of discourse and c be a specific element in the universe of discourse. Then (1) Universal Instantiation, abbreviated to ui or (2) Universal Generalization, ug (3) Existential Instantiation, ei (4) Existential Generalization, eg Note that universal generalization says that if we can show that the assertion holds for an arbitrary of the universe of discourse, then holds. With (1) and (4), we also have the following rule of inference: ( ) [ ] ( ) ( ) ~ F j u j e w w u e é ù Ù Ù ® Ú Ù ® ® ë û ( ) [ ] ( ) ( ) ~ T T F j u j e w w u e é ù Ù Ù ® Ú Ù ® ® ë û ( ) [ ] ( ) ( ) ~ T T T F j u j e w w u e é ù Ù Ù ® Ú Ù ® ® ë û ( ) [ ] ( ) ( ) ~ T T T F T F j u j e w w u e é ù Ù Ù ® Ú Ù ® ® ë û be "T", "T", "F", "T" j u e w ( ) , , ~ j u j e w w u Ù ® Ú ® ! " $ y ( ) ( ) xP x P c " \ ( ) ( ) xP x P y " \ ( ) ( ) P y xP x \" ( ) ( ) xP x P c $ \ ( ) ( ) P c xP x \$ ( ) P y y ( ) xP x " 19 Example 5.9 (a) Let the universe of discourse U = the set of creatures; “ is a human being”; : “ slips”. Let p stand for “it rains today” and q “it snows today”. Express the sentence “ If it rains and snows today, then somebody slips .” using predicates and quantifiers. (b) Let the universe of discourse U = the set of creatures; “ is a human being”; : “ will die”. Let denote Socrates. Express the argument “ Every human being will die, and Socrates is a human being. Therefore, Socrates will die. ” using predicates and quantifiers. Solution: (a) or (b) Example 5.10 Let the universe U = “the set of animals”, “ is a quadruped (an animal with four legs)”, : “ is a human being”; “ is a woman”. Express the following argument using predicates and quantifiers, and determine whether it is valid. “ No human beings are quadrupeds. All women are human beings. Therefore, no women are quadrupeds. ” Solution: Assertions 1 p 2. p 3. from 2, ui 4. from 1, ui 5. from 3, 4 6. from 5, ug The argument is thus valid. ( ) ( ) xP x xP x " \$ ( ) : H x x ( ) S x x ( ) : H x x ( ) D x x c ( ) ( ) p q x H x S x é ù Ù ® $ Ù ë û ( ) ( ) x p q H x S x é ù é ù $ Ù ® Ù ë û ë û ( ) ( ) ( ) ( ) x H x D x H c D c é ù " ® Ù Þ ë û ! ( ) : Q x x ( ) H x x ( ) : W x x ( ) ( ) ( ) ( ) ( ) ( ) ~ ~ x H x Q x x W x H x x W x Q x é ù é ù é ù " ® Ù " ® Þ " ® ë û ë û ë û ( ) ( ) ~ x H x Q x é ù " ® ë û ( ) ( ) x W x H x é ù " ® ë û ( ) ( ) W y H y ® ( ) ( ) ~ H y Q y ® ( ) ( ) ~ W y Q y ® ( ) ( ) ~ x W x Q x é ù " ® ë û !