Discrete Mathematics. Sec

Similar documents
THE ISLAMIC UNIVERSITY OF GAZA ENGINEERING FACULTY DEPARTMENT OF COMPUTER ENGINEERING DISCRETE MATHMATICS DISCUSSION ECOM Eng. Huda M.

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

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

KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS ) RULES OF INFERENCE. Discrete Math Team

DISCRETE MATHEMATICS BA202

CS0441 Discrete Structures Recitation 3. Xiang Xiao

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

software design & management Gachon University Chulyun Kim

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

PROPOSITIONAL CALCULUS

1 The Foundation: Logic and Proofs

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

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

1 The Foundation: Logic and Proofs

ECOM Discrete Mathematics

Logic and Proof. Aiichiro Nakano

Readings: Conjecture. Theorem. Rosen Section 1.5

Discrete Mathematics Recitation Course 張玟翔

Math 3336: Discrete Mathematics Practice Problems for Exam I

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

Mat 243 Exam 1 Review

Solutions to Exercises (Sections )

CSCI Homework Set 1 Due: September 11, 2018 at the beginning of class

Introduction to Sets and Logic (MATH 1190)

Chapter 1 Elementary Logic

Intro to Logic and Proofs

Review: Potential stumbling blocks

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

3. The Logic of Quantified Statements Summary. Aaron Tan August 2017

Predicate Logic. Andreas Klappenecker

Predicate Logic & Quantification

CSC Discrete Math I, Spring Propositional Logic

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

Rules Build Arguments Rules Building Arguments

Tools for reasoning: Logic. Ch. 1: Introduction to Propositional Logic Truth values, truth tables Boolean logic: Implications:

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

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.

Solutions to Exercises (Sections )

Unit I LOGIC AND PROOFS. B. Thilaka Applied Mathematics

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

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

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

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

MATH 215 DISCRETE MATHEMATICS INSTRUCTOR: P. WENG

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

Section 1.1 Propositions

First order Logic ( Predicate Logic) and Methods of Proof

EECS 1028 M: Discrete Mathematics for Engineers

Propositional Logic Not Enough

