UNIT 2: A DISCUSSION ON FUNDAMENTALS OF LOGIC

Similar documents
CS100: DISCRETE STRUCTURES. Lecture 5: Logic (Ch1)

Propositional Logic. Spring Propositional Logic Spring / 32

Chapter 1: The Logic of Compound Statements. January 7, 2008

Discrete Structures of Computer Science Propositional Logic III Rules of Inference

3/29/2017. Logic. Propositions and logical operations. Main concepts: propositions truth values propositional variables logical operations

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

PROPOSITIONAL CALCULUS

2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic

2. The Logic of Compound Statements Summary. Aaron Tan August 2017

DISCRETE MATHEMATICS BA202

Chapter 1 Elementary Logic

Logic, Sets, and Proofs

Logic Overview, I. and T T T T F F F T F F F F

Review. Propositional Logic. Propositions atomic and compound. Operators: negation, and, or, xor, implies, biconditional.

CSC Discrete Math I, Spring Propositional Logic

10/5/2012. Logic? What is logic? Propositional Logic. Propositional Logic (Rosen, Chapter ) Logic is a truth-preserving system of inference

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

LOGIC CONNECTIVES. Students who have an ACT score of at least 30 OR a GPA of at least 3.5 can receive a college scholarship.

A. Propositional Logic

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook)

HANDOUT AND SET THEORY. Ariyadi Wijaya

n logical not (negation) n logical or (disjunction) n logical and (conjunction) n logical exclusive or n logical implication (conditional)

software design & management Gachon University Chulyun Kim

The Logic of Compound Statements cont.

Unit I LOGIC AND PROOFS. B. Thilaka Applied Mathematics

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

Logic and Propositional Calculus

Introduction to Sets and Logic (MATH 1190)

Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014

Propositional Logic. Fall () Propositional Logic Fall / 30

What is Logic? Introduction to Logic. Simple Statements. Which one is statement?

THE LOGIC OF COMPOUND STATEMENTS

Logic and Proofs. (A brief summary)

Packet #1: Logic & Proofs. Applied Discrete Mathematics

Math 3336: Discrete Mathematics Practice Problems for Exam I

Packet #2: Set Theory & Predicate Calculus. Applied Discrete Mathematics

Mat 243 Exam 1 Review

n Empty Set:, or { }, subset of all sets n Cardinality: V = {a, e, i, o, u}, so V = 5 n Subset: A B, all elements in A are in B

Discrete Structures & Algorithms. Propositional Logic EECE 320 // UBC

1.1 Statements and Compound Statements

COMP 182 Algorithmic Thinking. Proofs. Luay Nakhleh Computer Science Rice University

2.2: Logical Equivalence: The Laws of Logic

Intro to Logic and Proofs

Logic. Definition [1] A logic is a formal language that comes with rules for deducing the truth of one proposition from the truth of another.

Review. Propositions, propositional operators, truth tables. Logical Equivalences. Tautologies & contradictions

The statement calculus and logic

Propositional Logic. Argument Forms. Ioan Despi. University of New England. July 19, 2013

Steinhardt School of Culture, Education, and Human Development Department of Teaching and Learning. Mathematical Proof and Proving (MPP)

Today s Lecture 2/25/10. Truth Tables Continued Introduction to Proofs (the implicational rules of inference)

ECOM Discrete Mathematics

Introduction Logic Inference. Discrete Mathematics Andrei Bulatov

Topics in Logic and Proofs

Logic and Propositional Calculus

Compound Propositions

Introduction to Decision Sciences Lecture 2

1.1 Language and Logic

1 The Foundation: Logic and Proofs

Chapter 1, Logic and Proofs (3) 1.6. Rules of Inference

Section 1.1: Logical Form and Logical Equivalence

A Quick Lesson on Negation

MAT2345 Discrete Math

2/13/2012. Logic: Truth Tables. CS160 Rosen Chapter 1. Logic?

Chapter Summary. Propositional Logic. Predicate Logic. Proofs. The Language of Propositions (1.1) Applications (1.2) Logical Equivalences (1.

1 The Foundation: Logic and Proofs

A Little Deductive Logic

ICS141: Discrete Mathematics for Computer Science I

Section 1.1 Propositions

Proposition logic and argument. CISC2100, Spring 2017 X.Zhang

Where are my glasses?

Manual of Logical Style (fresh version 2018)

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

3 The Semantics of the Propositional Calculus

Manual of Logical Style

Rules Build Arguments Rules Building Arguments

Logic and Proof. Aiichiro Nakano

5. Use a truth table to determine whether the two statements are equivalent. Let t be a tautology and c be a contradiction.

Logic. Logic is a discipline that studies the principles and methods used in correct reasoning. It includes:

Propositional Logic. Jason Filippou UMCP. ason Filippou UMCP) Propositional Logic / 38

A Little Deductive Logic

COMP 2600: Formal Methods for Software Engineeing

Discrete Mathematics

Review of Predicate Logic

Discrete Structures of Computer Science Propositional Logic I

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

1.1 Language and Logic

Introduction to Metalogic

WUCT121. Discrete Mathematics. Logic. Tutorial Exercises

