CISC-102 Fall 2018 Week 11

Similar documents
CISC-102 Winter 2016 Lecture 17

CSC Discrete Math I, Spring Propositional Logic

2.2: Logical Equivalence: The Laws of Logic

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

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

Logic and Propositional Calculus

1.3 Propositional Equivalences

Compound Propositions

Section 1.2 Propositional Equivalences. A tautology is a proposition which is always true. A contradiction is a proposition which is always false.

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

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

We last time we began introducing equivalency laws.

Logic and Propositional Calculus

Proofs. Joe Patten August 10, 2018

Equivalence and Implication

MATHEMATICAL REASONING

1.1 Statements and Compound Statements

Propositional logic (revision) & semantic entailment. p. 1/34

Propositional Calculus: Formula Simplification, Essential Laws, Normal Forms

Announcements. CS311H: Discrete Mathematics. Propositional Logic II. Inverse of an Implication. Converse of a Implication

Truth-Functional Logic

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

THE LOGIC OF COMPOUND STATEMENTS

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.

AMTH140 Lecture 8. Symbolic Logic

1.1 Language and Logic

CSE 20 DISCRETE MATH. Winter

The Logic of Compound Statements cont.

Packet #1: Logic & Proofs. Applied Discrete Mathematics

Unit 1. Propositional Logic Reading do all quick-checks Propositional Logic: Ch. 2.intro, 2.2, 2.3, 2.4. Review 2.9

Propositional Equivalence

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

HANDOUT AND SET THEORY. Ariyadi Wijaya

Note: The area of logic that deals with propositions is called the propositional calculus or propositional logic.

Propositional Logic, Predicates, and Equivalence

Review CHAPTER. 2.1 Definitions in Chapter Sample Exam Questions. 2.1 Set; Element; Member; Universal Set Partition. 2.

1.1 Language and Logic

Example. Logic. Logical Statements. Outline of logic topics. Logical Connectives. Logical Connectives

Propositional Logic. Spring Propositional Logic Spring / 32

Chapter 1. Logic and Proof

Chapter 4: Classical Propositional Semantics

Announcements. CS243: Discrete Structures. Propositional Logic II. Review. Operator Precedence. Operator Precedence, cont. Operator Precedence Example

Logic Synthesis and Verification

More Propositional Logic Algebra: Expressive Completeness and Completeness of Equivalences. Computability and Logic

Introduction to Decision Sciences Lecture 2

Propositional Logic Basics Propositional Equivalences Normal forms Boolean functions and digital circuits. Propositional Logic.

Propositional natural deduction

Solutions to Homework I (1.1)

Tautologies, Contradictions, and Contingencies

PROPOSITIONAL CALCULUS

Chapter 1, Section 1.1 Propositional Logic

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

8. Reductio ad absurdum

1 Predicates and Quantifiers

With Question/Answer Animations. Chapter 2

Boolean Logic. CS 231 Dianna Xu

A Statement; Logical Operations

Logic and Discrete Mathematics. Section 3.5 Propositional logical equivalence Negation of propositional formulae

Mathematics Review for Business PhD Students

3 The Semantics of the Propositional Calculus

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

CHAPTER 1 SETS AND EVENTS

ANS: If you are in Kwangju then you are in South Korea but not in Seoul.

Propositional Logic. Fall () Propositional Logic Fall / 30

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

Language of Propositional Logic

CSE 311: Foundations of Computing. Lecture 3: Digital Circuits & Equivalence

Proposition/Statement. Boolean Logic. Boolean variables. Logical operators: And. Logical operators: Not 9/3/13. Introduction to Logical Operators

Section 2.2 Set Operations. Propositional calculus and set theory are both instances of an algebraic system called a. Boolean Algebra.

LING 106. Knowledge of Meaning Lecture 3-1 Yimei Xiang Feb 6, Propositional logic

Notation Index. gcd(a, b) (greatest common divisor) NT-16

Propositional logic ( ): Review from Mat 1348

Chapter 1 Elementary Logic

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