2/18/14. What is logic? Proposi0onal Logic. Logic? Propositional Logic, Truth Tables, and Predicate Logic (Rosen, Sections 1.1, 1.2, 1.

Proofs: A General How To II. Rules of Inference. Rules of Inference Modus Ponens. Rules of Inference Addition. Rules of Inference Conjunction

Section Summary. Section 1.5 9/9/2014

At least one of us is a knave. What are A and B?

Packet #1: Logic & Proofs. Applied Discrete Mathematics

Proofs. Example of an axiom in this system: Given two distinct points, there is exactly one line that contains them.

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

1.1 Language and Logic

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

MAT 243 Test 1 SOLUTIONS, FORM A

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

Proofs. Introduction II. Notes. Notes. Notes. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Fall 2007

Chapter 2: The Logic of Quantified Statements. January 22, 2010

ICS141: Discrete Mathematics for Computer Science I

MAT2345 Discrete Math

CSCE 222 Discrete Structures for Computing. Predicate Logic. Dr. Hyunyoung Lee. !!!!! Based on slides by Andreas Klappenecker

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

Discrete Mathematical Structures: Theory and Applications

EECS 1028 M: Discrete Mathematics for Engineers

Overview. 1. Introduction to Propositional Logic. 2. Operations on Propositions. 3. Truth Tables. 4. Translating Sentences into Logical Expressions

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 Homework 1

The Foundations: Logic and Proofs. Chapter 1, Part III: Proofs

Full file at Chapter 1

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

Chapter 4, Logic using Propositional Calculus Handout

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.

WUCT121. Discrete Mathematics. Logic. Tutorial Exercises

A. Propositional Logic

Compound Propositions

Math.3336: Discrete Mathematics. Nested Quantifiers/Rules of Inference

CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning.

Discrete Structures for Computer Science

Discrete Mathematics for CS Spring 2006 Forbes HW 1 Solutions

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

Rules of Inference. Arguments and Validity

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

STRATEGIES OF PROBLEM SOLVING

Section Summary. Predicate logic Quantifiers. Negating Quantifiers. Translating English to Logic. Universal Quantifier Existential Quantifier

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

Inference and Proofs (1.6 & 1.7)

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

Discrete Structures CRN Test 3 Version 1 CMSC 2123 Autumn 2013

1.1 Language and Logic

Test 1 Solutions(COT3100) (1) Prove that the following Absorption Law is correct. I.e, prove this is a tautology:

The following techniques for methods of proofs are discussed in our text: - Vacuous proof - Trivial proof

Predicate Calculus lecture 1

2. Use quantifiers to express the associative law for multiplication of real numbers.

Logic, Sets, and Proofs

Sec$on Summary. Valid Arguments Inference Rules for Propositional Logic. Inference Rules for Quantified Statements. Building Arguments

Transcription:

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering Fall 2011 ECOM 2311: Discrete Mathematics Eng. Ahmed Abumarasa Discrete Mathematics Sec 1.1-1.6 The Foundations: Logic and Proof, Sets, and Functions

Chapter 1: The Foundations: Logic and Proof, Sets, and Functions 1.1: Logic Propositions must have clearly defined truth values (True or False), so a proposition must be a declarative sentence with no free variables. Not: the negative of the propositions. E.g. the negative of propositions p is (ꜚp called not p) Conjunction: the conjunction between two proposition is the AND connector. (pᶺq) is true only when both p and q are true. Disjunction: the disjunction between two proposition is the OR connector. (pᵛq) is false only when both p and q are false. Exclusive OR:

Conditional Statements: p q o CONVERSE: q p o CONTRAPOSITIVE: ꜚq ꜚp o INVERSE: ꜚp ꜚq Biconditional: (p q)p if and only if q. consistent System: System is consistent if all its propositions are true. Logic and Bit Operations:

Exercises: 1) 1.1.2: Which of these are propositions? What are the truth values of those that are propositions? Do not pass go. Not a proposition What time is it? Not a proposition There are no black flies in Maine a proposition 4+ X = 5 Not a proposition x + 1 = 5 if x = 1. Not a proposition x + y = y + z if x = z. a proposition 2) 1.1.4: Let p and q be the propositions p: I bought a lottery ticket this week. q: I won the million dollar jackpot on Friday. Express each of these propositions as an English sentence. a b c d e f g h I did not buy a lottery ticket this week. Either I bought a lottery ticket this week or I won the million dollar jackpot on Friday. [in the inclusive sense] If I bought a lottery ticket this week, then I won the million dollar jackpot on Friday. I bought a lottery ticket this week and I won the million dollar jackpot on Friday. I bought a lottery ticket this week if and only if I won the million dollar jackpot on Friday. If I did not buy a lottery ticket this week, then I did not win the million dollar jackpot on Friday. I did not buy a lottery ticket this week, and I did not win the million dollar jackpot on Friday. Either I did not buy a lottery ticket this week, or else I did buy one and won the million dollar jackpot on Friday.

3) 1.1.9: Let p and q be the propositions p : You drive over 65 miles per hour. q : You get a speeding ticket. Write these propositions using p and q and logical connectives. a) You do not drive over 65 miles per hour. b) You drive over 65 miles per hour, but you do not get a speeding ticket. c) You will get a speeding ticket if you drive over 65 miles per hour. d) If you do not drive over 65 miles per hour, then you will not get a speeding ticket. e) Driving over 65 miles per hour is sufficient for getting a speeding ticket. f) You get a speeding ticket, but you do not drive over 65 miles per hour. g) Whenever you get a speeding ticket, you are driving over 65 miles per hour. a b c d e f g Not p pᶺ (not p) p q not p not q p q qᶺ (not p) q p 4) 1.1.9: Construct a truth table for each of these compound propositions. A p not p output T F F F T F C E P q not q P v not q Output T T F T T T F T T F F T F F T F F T T F P q not p not q p q not q not p Output T T F F T T T T F F T F F T F T T F T T T F F T T T T T

1.2: Propositional Equivalences Tautology: A compound proposition that is always true. Contradiction: A compound proposition that is always false. Contingency: neither a tautology nor contradiction. Logical Equivalences: The compound propositions p and q are called logically equivalent if p q is a tautology. The notation p q denotes that p and q are logically equivalent.

Exercises: 1) 1.2.4: Use truth tables to verify the associative laws: a) A p q R p v q (p v q) v r T T T T T T T F T T T F T T T T F F T T F T T T T F T F T T F F T F T F F F F F p q R q v r p v (q v r) T T T T T T T F T T T F T T T T F F F T F T T T T F T F T T F F T T T F F F F F 2) 1.2.12: Determine whether is a tautology. لمعرفة هل هو tautology أم ال, يمكنا محاولة إثبات العكس أي يعني بحالة وجود إحتمال للمتغيرات تجعل ال الجملة.False في هذه الحالة يجب جعل الطرف األيمن F و األيسر T. يعني q يجب ان تكون T. و لجعل الطرف األيسر T يجب انا يكون P. = f باإلضافة ل p q يجب ان تكون, T و هذا يتوفر بحالة كانت, q =t P = f. إذا وجدنا حالة يكون الناتج false لذا الجملة ليست.tautology مالحظة: يمكن حل السؤال ب.truth table 3) 1.2.14: Show that and are equivalent. p q p q pᴧq Not p ᴧ not q T T T T F T T F F F F F F T F F F F F F t f t T 4) 1.2.29: Show that is a tautology. Make it in truth table or follow this: To make it false The right side must be false, so (p = T, r = F).