UNIVERSITY OF CALICUT SCHOOL OF DISTANCE EDUCATION B Sc (MATHEMATICS) I Semester Core Course. FOUNDATIONS OF MATHEMATICS (MODULE I & ii) QUESTION BANK

Logic and Proofs. (A brief summary)

Section 1.3. Let I be a set. When I is used in the following context,

EECS 1028 M: Discrete Mathematics for Engineers

Advanced Topics in LP and FP

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics. Introductory Notes in Discrete Mathematics Solution Guide

Introducing Proof 1. hsn.uk.net. Contents

III. Elementary Logic

Artificial Intelligence: Knowledge Representation and Reasoning Week 2 Assessment 1 - Answers

Theorem. For every positive integer n, the sum of the positive integers from 1 to n is n(n+1)

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.

Section 3.1 Statements, Negations, and Quantified Statements

PSU MATH RELAYS LOGIC & SET THEORY 2017

Transcription:

UNIT 2: A DISCUSSION ON FUNDAMENTALS OF LOGIC Introduction: Logic is being used as a tool in a number of situations for a variety of reasons. Logic is found to be extremely useful in decision taking problems. In computer science and engineering, knowledge of logic is essential in in the following field: Analysis of algorithms and implementation Development of algorithms into a structured program in a programming language. A material of logic theory forms a basis in theoretical computer science such as Artificial Intelligence, Fuzzy logic, functioning of expert systems etc. Many times while working on a project after the beginning steps, we always have a doubt regarding whether the direction followed is right or wrong? Are we doing the job correctly? Whether the decisions taken are correct or incorrect etc? It is here logic plays an important role; using which one can solve a problem with lot of confidence and satisfaction. With these few remarks, the next sections introduce formal symbolic logic. Basic Terminologies of logic: A Proposition is a declarative sentence written in some language, usually English, which is either true or false, but not both (i.e. true and false) at the same time. It is also referred as a simple statement or primitive proposition or an atomic statement. A proposition is denoted by using lower case letters such as p, q, r, s etc. Every proposition has exactly one of the two truth values; either true or false. When it is true, the same is assigned a symbol T or 1. If the primitive statement is false, it is assigned the symbol F or 0. In view of this, a proposition may be defined as a pair either (p, T) or (p, F). This situation may be compared to what we discussed earlier in set theory. It is seen that with respect to a set A and an element x, there are only two options; either x is an element of A or x need not be an element of A. There too we used the numbers 1 and 0 to describe the situation. The following are examples of propositions: p: Dr. Manmohan Singh is the president of India. q: Mumbai is the financial capital of India r: Bangalore is the silicon valley of India. s: 3+3=5

t: Dr. Abdul Kalam was awarded Bharath Rathna What about the following? x+3 is an integer. Please come in! Are u alright? Complete work today itself What are you doing? What a beautiful evening! These are not considered as propositions. Because, x + 3 is an integer cannot be a proposition, as x is not specified. A statement of this kind is called an open statement. the statement gets a meaning only when x is assigned a value chosen from the universe of discourse of the problem considered. Others are either commands, or enquiries, or exclamatory sentences. These are not referred to as non-propositions. Discussion of various logical connectives Negation: Let p be a proposition. It is not the case that p is called as negation of the p. Simply, it is NOT p. This is denoted by the symbol Ø p. This situation can well be explained by using a truth table which is shown below: p Øp p Øp T F 1 0 F T 0 1 Disjunction or logical OR: Let p and q be simple propositions. A proposition obtained by combining p and q using logical OR is called p disjunction q. It is denoted by p Ú q. The truth value of p Ú q is false only when both p and q are false, otherwise, p Úq is a true proposition. This is explained in the truth table given below. p q p Úq T T T T F T F T T F F F Note: Logical operator is similar to the union operator in the case of set theory. Conjunction or logical AND:

Let p and q be simple propositions. A proposition obtained by combining p and q using logical AND is called p conjunction q. It is denoted by p Ù q. The truth value of p Ù q is true only when both p and q are true otherwise p Ù q is a false proposition. The same is explained in the truth table given below. p q p Ùq T T T T F F F T F F F F Note: Logical operator is similar to the intersection operator in the case of set theory. Also, logical OR and logical AND have dual characteristics. Thus, conjunction and disjunction are examples of dual operators. One sided implication or logical IMPLICATION or IF THEN : Let p and q be simple propositions. A proposition obtained by combining p and q using logical connective, namely, one sided IMPLICATION is called p implies q. It is denoted by p q. The truth value of p q is false only when p is true but q is a false proposition. In all other instances, p q is a true statement. The truth table is given below. p q p q T T T T F F F T T F F T Few examples: If 3+3=7, then Sunday is a Christmas is a holiday. If 3+2 = 5, then sun raises in the east. If tomorrow is Monday, then yesterday was Saturday. If 32 7 = 23, then 5 + 6 = 9. Note: p implies q can be explained in many ways. 1. if p then q