FUNDAMENTALS OF MATHEMATICS HANDOUT 1.3 DR. MCLOUGHLIN

Handout on Logic, Axiomatic Methods, and Proofs MATH Spring David C. Royster UNC Charlotte

586 Index. vertex, 369 disjoint, 236 pairwise, 272, 395 disjoint sets, 236 disjunction, 33, 36 distributive laws

Section 3.1. Statements and Logical Connectives. Copyright 2013, 2010, 2007, Pearson, Education, Inc.

COT 2104 Homework Assignment 1 (Answers)

Foundation of proofs. Jim Hefferon.

BOOLEAN ALGEBRA INTRODUCTION SUBSETS

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

Chapter 1 : The language of mathematics.

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

CSE 20: Discrete Mathematics

Topic 1: Propositional logic

Section 1.1 Propositional Logic. proposition : true = T (or 1) or false = F (or 0) (binary logic) the moon is made of green cheese

Numbers that are divisible by 2 are even. The above statement could also be written in other logically equivalent ways, such as:

Propositional Calculus

KP/Worksheets: Propositional Logic, Boolean Algebra and Computer Hardware Page 1 of 8

Mathematical Reasoning (Part I) 1

Unit I LOGIC AND PROOFS. B. Thilaka Applied Mathematics

Math 10850, fall 2017, University of Notre Dame

Logic. Def. A Proposition is a statement that is either true or false.

02 Propositional Logic

2 Truth Tables, Equivalences and the Contrapositive

2-4: The Use of Quantifiers

PHIL12A Section answers, 16 February 2011

Mathematics Review for Business PhD Students Lecture Notes

Math Final Exam December 14, 2009 Page 1 of 5

Transcription:

page! 1 of! 26 CISC-102 Fall 2018 Pascal s Triangle ( ) ( ) An easy ( ) ( way ) to calculate ( ) a table of binomial coefficients was recognized centuries ago by mathematicians in India, ) ( ) China, Iran and Europe. In the west the technique is named after the French mathematician Blaise Pascal (1623-1662). In the example below each row represents the binomial coefficients as used in the binomial theorem. ( 6 0 ( 0 ( 1 ) 0) ( 1 ( 0 2 ) ( 2 ) 1) ( 2 ( 0 1 3 ) ( 3 ) ( 3 ) 2) ( 3 ( 0 1 2 4 ) ( 4 ) ( 4 ) ( 4 ) 3) ( 4 ( 0 1 2 3 5 ) ( 5 ) ( 5 ) ( 5 ) ( 5 ) 4) ( 5 ) 0 ( 1 2 3 4 6 ) ( 6 ) ( 6 ) ( 6 ) ( 6 ) 5) ( 6 1 2 3 4 5 6) 1

! ( ) ( ) ( ) ( ) ( ) To obtain the entries by hand in a simple way we can use the identity: ) ( ) ( 6 0 n k = n 1 k 1 + n 1 k. page! 2 of! 26 ( 0 ( 1 ) 0) ( 1 ( 0 2 ) ( 2 ) 1) ( 2 ( 0 1 3 ) ( 3 ) ( 3 ) 2) ( 3 ( 0 1 2 4 ) ( 4 ) ( 4 ) ( 4 ) 3) ( 4 ( 0 1 2 3 5 ) ( 5 ) ( 5 ) ( 5 ) ( 5 ) 4) ( 5 ) 0 ( 1 2 3 4 6 ) ( 6 ) ( 6 ) ( 6 ) ( 6 ) 5) ( 6 1 2 3 4 5 6) 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 1 7 21 35 35 21 7 1 1 8 28 56 70 56 28 8 1 2