To make the lift side true, so p q must be true since (p=t) so (q =t) and q r must be true, since (r=f) so (q = f). So we cannot make it false so it is a tautology. 5) 1.2.34 Find a compound proposition involving the propositions p, q, and r that is true when p and q are true and r is false, but is false otherwise. Solution: p ᴧ q ᴧ (not r) Need discussion with student. في هذا السؤال يطلب عمل compound proposition تجعل النات النهائي true فقط في حالة كان (f= p) (t=, q) (t= and r) من الروابط التي تجعل الجواب conjunction حالة وحدة فقط هي ال trueفي و تكون بحالة T ᴧ T ᴧ T == T ᴧ T ᴧ (not) F == p ᴧq ᴧ (not) r

1.3 Predicates and Quantifiers The statement P(x) is said to be the value of the propositional function P at x. Once a value has been assigned to the variable x, the statement P(x) becomes a proposition and has a truth value. E.g. if p(x) is x>3 then P (2): 2>3 proposition with false value. P (5): 5>3 proposition with true value. QUANTIFIERS: THE UNIVERSAL QUANTIFIER x P(x): for any x in the universe of discourse p(x) is true. E.g. p(x): x^2 >= 0, where the universe of discourse consists of all real numbers. x P(x) is true. THE EXISTENTIAL QUANTIFIER x p(x): there exist at least x where p(x) is true. E.g. p(x): x^2 =< 0, where the universe of discourse consists of all real numbers. x P(x) is true when x = 0. True False x p(x) When P(x) is true for every x. When there is an x for which P(x) is false. x p(x) When there is an x for which P(x) is true. When P{x) is false for every x. BINDING VARIABLES: NEGATIONS: When a quantifier is used on the variable x or when we assign a value to this variable, we say that this occurrence of the variable is bound. Variable that is not bound by a quantifier or set equal to a particular value is said to be free. E.g.: x y p(x, y): both x and y are pound. x p(x, y): x is pound, but y is free.

Exercises: 1) 1.3.1 Let P(x) denote the statement "x < 4." What are the truth values? a) P (0). b) P (4). c) P (6). a b C true false False A B C D 2) 1.3.5 Let P(x) be the statement "x spends more than five hours every weekday in class," where the universe of discourse for x consists of all students. Express each of these quantifications in English. a) x p(x) b) x p(x) c) x ꜚp(x) d) x ꜚp(x) There is a student who spends more than five hours every weekday in class. All students spend more than five hours every weekday in class. There is a student who does not spend more than five hours every weekday in class. All students don t spend more than five hours every weekday in class. 3) 1.3.7 Translate these statements into English, where C(x) is "x is a comedian" and F(x) is "x is funny" and the universe of discourse consists of all people. a) x (C(x) F(x)). b) x (C(x) ᴧ F(x)). c) x (C(x) F(x)). d) x (C(x) ᴧ F(x)). a b c d For every one if he/she is a comedian then he/she a funny. (Every comedian is funny). Every one is a comedian and funny. There exists person if he/she is comedian then he/she funny. There exists comedian and funny. e f 4) 1.3.11 Let P (x) be the statement "x = x^2." If the universe of discourse consists of the integers, what are the truth values? e) x p(x) f) x p(x) True, If x =1 then 1 =1^2 =1 so there exist x where x=x^2 False, sense if x=2 so 2!=2^2, there exist x where p(x) false so x p(x) false.

5) 1.3.22 Translate in two ways each of these statements into logical expressions using predicates, quantifiers, and logical connectives. First, let the universe of discourse consist of the students in your class and second, let it consist of all people. a) Everyone in your class has a cellular phone. b) Somebody in your class has seen a foreign movie. c) There is a person in your class who cannot swim. To make the two ways we suppose that C(x) be the propositional function x is in your class. So a) Let P(x) is x has a cellular phone." B Let P(x) is x has seen a foreign movie. C Let P(x) is x can swim. x p(x) x (c(x) p(x)) x P(x) x (C(x) ᴧ P(x)). x ꜚP(x) x (C(x) ᴧ ꜚP(x)). 6) 1.3.32 Express the negation of these propositions using quantifiers, and then express the negation in English. a) Some drivers do not obey the speed limit. b) All Swedish movies are serious. c) No one can keep a secret. d) There is someone in this class who does not have a good attitude. A B C d All drivers obey the speed limit. Some of Swedish movies are not serious. Someone can keep a secret. Everyone in this class has a good attitude.