2. p is sufficient for q 3. q is necessary for p 4. p only if q Bi-conditional or two sided implication OR IF AND ONLY IF or IFF: Let p and q be two simple propositions. p Bi-conditional q is a compound proposition denoted by the symbol p q. he truth value of p q is true only when both p and q are assigned the same truth value; otherwise, its truth value is false. p q p q T T T T F F F T T F F F Note: Here, p is necessary and also sufficient for q. p bi-conditional q is to be read as p if and only if q. Exclusive logical OR: Consider two propositions, say, p and q. Then p exclusive or q is a compound proposition whose true value is false when both p and q have the same truth values. Otherwise, the truth value is true. It is denoted by pú q. The truth table is given below. p q púq T T F T F T F T T F F F Note: This logical operator is similar to the symmetric difference operation for sets. NAND logical connective: This is defined as negation of and p q, denoted by ( p q) Ø Ù or by p - q. NOR logical connective:

This is defined as negation of p or q, denoted by ( p q) Ø Ú or by ( p q) Ø. p q p q Ù ( ) : Ø pùq p - q p q Ú ( ) : Ø púq p - q : T T T F T F T F F T T F F T F T T F F F F T F T Note: NAND and NOR are examples of dual logical operators. A discussion on statement formula, Tautology, Contradiction and Contingency A proposition obtained by combining many logical variables (i.e. propositions when not specified) using a number of logical connectives, and, containing proper parentheses is called a statement formula or simply a statement. For example, the following are statement formulas: pù [( q r) ÚØ q] ( pù q) [( q r) Ú( Øq ÙØ s)] ( p q p ) r) is not Ø Ù Ø Ú a valid formula. ( ) ( ) Note: It may be noted each logical variable has two possible truth value assignments; True or False. Thus, if a statement formula contains n logical variables, then there are Hence, the truth table of the formula will contain What is meant by Tautology? n 2 rows. Consider a statement, say n 2 choices. A : A( p p p... p, Ù, Ú,,, Ø). If for each of the 2 k options, truth value of A turns out 1, 2, 3, k, to be true, then A is called a tautology, or as universally accepted formula, or as universally valid formula, Thus, if a statement formula A is always true, then it said to be a tautology. Suppose, the truth value of A is always false, then it is called an absurdity, or contradiction, or universally invalid formula. On the other hand, if the truth value of A is some times true and at others false, then it is called contingency. Illustrative examples: By constructing the truth table of the following, determine which one is a tautology? Which one is a contradiction? Which is one a contingency?

1. ( p q) ( Øp Úq) 2. ( p q) ( Ø q Øp) [ ] 3. p Ù ( p q) q 4. ((p q) ÙØ q) Ø p ( p q Ù q r ) ( p r) 5. ( ) ( ) Solution to problem number 1( p q) ( Øp Úq) p q A : p q Ø p B : Øp Ú q A B T T T F T T T F F F F T F T T T T T F F T T T T ( q) «( Øp Ú q) Therefore, p is a Tautology Solution to problem number: 2. ( p q) ( Ø q Øp) p q A : p q Ø p Ø q B : Ø q Ø p A B T T T F F T T T F F F T F T F T T T F T T F As A : p F T T T T T q and B : Ø q Ø p have same set of truth values, therefore, p q and Ø q Ø p are logically equivalent to each other. Therefore, if a situation demands, the formula p q may well be replaced byø q Ø p. Solution to problem number 4:

p q p q q T T F F Ø : ( ) A p q ÙØ q Ø p A Ø p T T F F F T F F T F F T T T F F T T F T T T T T Since, ((p q) ÙØ q) Ø p is a tautology, and Thus, ((p q) ÙØ q) Ø p is a tautology. Logically equivalent statements Two statement formulas A and B are said to be logically equivalent, whenever A B is a tautology. Equivalently, if A and B have same set of truth values for each of the truth value assignments to the components of A and B. We denote this by AÛ B. By constructing truth table, determine whether the following are logically equivalent? 1. púq and [( p Ù Øq) Ú ( Øp Ù q)], 2. ( Øp Úq) Ù( p Ù( p Úq)) and p Ù q 3. Ø( p - q) and ( Øp Ø q) 4. p ( q Ú r)) and ( p ÙØ q) r) Solution of Problem No. 1. Consider the following truth table showing truth values of both the formulas p q púq Øp Ø q : A pùø q B : Øp Ùq AÚ B T T F F F F F F T F T F T T F T F T T T F F T T F F F T T F F F

From the table, it is clear that púq and [( p Ù Øq) Ú ( Øp Ù q)] are logically equivalent. Solution of Problem Number 3: Consider the following truth table p q p Ù q Ø( pùq) : ( p - q) Ø( p - q) Øp Øq Øp ÚØ q Ø( ØpÚØq) : Øp Øq T T T F T F F F T T F F T F F T T F F T F T F T F T F F F F T F T T T F From the above table, it follows that Ø( p - q) and ( Øp Ø q) are logically equivalent. Tutorial on fundamentals of logic Let p, q, r, s denote the following statements p : I finish writing my computer program before lunch q : I shall play tennis this afternoon r : The sun is shining s : The humidity is low Write the following statements in symbolic form: (a) If the sun is shining, I shall play tennis this afternoon. (b) Finishing the writing of my computer program before lunch is necessary for my playing tennis this afternoon. (c) Low humidity and sunshine are sufficient for me to play this tennis this afternoon. Solution: ( ) (b) (c) ( ) a r q p q sù r q 2. Determine the truth value of each of the following: (i) (ii) (iii) If 3 + 4 = 12, then 3 + 2 = 6. (True) If 3 + 3 = 6, then 3 + 4 = 9. (False) If George Bush was the third president of USA, then 2 + 3 = 5. (True) 3. Rewrite the following statements as an implication in the form if... Then.. form.