( ) ( ) ( ) ( ) ( ) page! 3 of! 26 ) ( ) Consider the sum of elements in a row of Pascal s triangle. If we label the top row 0, then it appears that row i sums to the value 2 i. Can you explain why this is the case? ( 6 0 ( 0 ( 1 ) 0) ( 1 ( 0 2 ) ( 2 ) 1) ( 2 ( 0 1 3 ) ( 3 ) ( 3 ) 2) ( 3 ( 0 1 2 4 ) ( 4 ) ( 4 ) ( 4 ) 3) ( 4 ( 0 1 2 3 5 ) ( 5 ) ( 5 ) ( 5 ) ( 5 ) 4) ( 5 ) 0 ( 1 2 3 4 6 ) ( 6 ) ( 6 ) ( 6 ) ( 6 ) 5) ( 6 1 2 3 4 5 6) 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 1 7 21 35 35 21 7 1 1 8 28 56 70 56 28 8 1! 3

! page! 4 of! 26 Now let s compute the sum of squares of the entries of each row in Pascal s triangle. 1 2 = 1 1 2 + 1 2 = 2 1 2 + 2 2 + 1 2 = 6 1 2 + 3 2 + 3 2 +1 2 = 20 1 2 + 4 2 + 6 2 + 4 2 + 1 2 = 70 These sums all appear in the middle row of Pascal s triangle. 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 1 7 21 35 35 21 7 1 1 8 28 56 70 56 28 8 1 Which leads us to conjecture that: nx 2 n 2n = i n i=0 4

page! 5 of! 26 Before proving the theorem there are two preliminary lemmas. Lemma 1: n k For all non-negative integers n,k, n > k. Proof: Since we already showed that should be obvious. n n k = n k 2 n k = n n k this 5

kx m i=0 k n i i = m + n k page! 6 of! 26 Lemma 2: For all non-negative integers m,n,k such that n m k. Proof: We use a counting argument. The right hand side can be viewed as the number of subsets of size k chosen from the union of two disjoint sets, S of size m, and T of size n. On the left we sum the choices where all k are from S, then k-1 from S and 1 from T and so on up to all k chosen from set T. For example: Suppose S = {a,b} with S = m = 2, and T = {c,d,e} with T = n = 3 and k = 2. So the sum on the right would be: 2X 2 3 2 3 2 3 = + 2 i i 2 0 1 1 i=0 + 2 3 0 2 6

page! 7 of! 26 Theorem: nx i=0 2 n = i for all natural numbers n 1. 2n n Proof: Using lemma 1 we can write n i 2 = n i n n i. Now we observe that the sum is just a special case of lemma 2, where m = n, and k = n, as follows: nx n n i=0 n i i = n + n n 7

page! 8 of! 26 Logic and Propositional Calculus Propositional logic was eventually refined using symbolic logic. The 17th/18th century philosopher Gottfried Leibniz (an inventor of calculus) has been credited with being the founder of symbolic logic. Although his work was the first of its kind, it was unknown to the larger logical community. Consequently, many of the advances achieved by Leibniz were re-achieved by logicians like George Boole and Augustus De Morgan in the 19th century completely independent of Leibniz. 8

page! 9 of! 26 A proposition is a statement that is either true or false. For example: The earth is flat. A tomato is a fruit. The answer to the ultimate question of life, the universe, and everything is 42. 9

page! 10 of! 26 Basic operations Let p and q be logical variables. Basic operations are defined as: Conjunction p q (p and q) (true if both p and q are true, otherwise false) Disjunction p q (p or q) (true if either p or q are true, otherwise false) Negation p (not p) (true if p is false (not true), otherwise false) 10

! page 11! of! 26 Truth tables We can enumerate the values of logical expressions using a truth table. For example: p q q p q p q T T F T T T F T F T F T F F T F F T F F 11

page! 12 of! 26 Notation We can denote a logical expression constructed from logical variables p,q, and logical operators,, and (and, or, not) using the notation P(p,q). We call this type of expression a logical proposition. For example: (p q) ( not (p or q)) is a logical proposition that depends on the values of p and q. We can use truth tables to determine truth values of a logical proposition. p q (p q) (p q) T T T F T F T F F T T F F F F T 12

! page! 13 of! 26 Definitions A tautology is a logical expression that is always true for all values of its variables. A contradiction is a logical expression that is always false (never true) for all values of its variables q q q q q q T F T F F T T F Whether q is true or false, q q is always true, and q q is always false. 13