1.4 Nested Quantifiers x y p(x, y): for all x and y p(x, y) true. x y p(x, y): for all x there is some y p(x, y) true. x y p(x, y): there is x p(x, y) true for all y x y p(x, y): for some x and some y p(x, y) true. e.g. we can see that: Every real number has additive inverse. x y (x and y are real numbers) (x+ y =0). Distribute a multiply over an add operations. x y z (x* (y + z) = x*y +x*z)) Statements involving nested quantifiers can be negated by successively applying the rules for negating statements involving a single quantifier. ꜚ x y f(x, y) xꜚ y f(x, y) x y ꜚf(x, y). It is important to note that the order of the quantifiers is important, unless all the quantifiers are universal quantifiers or all are existential quantifiers.

Exercises: 1.4.1 Translate these statements into English, where the universe of discourse for each variable consists of all real numbers. a. x y (x< y) b. x y ( ( (x>=0) ᴧ (y>=0) ) (xy >=0)): c. x y z (xy=z). a For every real number x there exist another real number less than x. b For any two non-negative real numbers the multiplication of them is a non-negative real number c For any two real numbers the multiplication of them is real number. 1.4.8 Let Q(x, y) be the statement "student x has been a contestant on quiz show y." Express each of these sentences in terms of Q(x, y), quantifiers, and logical connectives, where the universe of discourse for x consists of all students at your school and for y consists of all quiz shows on television. a. There is a student at your school who has been a contestant on a television quiz show. b. No student at your school has ever been a contestant on a television quiz show. c. There is a student at your school who has been a contestant on Jeopardy and on Wheel of Fortune. d. Every television quiz show has had a student from your school as a contestant. e. At least two students from your school have been contestants on Jeopardy. a x y Q(x, y) b ꜚ x y Q(x, y) c x (Q(x, Jeopardy) ᴧ Q(x, Wheel of Fortune)) d y x Q(x, y) e x1 x2 (Q(x1, Jeopardy) ᴧ Q(x2, Jeopardy) ᴧ (x1 x2)) 1.4.21 Use predicates, quantifiers, logical connectives, and mathematical operators to express the statement that every positive integer is the sum of the squares of four integers. Solution: x a b c ((x x = a 2 + b 2 + c 2 + d 2 ) where the universe of discourse consists of all integers.

1.4.26 Let Q(x, y) be the statement "x + y = x - y." If the universe of discourse for both variables consists of all integers, what are the truth values? a False, 1 + 1 1-1. b True, 2 + 0=2-0. c False, 1 + y 1-y. d False, x+2 x-2 e True, 2 + 0=2-0. f True, x + 0=x-0. g True, x + 0=x-0. h False, x+2 x-2 i False, 1+2 1-2 1.4.30 Rewrite each of these statements so that negations appear only within predicates (that is, so that no negation is outside a quantifier or an expression involving logical connectives). a. ꜚ x y p(x, y) b. ꜚ x y p(x, y) c. ꜚ y (Q(y) ᴧ x ꜚR(x, y)) d. ꜚ y ( x R(x, y) x S(x, y)) e. ꜚ y ( x z T(x, y, z) x z U(x, y, z)) a x y ꜚp(x, y) b x y ꜚ p(x, y) c y (ꜚQ(y) x R(x, y)) d y ( x ꜚR(x, y) ᴧ x ꜚS(x, y)) e y ( x z ꜚT(x, y, z) ᴧ x z ꜚU(x, y, z))

Sec 1.5: Rules of Inference Rules of Inference for Quantified Statements:

Exercises: 1.5.3 3. What rule of inference is used in each of these arguments? a) Alice is a mathematics major. Therefore, Alice is either a mathematics major or a computer science major. b) Jerry is a mathematics major and a computer science major. Therefore, Jerry is a mathematics major. c) If it is rainy, then the pool will be closed. It is rainy. Therefore, the pool is closed. d) If it snows today, the university will close. The university is not closed today. Therefore, it did not snow today. e) If I go swimming, then I will stay in the sun too long. If I stay in the sun too long, then I will sunburn. Therefore, if I go swimming, then I will sunburn. Solution: a Addition rule. b Simplification rule. c Modus ponens. d Modus tollens. E Hypothetical syllogism. 1.5.6 Use rules of inference to show that the hypotheses "If it does not rain or if it is not foggy, then the sailing race will be held and the lifesaving demonstration will go on," "If the sailing race is held, then the trophy will be awarded," and "The trophy was not awarded" imply the conclusion "It rained." Solution: Let the following propositions: r: "It rains," f: "It is foggy," s: "The sailing race will be held," l: "The life saving demonstration will go on," T: "The trophy will be awarded."