(a) For practicing her serve daily is a sufficient condition for Ms. Sania Mirza to have a good chance of winning the Australian Open tennis tournament. (b) Fix my air-conditioner or I won t pay the rent. (c) Manavi will be allowed to sit on Mohan s motor bike only if she wears her helmet. Solution :( a) If Ms. Sania Mirza practices her serve daily, then she will have a good chance of winning the tennis tournament. (b) If you do not fix my air-conditioner, then I shall not pay the rent. (c) If Manavi is to be allowed on Mohan s motor bike, then she must wear her helmet Determine all truth value assignment, if any, for the primitive statements p, q, r, s, t that make each of the following statements false. [ pùq Ù r] ( sút) [ pùq Ù r] ( sú t) (a) ( ) (b) ( ) Solution: For (a), the implication is given to be a false one, therefore, we must have ( pùq) Ù r as true, and s Ú t as false. Thus, truth values of these primitive statements are: Primitive statements p q r s t Truth values T T T F F (b) The implication is given to be a false; we must have ( pùq) Ù r as true and sú t as false. Thus, truth values of these primitive statements are: Primitive statements Truth values p q r s t T T T T T T T T F F If statement q has the truth value 1, determine all truth value assignments for the primitive statements p, r, and s for which the truth value of ( q [( Øp Úr) ÙØs]) Ù[ Ø s ( Ør Ù q)] is 1. Solution: We shall setup A : ( q [( Øp Úr) ÙØs]), B :[ Ø s ( Ør Ù q)]. Note that we are given that AÙ B is true (i.e. 1), therefore, it follows that both A and B are true statements. It is given that q has the truth value 1, it is clear that truth value of ( ØpÚ r) ÙØ s is 1, otherwise, the implication becomes false, which is not true actually. From this we infer that Øp Úr and Ø s

are true statements. Thus, truth value of s is true. We do have that B :[ Ø s ( Ør Ù q)] is true, so it follows that Ø r is true, and so truth value of r is false. With Øp Ú r being true, w must have p as false. Hence, conclusion is that if A : ( q [( Øp Úr) ÙØs]), B :[ Ø s ( Ør Ù q)] is true, then we truth value assignments of p, q, r, and s are: Primitive statements p q r s Truth values F T F F In the following program segment, I, j, m, and n are integer variables. The values of m and n are supplied by the user earlier in the execution of the total program. for i : = 1 to m do for j : = 1 to n do if i ¹ j then pr int i * j How many times the print statement in the segment is executed when ( a) m = 10, n = 10 ( b) m = 20, n = 20 ( c) m = 10, n = 20 ( d) m = 20, n = 10 Solution: (a) For m = 10, n = 10, print statement will be executed only for 90 times. (b) For m = 20, n = 20, print statement will be executed only for 380 times. (c) For m = 10, n = 20, print statement will be executed only for 190 times. (d) For m = 20, n = 10, print statement will be executed only for 180 times Negate and express the following statements in smooth English. (c) If Harold passes his C++ course and finishes his data structures project, then he will graduate at the end of semester. Solution: let us set up p: Harold passes C++ course, q: Harold finishes his data structures project, r: Harold becomes a graduate at the end of semester. Symbolically, the given statement may be written as ( pù q) r. The negation of this statement is

(( ) é ) ( ) Ø p Ù q r Û Ø Ø p Ù q Ú r ù ë û, since A B Û Ø A Ú B Applying De-Morgan laws, we obtain ( Ù ) p q ÙØ r. Thus, the negated statement in English is Harold passes C++ course and Harold finishes his data structures project but fails to graduate at the end of semester. Concept of Duality in logic: Given a statement formula involving a number of primitive statements and several logical connectives, its dual may be obtained just by replacing conjunction ( Ù ) by disjunction ( Ú ) and vice versa, not disturbing other logical connectives. If the formula contains special symbols like T or F, then these are to be replaced by F and T respectively. ( a) q p, (b) p qù r, (c) p «q Write the dual of the following: ( ) Solution: Consider ( a) q pû Øq Ú p, therefore, its dual is Øq Ù p. Consider (b) p ( qùr) Û Øp Ú( qù r), therefore, the respective dual is p ( q r) Consider (c) p «qû ( p q) Ù ( q p) ( p q) ( q p) Thus, the dual is ( ØpÙq) Ú( Øq Ù p). Û Ø Ú Ù Ø Ú. Concept of converse, inverse and contra positive statements: For the statement p For the statement p For the statement p q, q p is called the converse statement. q, Ø p Ø q is called the inverse statement. Ø Ù Ú. q, Ø q Ø p is called the contra-positive statement Write the converse, inverse and contra -positive of the statement If today is a labor day, then tomorrow is Tuesday. Solution: The converse statement is If tomorrow is Tuesday, then today is Labor Day. The inverse statement is If today is not Labor Day, then tomorrow is not Tuesday. The contra-positive statement is If tomorrow is not Tuesday, then today is not Labor Day