page! 14 of! 26 Logical Equivalence Two propositions (using the same variables) P(p,q) Q(p,q) are said to be logically equivalent or equivalent or equal if they have identical truth table values. We notate equivalence: P(p,q) Q(p,q) 14

page! 15 of! 26 There are a set of laws of logic that are very similar to the laws of set theory. The laws of logic can be proved by using truth tables. 15

page! 16 of! 26 Table 4-1 Laws of the algebra of propositions Idempotent laws: (1a) p p p (1b) p p p Associative laws: (2a) (p q) r p (q r) (2b) (p q) r p (q r) Commutative laws: (3a) p q q p (3b) p q q p Distributive laws: (4a) p (q r) (p q) (p r) (4b) p (q r) (p q) (p r) Identity laws: Involution law: (7) p p Complement laws: (5a) p F p (5b) p T p (6a) p T T (6b) p F F (8a) p p T (8b) p p T (9a) T F (9b) F T DeMorgan s laws: (10a) (p q) p q (10b) (p q) p q! 16

page! 17 of! 26 We prove DeMorgan s law with truth tables p q (p q) T T F T F F F T F F F T p q p q F F F F T F T F F T T T 17

page! 18 of! 26 We prove the distributive law with truth tables p q r p (q r) T T T T T T F T T F T T T F F T F T T T F T F F F F T F F F F F p q r (p q) (p r) T T T T T T F T T F T T T F F T F T T T F T F F F F T F F F F F 18

page! 19 of! 26 Conditional Statements A typical statement in mathematics is of the form if p then q. For example: In all of these examples variables are assumed to be natural numbers. if a b and b a then a =b if a-7 < 0, then a < 7 if 2 a then 2 (a)(b) All of these statements are true if a and b are natural numbers. In logic we use the symbol to model this type of statement. However, using the symbol in logic does not necessarily have a causal relationship between p and q. if p then q is denoted p q, and pronounced either if p then q or p implies q. 19

page! 20 of! 26 A truth table is used to define the outcomes when using the logical operator. p q p q T T T T F F F T T F F T This definition does not appear to make much sense, however, this is how implication is defined in logic. if sugar is sweet then lemons are sour. Is a true implication. if sugar is sweet then the earth is flat. Is a false implication. if the earth is flat then sugar is sweet. Is a true implication. if the earth is flat then sugar is bitter. Is a true implication 20

page! 21 of! 26 The truth table for implications can be summarized as: 1. An implication is true when the if part is false, or the then part is true. 2. An implication is false only when the if part is true, and the then part is false. Note that p q is logically equivalent to p q. We can verify this with a truth table p q p q T T F F T F T F 21

page! 22 of! 26 Biconditional Implications A shorthand for the pair of statements if a b and b a then a =b if a =b then a b and b a is: a = b if and only if a b and b a This can be notated as a = b (a b) (b a) An often used abbreviation for if and only if is iff. 22

page! 23 of! 26 A truth table for the biconditional implication is: p q p q T T T T F F F T F F F T The truth table for biconditional implications can be summarized as: 1. A biconditional implication is true when both p and q are true, or both p and q are false. Note that p q is logically equivalent to (p q) (q p) as well as ( p q) ( q p). 23

page! 24 of! 26 Suppose we have the proposition p q the contrapositive: q p? is logically equivalent as verified by the following truth table. p q p q q p T T F F T T F F T F F T T F T F F T T T The following example may help in understanding the contrapositive. if 2 a then 2 (a)(b) is logically equivalent to if 2 (a)(b) then 2 a. 24

page! 25 of! 26 Suppose we have the proposition p q the converse: q p? is not logically equivalent as verified by the following truth table. p q q p p q T T T T T F T F F T F T F F T T The following example may help in understanding why the converse is not logically equivalent to the implication. if 2 a then 2 (a)(b) is not logically equivalent to if 2 (a)(b) then 2 a. 25

page! 26 of! 26 It should be obvious that an implication and its converse results in a biconditional implication. that is: p q is logically equivalent to (p q) (q p) 26