1. Not t. Hypothesis 2. s t Hypothesis 3. not s Modus tollens using Steps 1 and 2 4. Hypothesis 5. contrapositive of Step 4 6. De Morgan's law and double negative 7. Addition, using Step 3 8. r ᴧ f Modus ponens using Steps 6 and 7 9. r Simplification using Step 1.5.14 for each of these arguments, explain which rules of inference are used for each step. a) "Linda, a student in this class, owns a red convertible. Everyone who owns a red convertible has gotten at least one speeding ticket. Therefore, someone in this class has gotten a speeding ticket." Solution: c(x): x is in this class," r(x): x owns a red convertible," t(x): x has gotten a speeding ticket." 1. Hypothesis 2. Universal instantiation using Step 1 3. r(linda) Hypothesis 4. t(linda) Modus ponens using Steps 2 and 3 5. c(linda) Hypothesis 6. c(linda) ᴧ t(linda) Conjunction using Steps 4 and 5 7. x (c(x) ᴧ t(x)) Existential generalization using Step 6

Sec 1.6: Introduction to Proofs Methods of Proving Theorems: Direct Prove: A direct proof of a conditional statement p q is constructed when the first step is the assumption that p is true; subsequent steps are constructed using rules of inference, with the final step showing that q must also be true. Proof by Contraposition: Proofs by contraposition make use of the fact that the conditional statement p q is equivalent to its contrapositive,. Proofs by Contradiction: Because the statement is a contradiction whenever r is a proposition, we can prove that p is true if we can show that VACUOUS PROOFS: is true when we know that p is false. TRIVIAL PROOFS: is true when we know that q is true. PROOFS OF EQUIVALENCE:

Exercise: 1.16.10 Use a direct proof to show that the product of two rational numbers is rational. Solution: First number x = a/b, b 0 Second number y =c/d, d 0 X*y = a*c/b*d sense b 0 and d 0 then b*d 0. Let a*c = l and b*d = m so x = l/m so x is rational number. 1.16.11 Prove or disprove that the product of two irrational numbers is irrational. Solution: To disprove it we need only one case doesn`t match the law. Now let X = 2, irrational number. X*X = 2 is rational number. (Product of two irrational numbers is not an irrational number). 1.6.16 Prove that if m and n are integers and m n is even, then m is even or n is even. Solution: Let p: m*n is event. H: m is event. L: n is event. e have to prove P (m ᴠ n) Using prove by Contraposition, not(m ᴠ n) not p So: m is odd and n is odd m= 2k +1 n= 2l +1 m*n = (2k +1)*(2l+1) = 4kl + 2k + 2l + 1 = 2(2kl +k + l) +1, let (2kl +k + l) = v so m*n = 2v +1 so m*n is odd by Contraposition if m*n is even, then m is even or n is even.

1.6.27 Prove that if n is a positive integer, then n is odd if and only if 5n + 6 is odd. We must prove two implications. First, we assume that n is odd and show that 5n + 6 is odd. By assumption, n = 2k + 1 so 2n +6 = 5(2k +1) =6 = 10k + 11 = 10k +10 +1 = 2(5k +5) +1 = 5V +1 where v = (5k +5), so 5n +6 is odd. Second, we have to show that if 5n + 6 is odd then n is odd. Using indirect proves: Let n is event so n = 2k 5n +6 = 10k +6 = 2(5k +3) so it is event so by contraposition if 5n + 6 is odd then n is odd. From the two cases we found that n is odd if and only if 5n + 6 is odd. External question: Prove that if x and y are real numbers, then max(x, y) + min(x, y) = x + y. Solution: Like this question we cane analysis it to its cases. Max(x, y) has two cases if x is the max or y is max Min(x, y) has two cases if y is the min or x is min Case 1: Let x is the max so y is the min so max(x, y) + min(x, y) = x +y. Case 2: Let y is the max so x is the min so max(x, y) + min(x, y) = y +x = x +y. So in all cases max(x, y) + min(x, y) = x +y. End Of the chapter One.