Laws of logic: With respect to conjunction (i.e. logical AND), Ù pù pû p (idempotent law) pùqû qù p (Commutative law) ( pùq) Ùr Û pù( q Ùr) pùf Û F (identity law) pùt Û p(universal law) pùøpû ØpÙ pû F (Associative law) Thus, ( a set of propositions, Ù ) is a discrete structure Laws of logic: With respect to disjunction i.e. (logical OR), Ú pú pû p (idempotent law) púqû qú p (Commutative law) ( púq) Úr Û pú( qúr) pú F Û p(identity law) pút Û T(universal law) púøpû Øp Ú pû T ( Ú) (Associative law) Thus, a set of propositions, is a discrete structure With respect to combination of conjunction operator i.e. logical AND operator ( Ù ) and disjunction operator i.e. logical OR ( Ú ), we can generate distributive laws. Thus, ( P, Ú, Ù ) is another discrete structure where P denotes the set of all propositions. ( pùq) Úr Û ( púr) Ù( q Úr) ( púq) Ùr Û ( pùr) Ú( q Ùr) (Distributive law) (Distributive law) If the operators Ú, Ù and Ø are combined then, we obtain ( ) ( ) ( p) Û Ø púq Û Øp ÙØq (De - Morgan law) Ø pùq Û Øp ÚØq (De - Morgan law) Ø Ø p (double negation law) Therefore, one can claim that ( P, Ú, Ù, Ø ) is a discrete structure. Ø[ Ø[ púq Ùr] ÚØq] using laws of logic only. Also, state the law used in the Simplify ( ) derivation..

Solution: We shall use De-Morgan law, Double negation law, and Associative law and Absorption law to simply the above expression. Consider ( ) ( ) é ( ) Ø [ Ø [ púq Ùr ] ÚØq ] Û ØØ p q r qù ë Ú Ù Ù û because ØØAÛ But (( ) ) Û é p Ú q Ù r Ù q ù ë û A [By Double Negation Law] Û é( ( p q ) q ) r ù ë Ú Ù Ù û (By associative law) (( púq) Ùq) Û q by Absorption Law. Therefore, ( ) Ø[ Ø[ púq Ùr] ÚØq] Û qù r. Discussion on Methods of Proof: Note: A statement which is given to be true or just true is called as a premise. Now, consider a set of premises H1, H 2, H 3,... H k. Let C be a conclusion of some argument. We say that k premises implies the conclusion C whenever (... k) H1 Ù H2 Ù H3 Ù Ù H C is a tautology. Symbolically, we describe it as (... k) H1 Ù H2 Ù H3 Ù Ù H Þ C and read it as C follows logically from all the k premises or the k premises C logically. Determine whether the following argument is logically valid? H1: If you invest in stock market, then you will get rich. H2: If you get rich, then you will be happy, Conclusion: Therefore, If you invest in stock market, then you will be happy. Solution: We shall set up: p : You invest in stock market, q : You will become rich and r : You will be happy. Then, problem may be formulated symbolically as H1 : p q, H 2 : q r therefore C : p r. Here, the problem is to determine whether ( ) ( ) H1 Ù H2 Þ C i.e. H1 Ù H2 C is a tautology? As 3 variables are involved, one can adopt truth table method. p q r H : p q 1 : H2 q r H Ù H 1 2 : C p r H Ù H C ( 1 2 ) T T T T T T T T T T F T F F F T T F T F T F T T

F T T T T T T T T F F F T F F T F T F T F F T T F F T T T T T T F F F T T T T T H1 Ù H2 C is a tautology, therefore, it may be concluded that this is a valid Since ( ) argument. Determine whether the following argument is logically valid? H1: If I try hard and I have talent, then I will become a musician. H2: If I become a musician then I will be happy. H3: I have not become happy. Therefore, I did not try hard or I do not have talent. Solution: First we shall set up the following simple statements, namely, p : I try hard, q : I have talent, r : I become a musician and s : I became happy. Then given premises may be written in symbolical form as ( ) H1 : pù q r, H2 : r s, H3 : Øs and the conclusion as C : Øp ÚØq Here, to find whether ( H1 Ù H2 Ù H3) Þ C or whether ( 1 2 3 ) H Ù H Ù H C a tautology? Observe that this problem involves 4 logical variables. Therefore, truth table approach may not be proper as it is required to construct a table of 16 rows. This is not feasible, thus, there is a necessity to develop alternate strategies. With this in view, we shall now introduce rules of inference theory. Rule 1: A given premise (i.e. a statement which is given to be true in the problem can be used at any stage during the argument.

Rule 2: An statement can be replaced by means of an equivalent statement. This is permitted. For example the statement p q can be replaced as either by ØpÚq or by Ø q Ø p. Rule 3: In conditional proof, for example, if a problem to determine whether A B and if nothing is told about the nature of A is given, then we can introduce an additional premise in the problem by H : A i.e. A is true. Rule 4: Modus ponens: Whenever p is true, p implying q is true, then q is certainly true. Symbolically it is given as p, p q q is a tautology. pù p q q Þ. We can verify that ( ) Rule 5: Modus Tollens: Whenever p q is true and Ø q is true, then Ø p is true. Symbolically, it is given as Ø q, p q Þ Ø p. One can verify that ( ) é q p q ù ëø Ù û Øp is a tautology. Rule 6: Law of Syllogism: Whenever p q is true and q r is true, then p r is true. Symbolically, same can be written as é( p q) Ù ( q r) ùþ ( p r) Rule 7: Law of Conjunction ( pùq) Þ p Rule 8: Law of Disjunction - p Þ ( pú q). ë û. Now, we shall use the rules of inference theory. Consider the premises H1 and H2, i.e. 1 : ( Ù ) and 2 : r. Applying the law of syllogism, we obtain :( ) H p q r H s Now consider ( ) R1 pù q s. R1 : pù q s and H : Øs ; using the law of Modus Tollens, we should get 2 : Ø( Ù ). But it is known that ( ) R p q valid. 3 Ø pùq Û Øp ÚØ q. Hence, argument is logically Determine whether the following argument is valid? H1: If Haripriya gets the supervisor position and works hard, then she gets a raise. H2: If she gets a raise, then she will buy a new car. H3: She has not purchased a new car. Conclusion: Either Haripriya did not get the supervisor s position or she did not work hard Solution:

First we shall set up p: Haripriya gets the supervisor s position. q: Haripriya works hard. r: She gets the raise. s: She purchase a new car. Then, then given premises can be written in symbolic H 1 : pù q r, H2 : r s, H3: Øs C : Øp ÚØq. Consider the premises H3 and H2, form as ( ) namely, H2 : r s and H3: Ø s. Applying the rule of Modus Tollens, we obtain the result R1: Ø r. Now consider the premise H1 and the result just obtained R1, viz., 1 ( pù q) r Ør. Again using the rule of Modus Tollens, we should get R : Ø( pùq) H :, R1: It is well known that Ø( pùq) Û Øp ÚØ q. Hence, the given argument is logically valid. 2. Determine whether the following argument is valid? If the band could not play rock music or the refreshments were not delivered on time, then the New Year s party would have been cancelled and Anita would have been angry. If the party were cancelled, then refunds would have had to be made. No refunds were made. Therefore, the band could play rock music. Solution: First we shall form the following primitive statements: p : The band could play rock music, q : The refreshments were delivered on time r : New year party is cancelled, s : Anitha has become angry, t : Refunds had to be made Then, the given premises may be written in symbolic form as H1 : ( Øp ÚØ q) ( r Ù s), H2 : r t, H3 : Øt and C : p. Here, to determine whether ( ) H1Ù H2Ù H 3 p is a tautology? As 5 parameters are involved in this problem, we shall use the rules of inference theory. Consider the premises H3 and H2, namely, H2 : r t and H3 : Øt. Using Modus Tollens here, we will get the result that R1 : Ør. Equivalently, we have got that negation of r is true. Therefore, we must have that truth value of r as false. Due to this, it is clear that truth value of r Ù s is false. But according to H1 : ( Øp ÚØ q) ( r Ù s), i.e. this implication is true. From here, it follows that truth value of ( ØpÚØ q) is false. But this is possible only when both Øp and Øq are false. Thus, we obtain that truth value of p and q as true. Hence, given argument is logically valid. Determine whether the argument is valid?

( ) ( ) ( ) H1 : p r Ù s, H2 : p q, H3 : q r Ù s, H4 : Ør Ú Øt Úu, H5 : pùt imply the conclusion C : u? Argument: Consider H 5 : pùt. Using law of conjunction, we get that the primitive propositions p and t are both true. Equivalently the truth value of and H3, namely, : p q : q ( r Ù s) ( ) Ø t is false. To consider H2 H2, H3, using the law of syllogism, we get the result R1 : p r Ù s. With p being a true proposition, applying Modus Ponens, we obtain R2 : r Ù s as a true statement. Thus, truth value of both r and s are true. Equivalently, the truth value of negation of r is false, i.e. Already, we have obtained that (i) Ø r is false. According to H4, we have Ør Ú( Øt Ú u) is true. Ø t is false and (ii) Ø r is false, so only option left for us to conclude is truth value of u is true. Hence, the given argument is logically valid. Determine whether the argument is valid? ( ) H1 : u r, H 2 : ( r Ù s) ( pú t), H 3 : q uù s, H4 : Øt Imply the conclusion C : q? Solution: Note that this problem is based on conditional proof. However, nothing is given about the nature of the primitive proposition, q. Thus, we shall introduce an additional premise namely, i.e. q is a true proposition. Consider the premises H3 and H5 i.e. q q ( uù s) applying the rule of Modus Ponens, we get the result R :( uù s) p H5 : q and, 1. Using the law of conjunction we obtain R2: u and s i.e. both u and s are true statements. Now using the result R2 and the premise H1, i.e. R2: u, H1 : u r and the rule of Modus Ponens, we will get R3 : r. As r and s are true propositions, r Ù s is a true statement. Using this and H2 : ( r Ù s) ( pút) we get ( p Ú t) is a true statement. We know that pút Û t Ú pû Ø t p. Using H4: Øt here, and applying once again rule of Modus Pones, we should get that p is a true proposition. Hence the given argument is logically valid.

Discussion of Direct Proof and Indirect Proof Let n be a positive integer. Prove that n 2 is odd if and only if n is odd. Proof: It is known that an odd integer may be written as n = 2k + 1, where k Î Z squaring both sides, ( ) ( ) n 2 = ( 2k + 1) 2 = 4k 2 + 4k + 1 =2 2k 2 + 2k + 1 =2m + 1 where m = 2k 2 + 2k, an integer Thus, n 2 is odd. To prove the converse, we shall give an indirect proof. To begin with let n 2 be an odd integer. To prove that n is odd. Suppose on the contrary that let n be an even integer. Then we can write as n k 2 2 2 2 = 2 so that n = ( k) = k = ( k ) 2 4 2 2 an even integer. But this is against our hypothesis that n 2 is odd. Hence, we conclude that n is an odd integer. Prove that if 3m + 2 is an odd integer, then m is an odd integer. Proof: Observe that 3m + 2 = 2k + 1, therefore 3m = 2k -1, an odd integer. Now, we have 3 m an odd integer. From this, we must conclude that m is odd, otherwise ( ) 3m + 2 = 3 2k + 2 = 6k + 2 = 2( 3k + 1 ), an even integer. this is impossible as it is given that 3m + 2 is an odd integer. Hence our assumption that m is even is wrong and so m must be an odd integer. Let n be an integer. Prove that n is even if and only if 31n + 12 is even. Proof: Suppose that n is an even integer, Thus, n = 2 k, where k is an integer. Therefore, 31n + 12 = 31 2k = 62k = 2 ( 31 k) is even. On the other hand suppose that 31n + 12 is even. To prove that n is an even integer. We shall prove this by giving an indirect proof. Suppose on the contrary, let n be odd. Then we can write n = 2k + 1, where k is an integer. Thus, ( ) ( ) 31n + 12 = 31 2k + 1 + 12 = 62k + 43 = 62k + 42 + 1 = 2 31k + 21 + 1 = 2m + 1 where m = 31k + 21 is an odd integer which is impossible as we ourselves had assumed that n is even. Hence, n must be an even integer. A discussion on Predicates and Quantifiers So far study was confined to a set of simple, primitive propositions or compound statements only. We discussed various concepts such as logical connectives, formation of compound proposition, tautologies, contradiction, and contingency. Also, we discussed logical equivalence of statements, duality of a formula etc.

Further, rules of inference theory were introduced using which problems based on logical arguments were examined. Now we shall initiate a discussion on predicates and quantifiers. Before understanding these, consider the following statements, Dog is an animal Cat is an animal Elephant is an animal Tiger is an animal Lion is an animal Deer is an animal Horse is an animal and the list go on Observe that all these statements are about individuals which are animals, so to study these; we require different symbols to denote these animals. But even the usage of different symbols, does not show the common property of the symbols, that each symbol denotes an animal. Suppose if we want to describe all the animals of the universe, then certainly a large number of symbols are necessary. To deal with a situation of this type, it is appropriate to develop a mechanism using which it must be possible represent all the common feature of the objects. The following section is devoted to the same. First we introduce a symbol to denote the phrase is an animal and secondly, a technique to joint it with a symbol representing an animal, then we are done as this single expression will speak about all the individuals which are animals. Here, the part is an animal is called as predicate. Usually, a predicate is represented by using upper case letters and lower case letters are considered for the objects associated with a predicate. Thus, let us consider A : is an animal then all objects which are animals may be expressed as A( x) where x is a variable to be chosen from the universe of discourse, namely, the set of animals. A( x ) to be read as x is A or as object has the property stated in the predicate,. Since only one variable is involved here, A( x ) is said to be 1 place predicate function or as an open statement of a single variable. Similarly 2 place, 3 place predicates can be introduced. The study of predicate functions constitutes predicate calculus. Thus, it is clear that all the topics discussed under fundamentals of logic can be extended to predicates calculus. Therefore, one may combine the open statements using the logical

connectives, one can extend the definitions like logical equivalence, tautology etc to these. Please remember that the set of all objects is called as universe of discourse or just universe. A note on Quantifiers In a practical situation, we come across a number of quantified statements like Live lectures through EDUSAT programme is open for all engineering college students in Karnataka A vehicle having Karnataka state permit is permitted to move on any road in the state. There are some bad boys in a class room. Some students never follow Discrete Mathematics course whoever teaches this course. There is at least one student in some engineering watching this programme coming live from VTU studio, Bangalore. Pythagoras Theorem holds well for all right angled triangles and the list go on. Statements shown in previous slides can be expressed symbolically using quantifiers. There are two types of quantifiers: 1. Universal quantifier: A statement which is universally valid may be explained using an universal quantifier. This is similar to the situation, namely, for all, for every and for any etc. Symbolically, it is denoted as ". Consider an open statement p( x) which is true for all substitutions from a universe of discourse, then the same may be written in symbolic form as " x p( x). 2. Existential Quantifier: There are statements which are true only under circumstances. These statements may be symbolically expressed in terms of existential quantifier, denoted by$. Consider an open statement of the form q( x ). values of x. This may be symbolically written as $ x q( x). Suppose that this statement is true only for some Note: An open statement of the form q( x ) gets A meaning only when x is replaced by a proper value from the universe or universe of discourse, denoted by U. Examples: Examples: Consider universe of discourse as the set of all days of a week. Then U = {Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday}. Consider the statement p( x) : x is a holiday. It is known that there is a day in a week which is declared as a general holiday (i.e. Sunday), thus, this situation may be written as $ x p( x)

Another example; Take the universe as the set of all flowers and consider the statement, Flowers are beautiful. To write this statement in symbolic form, we shall set up f ( x) : x is a flower, then above may be written symbolically as " x f ( x).. Some important remarks: The statement " x f ( x) assumes the truth value false even if for one value of x, f ( x ) is false. Therefore, we have the result [ ] Ø " x f ( x) Û $ x Ø f ( x). Similarly, the statement $ q( x) will take the truth value false, only when for all values of x the statement q( x ) is false. Hence, we obtain [ ] Ø $ x q( x) Û " x Ø q( x). Also, the following are some of important remarks regarding predicates and quantifiers. $ x [ p( x) Ùq( x) ] Û [ $ x p( x) Ù$ x q( x) ] $ x [ p( x) Úq( x) ] Û [ $ x p( x) Ú$ x q( x) ] " x [ p( x) Úq( x) ] Û [" x p( x) Ú" x q( x) ] [" x p( x) Ú" x q( x) ] Þ " x [ p( x) Ú q( x) ] Also, we have the following results to negate the statements with one quantifier: Ø " x p( x) Û $ x Ø p( x) [ ] Ø $ x p( x) Û " x Ø p( x) [ ] Ø " x Øp( x) Û $ x ØØp( x) Û $ x p( x) [ ] Ø $ x Øp( x) Û " x ØØp( x) Û " x p( x) [ ] Tutorial on Quantifiers: For the universe of integers, let p( x), q( x), r( x), s( x), t( x ) be the following open statements. p( x) : x > 0 q( x) : x is even r( x) : x is a perfect square s( x) : x is exactly divisible by 4 t( x) : x is exactly divisible by 5

Write the following statements in symbolic form: (i) At least one integer is even. (ii) There exists a positive integer that is even. (iii) If x is even, then x is not divisibly by 5. (iv) No even integer is divisible by 5. (v) There exists an even integer divisible by 5. (vi) If x is even and x is a perfect square, then x is divisibly by 4. Solution: i ) $ x q( x) ( ii ) $ x [ p( x) Ù q( x) ] ( iii ) " x [ q( x) Øt( x) ] [ ] [ ] é ë( ) (iv) " x Ø q( x) t( x) ( v) $ x q( x) t( x) ( vi) " x q( x) Ù r( x) s( x) ù û Translate each of these statements into logical expressions using predicates, quantifiers and logical connectives: (i) Some students do not follow the rules. (ii) Some students are very serious. (iii) No student can keep a secret. (iv) There is some in this class who is very intelligent Solution: Let us consider the universe as the set of all students of a college. First we shall set up the following primitive statements p( x) : x follows the rules. q( x) : x is a very serious person. r( x) : x can keep secret. s( x) : x is very intelligent. Solution: ( i ) $ x Ø p( x), ( ii) $ x q( x), ( iii ) " x Ø r( x). (iv) $ x s( x) For the universe of all integers, determine the truth or falsity of each of the following statements. If a statement is false, give a counter example. p( x) : 2 x - 8x + 15 = 0, q( x) : x is odd, r( x) : x > 0. [ ] [ ] [ ] ( a) " x p( x) q( x), ( b) " x q( x) p( x), ( c) $ x p( x) q( x) [ ], [ ] é ë( ) d) $ x q( x) p( x) ( e) $ x r( x) p( x), ( f ) " x p( x) Ú q( x) r( x) ù û ( ) ( g) $ x é p( x) q( x) Ùr( x) ù ë û

Solution: The quadratic equation x 2-8x + 15 = 0 may be factorized as ( x - 3) ( x - 5) = 0. Thus, roots are x = 3, x = 5. as both the roots are odd, it is clear that statement (a) is true. According to statement (b) if x is an odd integer, then it is a solution of the quadratic equation x 2-8x + 15 = 0. This is a false statement, for, x = 1, an odd integer is not a root of the quadratic equation. (c) The English version of this statement is that there is a solution of x 2-8x + 15 = 0 which is odd. As the roots are 3 and 5, which are odd, therefore, (c) and (d) are both true statements. According to statement (e), there is a positive integer which is also a root of the quadratic equation x root. Statements (f) and (g) are both true. 2-8x + 15 = 0. This is true because x = 3 a positive integer and is a