Discrete Mathematics and its Applications

Slides:



Advertisements
Similar presentations
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 1: (Part 2): The Foundations: Logic and Proofs.
Advertisements

Foundations of Logic Mathematical Logic is a tool for working with elaborate compound statements. It includes: A formal language for expressing them.
2009/91 Predicates and Quantifiers (§1.3) In the sentence “x is greater than 3”: The phrase “x” denotes the subject - the object or entity that the sentence.
1 Predicate Logic Rosen 6 th ed., § Predicate Logic Predicate logic is an extension of propositional logic that permits concisely reasoning.
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
From Chapter 4 Formal Specification using Z David Lightfoot
Discrete Mathematics Math 6A Instructor: M. Welling.
First Order Logic. Propositional Logic A proposition is a declarative sentence (a sentence that declares a fact) that is either true or false, but not.
Lecture 8 Introduction to Logic CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
The Foundations: Logic and Proofs
CSci 2011 Discrete Mathematics Lecture 3 CSci 2011.
Logical Equivalence & Predicate Logic
2009/9 1 Logic and Proofs §1.1 Introduction §1.2 Propositional Equivalences §1.3 Predicates and Quantifiers §1.4 Nested Quantifiers §1.5~7 Methods of Proofs.
2009/9 1 Logic and Proofs §1.1 Introduction §1.2 Propositional Equivalences §1.3 Predicates and Quantifiers §1.4 Nested Quantifiers §1.5~7 Methods of.
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Ch.1 (Part 1): The Foundations: Logic and Proofs Introduction.
Mathematical Structures A collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system.
1 Propositional Logic Rosen 5 th ed., § Foundations of Logic: Overview Propositional logic:Propositional logic: –Basic definitions. –Equivalence.
Propositional Logic Foundations of Logic: Overview Propositional logic (§ ): – Basic definitions. (§1.1) – Equivalence rules & derivations. (§1.2)
CS 285- Discrete Mathematics Lecture 2. Section 1.1 Propositional Logic Propositions Conditional Statements Truth Tables of Compound Propositions Translating.
1.1 CompSci 102© Michael Frank Today’s topics Propositional equivalencesPropositional equivalences Predicate logicPredicate logic Reading: Sections Reading:
Review I Rosen , 3.1 Know your definitions!
1 CMSC 250 Discrete Structures CMSC 250 Lecture 1.
Chapter 2 Logic 2.1 Statements 2.2 The Negation of a Statement 2.3 The Disjunction and Conjunction of Statements 2.4 The Implication 2.5 More on Implications.
Chapter 1: The Foundations: Logic and Proofs
CS 285- Discrete Mathematics Lecture 4. Section 1.3 Predicate logic Predicate logic is an extension of propositional logic that permits concisely reasoning.
Mathematics for Comter I Lecture 2: Logic (1) Basic definitions Logical operators Translating English sentences.
رياضيات متقطعة لعلوم الحاسب MATH 226. Text books: (Discrete Mathematics and its applications) Kenneth H. Rosen, seventh Edition, 2012, McGraw- Hill.
Mathematics for Comter I Lecture 3: Logic (2) Propositional Equivalences Predicates and Quantifiers.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 01: Boolean Logic Sections 1.1 and 1.2 Jarek Rossignac.
Chapter 1. Chapter Summary  Propositional Logic  The Language of Propositions (1.1)  Logical Equivalences (1.3)  Predicate Logic  The Language of.
Chapter 1 Logic and proofs
Module #1 - Logic 2016/7/91 Module #1: Logic (Textbook: §1.1~1.4) Dr. Chih-Wei Yi Department of Computer Science National Chiao Tung University.
Propositional Logic. Logic Logic: the science of reasoning, proof, thinking or inference. Logic allows us to analyze a piece of reasoning and determine.
Logic I 권태경 To do so, it should include a language to express statements, a notation to simplify expressions. Logic Mathematical Logic.
Logic Hubert Chan [O1 Abstract Concepts] [O2 Proof Techniques]
Logic.
2. The Logic of Compound Statements Summary
Propositional Logic.
CSNB 143 Discrete Mathematical Structures
Niu Kun Discrete Mathematics Chapter 1 The Foundations: Logic and Proof, Sets, and Functions Niu Kun 离散数学.
6/20/2018 Discrete Math A word about organization: Since different courses have different lengths of lecture periods, and different instructors go at different.
6/20/2018 Arab Open University Faculty of Computer Studies M131 - Discrete Mathematics 6/20/2018.
COT 3100, Spr Applications of Discrete Structures
(CSC 102) Discrete Structures Lecture 2.
Ch.1 (Part 1): The Foundations: Logic and Proofs
Logic Hubert Chan [O1 Abstract Concepts] [O2 Proof Techniques]
Propositional Logic (§1.1)
CMSC Discrete Structures
The Foundations: Logic and Proofs
Principles of Computing – UFCFA3-30-1
The Foundations: Logic and Proofs
CSCI 3310 Mathematical Foundation of Computer Science
Propositional Calculus: Boolean Algebra and Simplification
Module #1: Foundations of Logic
CS100: Discrete structures
Information Technology Department
Propositional Equivalence (§1.2)
CSI 2101 / Predicate logic (§ ):
CHAPTER 1: LOGICS AND PROOF
Discrete Math - Module #1 - Logic
Applied Discrete Mathematics Week 1: Logic
Predicate Logic (§1.3) Predicate logic is an extension of propositional logic that permits concisely reasoning about whole classes of entities. Propositional.
Computer Security: Art and Science, 2nd Edition
Discrete Mathematics CMP-200 Propositional Equivalences, Predicates & Quantifiers, Negating Quantified Statements Abdul Hameed
Cs Discrete Mathematics
Foundations of Discrete Mathematics
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
Discrete Structures Prepositional Logic 2
The Foundations: Logic and Proofs
Presentation transcript:

Discrete Mathematics and its Applications 2018-12-30 Yonsei Univ. at Wonju Dept. of Mathematics 이산수학 Discrete Mathematics Prof. Gab-Byung Chae Slides for a Course Based on the Text Discrete Mathematics & Its Applications (6th Edition) by Kenneth H. Rosen 2018-12-30 Chae Gab-Byung Chae Gab-Byung

Module #1: Foundations of Logic Discrete Mathematics and its Applications 2018-12-30 Module #1: Foundations of Logic Rosen 6th ed., §§1.1-1.4 ~74 slides, ~4-6 lectures 2018-12-30 Chae Gab-Byung Chae Gab-Byung

Module #1: Foundations of Logic (§§1.1-1.3, ~3 lectures) Discrete Mathematics and its Applications 2018-12-30 Module #1: Foundations of Logic (§§1.1-1.3, ~3 lectures) Mathematical Logic is a tool for working with complicated compound statements. It includes: A language for expressing them. A concise notation for writing them. A methodology for objectively reasoning about their truth or falsity. It is the foundation for expressing formal proofs in all branches of mathematics. 2018-12-30 Chae Gab-Byung Chae Gab-Byung

Foundations of Logic: Overview Discrete Mathematics and its Applications 2018-12-30 Foundations of Logic: Overview Propositional logic (§1.1-1.2): Basic definitions. (§1.1) Equivalence rules & derivations. (§1.2) Predicate logic (§1.3-1.4) Predicates. Quantified predicate expressions. Equivalences & derivations. - 명제 논법과 술어논법 두가지의 논법 2018-12-30 Chae Gab-Byung Chae Gab-Byung

Propositional Logic (§1.1) Discrete Mathematics and its Applications 2018-12-30 Topic #1 – Propositional Logic Propositional Logic (§1.1) Propositional Logic is the logic of compound statements built from simpler statements using so-called Boolean connectives. Some applications in computer science: Design of digital electronic circuits. Expressing conditions in programs. Queries to databases & search engines. George Boole (1815-1864) 명제 논법은 단순한 문장을 Boolean 연산자로 연결하여 만든 복합된 문장의 논법 Chrysippus of Soli (ca. 281 B.C. – 205 B.C.) 2018-12-30 Chae Gab-Byung Chae Gab-Byung

Definition of a Proposition Discrete Mathematics and its Applications 2018-12-30 Topic #1 – Propositional Logic Definition of a Proposition A proposition (p, q, r, …) is simply a statement (i.e., a declarative sentence) with a definite meaning, having a truth value that’s either true (T) or false (F) (never both, neither, or somewhere in between). (However, you might not know the actual truth value, and it might be situation-dependent(그때그때 달라요 ^^).) 참, 거짓 둘중에 오직 하나의 값을 갖는 한정된 의미를 갖는 명제를 p, q, r 로 나타낸다. 2018-12-30 Chae Gab-Byung Chae Gab-Byung

Examples of Propositions Topic #1 – Propositional Logic Examples of Propositions “It is raining.” (In a given situation.) “Beijing is the capital of China.” • “1 + 2 = 3” But, the following are NOT propositions: “Who’s there?” (interrogative, question) “La la la la la.” (meaningless interjection) “Just do it!” (imperative, command) “Yeah, I sorta dunno, whatever...” (vague) “1 + 2” (expression with a non-true/false value) 2018-12-30 Chae Gab-Byung

Operators / Connectives Discrete Mathematics and its Applications 2018-12-30 Topic #1.0 – Propositional Logic: Operators Operators / Connectives An operator or connective(연산자) combines one or more operand expressions into a larger expression. (E.g., “+” in numeric exprs.) Unary operators take 1 operand (e.g., −3); binary operators take 2 operands (eg 3  4). Propositional or Boolean operators operate on propositions or truth values instead of on numbers. Operand : 피연산자 명제연산자나 불린 연산자는 숫자대신 명제나 참.거짓 같은 값에 연산자로 작용한다. Unary 연산자는 마이너스, 프러스 부호와 같이 한 개의 피연산자를 갖는다. Binary는 덧셈 뺄셈 곱셈 나눗셈 처럼 두개의 연산자를 갖는다. 2018-12-30 Chae Gab-Byung Chae Gab-Byung

Some Popular Boolean Operators Formal Name Nickname Arity Symbol Negation operator NOT Unary ¬ Conjunction operator AND Binary  Disjunction operator OR  Exclusive-OR operator XOR  Implication operator IMPLIES  Biconditional operator IFF ↔ 2018-12-30 Chae Gab-Byung

Topic #1.0 – Propositional Logic: Operators The Negation Operator The unary negation operator(부정연산자) “¬” (NOT) transforms a prop. into its logical negation. E.g. If p = “I have brown hair.” then ¬p = “I do not have brown hair.” Truth table for NOT: T :≡ True; F :≡ False “:≡” means “is defined as” Operand column Result column 2018-12-30 Chae Gab-Byung

The Conjunction Operator Topic #1.0 – Propositional Logic: Operators The Conjunction Operator The binary conjunction operator “” (AND) combines two propositions to form their logical conjunction. E.g. If p=“I will have salad for lunch.” and q=“I will have steak for dinner.”, then pq=“I will have salad for lunch and I will have steak for dinner.” ND Remember: “” points up like an “A”, and it means “ND” 2018-12-30 Chae Gab-Byung

Conjunction Truth Table Discrete Mathematics and its Applications 2018-12-30 Topic #1.0 – Propositional Logic: Operators Conjunction Truth Table Operand columns Note that a conjunction p1  p2  …  pn of n propositions will have 2n rows in its truth table. Also: ¬ and  operations together are suffi-cient to express any Boolean truth table! 2018-12-30 Chae Gab-Byung Chae Gab-Byung

The Disjunction Operator Discrete Mathematics and its Applications 2018-12-30 Topic #1.0 – Propositional Logic: Operators The Disjunction Operator The binary disjunction operator “” (OR) combines two propositions to form their logical disjunction. p=“My car has a bad engine.” q=“My car has a bad carburetor.” pq=“My car has a bad engine, or my car has a bad carburetor.”  After the downward- pointing “axe” of “” splits the wood, you can take 1 piece OR the other, or both. 2018-12-30 Chae Gab-Byung Chae Gab-Byung

Disjunction Truth Table Discrete Mathematics and its Applications 2018-12-30 Topic #1.0 – Propositional Logic: Operators Disjunction Truth Table Note that pq means that p is true, or q is true, or both are true! So, this operation is also called inclusive or, because it includes the possibility that both p and q are true. “¬” and “” together are also universal. Note difference from AND Inclusive or : 포괄적 or 즉 both p and q are true 2018-12-30 Chae Gab-Byung Chae Gab-Byung

Nested Propositional Expressions Discrete Mathematics and its Applications 2018-12-30 Topic #1.0 – Propositional Logic: Operators Nested Propositional Expressions Use parentheses to group sub-expressions: “I just saw my old friend, and he’s grown or I’ve shrunk.” = f  (g  s) (f  g)  s would mean something different f  g  s would be ambiguous By convention, “¬” takes precedence over both “” and “”. ¬s  f means (¬s)  f , not ¬ (s  f) Precedence :선행 즉 ‘먼저 계산’ 함을 뜻함 2018-12-30 Chae Gab-Byung Chae Gab-Byung

Discrete Mathematics and its Applications 2018-12-30 Topic #1.0 – Propositional Logic: Operators A Simple Exercise Let p=“It rained last night”, q=“The sprinklers came on last night,” r=“The lawn was wet this morning.” Translate each of the following into English: ¬p = r  ¬p = ¬ r  p  q = “It didn’t rain last night.” “The lawn was wet this morning, and it didn’t rain last night.” For slides that have interactive exercises, it may be a good idea to stop the class for a minute to allow the students to discuss the problem with their neighbors, then call on someone to answer. This will help keep the students engaged in the lecture activity. “The lawn wasn’t wet this morning, or it rained last night, or the sprinklers came on last night.” 2018-12-30 Chae Gab-Byung Chae Gab-Byung

The Exclusive Or Operator Discrete Mathematics and its Applications 2018-12-30 Topic #1.0 – Propositional Logic: Operators The Exclusive Or Operator The binary exclusive-or operator “” (XOR) combines two propositions to form their logical “exclusive or” (exjunction?). p = “I will earn an A in this course,” q = “I will drop this course,” p  q = “I will either earn an A for this course, or I will drop it (but not both! )” exclusive or : 배타적 or 2018-12-30 Chae Gab-Byung Chae Gab-Byung

Exclusive-Or Truth Table Discrete Mathematics and its Applications 2018-12-30 Topic #1.0 – Propositional Logic: Operators Exclusive-Or Truth Table Note that pq means that p is true, or q is true, but not both! This operation is called exclusive or, because it excludes the possibility that both p and q are true. “¬” and “” together are not universal. Note difference from OR. 2018-12-30 Chae Gab-Byung Chae Gab-Byung

The Implication(함축) Operator Discrete Mathematics and its Applications 2018-12-30 Topic #1.0 – Propositional Logic: Operators The Implication(함축) Operator antecedent consequent The implication p  q states that p implies q. (With assumption p, can we reach the conclusion q ? If yes, then p  q is true. If not p  q is false.) E.g., let p = “You study hard.” q = “You will get a good grade.” p  q = “If you study hard, then you will get a good grade.” (else, it could go either way) Antecedent : 가정 Consequent : 귀결 2018-12-30 Chae Gab-Byung Chae Gab-Byung

Implication Truth Table Discrete Mathematics and its Applications 2018-12-30 Topic #1.0 – Propositional Logic: Operators Implication Truth Table p  q is false only when p is true but q is not true. p  q does not say that only p causes q! (possibly there are other reasons) p  q does not require that p or q are ever true! E.g. “(1=0)  pigs can fly” is TRUE! The only False case! Let’s consider the rows of the truth table, one at a time. In the first row, p is false and q is false. Now, let’s consider the definition of p->q. It says “If p is true, then q is true, but if p is false, then q is either true or false.” Well, in this case, p is false, and q is either true or false (namely false), so the second part of the statement is true. But, of course that part is true, since it is just a tautology that q is either true or false. In other words, and if is always true when its antecedent is false. Similarly, the second row is True. The third row is false, since p is true but q is false, so it is not the case that if p is true then q is true. Finally, in the fourth row, since p is true and q is true, it is the case that if q is true then q is true. Many students have trouble with the implication operator. When we say, “A implies B”, it is just a shorthand for “either not A, or B”. In other words, it is just the statement that it is NOT the case that A is true and B is false. This often seems wrong to students, because when we say “A implies B” in everyday English, we mean that if somehow A were to become true in some way, somehow, the statement B would automatically be thereby made true, as a result. This does not seem to be the case in general when A and B are just two random false statements (such as the example in the last bullet). (However in this case, we might make a convoluted argument that the antecedent really DOES effectively imply the consequent: Note that if 1=0, then if a given pig flies 0 times in his life, then he also flies 1 time, thus he can fly.) In any case, perhaps a more accurate and satisfying English rendering of the true meaning of the logical claim “A implies B”, might be just, “the possibility that A implies B is not contradicted directly by the truth values of A and B”. In other words, “it is not the case that A is true and B is false.” (Since that combination of truth values would directly contradict the hypothesis that A implies B.) 2018-12-30 Chae Gab-Byung Chae Gab-Byung

Examples of Implications Discrete Mathematics and its Applications 2018-12-30 Topic #1.0 – Propositional Logic: Operators Examples of Implications “If this lecture ends, then the sun will rise tomorrow.” True or False? “If Tuesday is a day of the week, then I am a penguin.” True or False? “If 1+1=6, then Bush is president.” True or False? “If the moon is made of green cheese, then I am richer than Bill Gates.” True or False? The first one is true because T->T is True. It doesn’t matter that my lecture ending is not the cause of the sun rising tomorrow. The second one is false for me, because although Tuesday is a day of the week, I am most certainly NOT a penguin. (But, if a penguin were to say this statement, then it would be true for him.) The third one is true, because 1+1 is not equal to 6. F->T is True. The last one is true, because the moon is not made of green cheese. F->F is True. In other words, anything that’s false implies anything at all. p->q if p is false. Why? If p is false, then if p is true, then p is both false and true at the same time, and so truth and falsity are the same thing. So if q is false then q is true. 2018-12-30 Chae Gab-Byung Chae Gab-Byung

English Phrases Meaning p  q Topic #1.0 – Propositional Logic: Operators English Phrases Meaning p  q “p implies q” “if p, then q” “if p, q” “when p, q” “whenever p, q” “q if p” “q when p” “q whenever p” “p only if q” “p is sufficient for q” “q is necessary for p” “q follows from p” “q is implied by p” We will see some equivalent logic expressions later. 2018-12-30 Chae Gab-Byung

Converse, Inverse, Contrapositive Discrete Mathematics and its Applications 2018-12-30 Topic #1.0 – Propositional Logic: Operators Converse, Inverse, Contrapositive Some terminology, for an implication p  q: Its converse(역) is: q  p. Its inverse(이) is: ¬p  ¬q. Its contrapositive(대우): ¬q  ¬ p. One of these three has the same meaning (same truth table) as p  q. Can you figure out which? Contrapositive 2018-12-30 Chae Gab-Byung Chae Gab-Byung

Topic #1.0 – Propositional Logic: Operators How do we know for sure? Proving the equivalence of p  q and its contrapositive using truth tables: 2018-12-30 Chae Gab-Byung

The biconditional operator Discrete Mathematics and its Applications 2018-12-30 Topic #1.0 – Propositional Logic: Operators The biconditional operator The biconditional p  q states that p is true if and only if (IFF) q is true. p = “Bush wins the 2004 election.” q = “Bush will be president for all of 2005.” p  q = “If, and only if, Bush wins the 2004 election, Bush will be president for all of 2005.” p  q 는 (p  q)  (q  p)와 같다. 상호조건 명제 = biconditional 2018-12-30 Chae Gab-Byung Chae Gab-Byung

Biconditional Truth Table Discrete Mathematics and its Applications 2018-12-30 Topic #1.0 – Propositional Logic: Operators Biconditional Truth Table p  q means that p and q have the same truth value. Note this truth table is the exact opposite of ’s! p  q means ¬(p  q) p  q does not imply p and q are true, or cause each other. p와 q 가 동일한 진리값을 갖을때만 참이다. 2018-12-30 Chae Gab-Byung Chae Gab-Byung

Boolean Operations Summary Discrete Mathematics and its Applications 2018-12-30 Topic #1.0 – Propositional Logic: Operators Boolean Operations Summary We have seen 1 unary operator (out of the 4 possible) and 5 binary operators (out of the 16 possible). Their truth tables are below. 2018-12-30 Chae Gab-Byung Chae Gab-Byung

Bits and Bit Operations Discrete Mathematics and its Applications 2018-12-30 Topic #2 – Bits Bits and Bit Operations A bit is a binary (base 2) digit: 0 or 1. Bits may be used to represent truth values. By convention: 0 represents “false”; 1 represents “true”. Boolean algebra is like ordinary algebra except that variables stand for bits, + means “or”, and multiplication means “and”. See chapter 10 for more details. John Tukey (1915-2000) 2018-12-30 Chae Gab-Byung Chae Gab-Byung

Tautologies and Contradictions Discrete Mathematics and its Applications 2018-12-30 Topic #1.1 – Propositional Logic: Equivalences Tautologies and Contradictions A tautology(항진명제) is a compound proposition that is true no matter what the truth values of its atomic propositions are! Ex. p  p [What is its truth table?] A contradiction(모순) is a compound proposition that is false no matter what! Ex. p  p [Truth table?] Other compound props. are contingencies. 항진명제 : 항상 참인 명제 모순 : 항상 거짓인 명제 contingency : 불확정 명제 --------- 그때그때 달라요^^ 2018-12-30 Chae Gab-Byung Chae Gab-Byung

Discrete Mathematics and its Applications 2018-12-30 Topic #1.1 – Propositional Logic: Equivalences Logical Equivalence Compound proposition p is logically equivalent to compound proposition q, written pq, IFF the compound proposition p  q is a tautology. Compound propositions p and q are logically equivalent to each other IFF p and q contain the same truth values as each other in all rows of their truth tables. Iff : if and only if p 와 q안의 종속된 명제들이 어떤 진리값을 갖더라도 p  q 가 항상 참일때(p 와 q 의 진리값이 같을 때 ) 즉 항진명제(tautology)일때 복합명제 p와 q는 동치라 한다. 2018-12-30 Chae Gab-Byung Chae Gab-Byung

Proving Equivalence via Truth Tables Topic #1.1 – Propositional Logic: Equivalences Proving Equivalence via Truth Tables Ex. Prove that pq  (p  q). F T T T F T T F F T T F T F T T F F F T 2018-12-30 Chae Gab-Byung

Equivalence Laws - Examples Topic #1.1 – Propositional Logic: Equivalences Equivalence Laws - Examples Identity: pT  p pF  p Domination: pT  T pF  F Idempotent: pp  p pp  p Double negation: p  p Commutative: pq  qp pq  qp Associative: (pq)r  p(qr) (pq)r  p(qr) 2018-12-30 Chae Gab-Byung

Topic #1.1 – Propositional Logic: Equivalences More Equivalence Laws Distributive: p(qr)  (pq)(pr) p(qr)  (pq)(pr) De Morgan’s: (pq)  p  q (pq)  p  q Trivial tautology/contradiction: p  p ( T) p  p( F) Augustus De Morgan (1806-1871) 2018-12-30 Chae Gab-Byung

Defining Operators via Equivalences Topic #1.1 – Propositional Logic: Equivalences Defining Operators via Equivalences Using equivalences, we can define operators in terms of other operators. Exclusive or: pq  (pq)(pq) pq  (pq)(qp) Implies: pq  p  q Biconditional: pq  (pq)  (qp) pq  (pq) 2018-12-30 Chae Gab-Byung

Topic #1.1 – Propositional Logic: Equivalences An Example Problem Check using a symbolic derivation whether (p  q)  (p  r)  p  q  r. (p  q)  (p  r) (p  q)  (p  r) [Expand definition of ] (p  q)  ((p  r)  (p  r)) [Defn. of ] 2018-12-30 Chae Gab-Byung

Example Continued... (p  q)  ((p  r)  (p  r)) [DeMorgan’s Law] Topic #1.1 – Propositional Logic: Equivalences Example Continued... (p  q)  ((p  r)  (p  r)) [DeMorgan’s Law]  (q  p)  ((p  r)  (p  r)) [ commutes]  q  (p  ((p  r)  (p  r))) [ associative] q  (((p  (p  r))  (p  (p  r))) [distrib.  over ] 2018-12-30 Chae Gab-Byung

Example Continued... q  (((p  p)  r)  (p  (p  r))) [assoc.] Topic #1.1 – Propositional Logic: Equivalences Example Continued... q  (((p  p)  r)  (p  (p  r))) [assoc.] q  ((T  r)  (p  (p  r))) [trivail taut.]  q  (T  (p  (p  r))) [domination] q  (p  (p  r)) [identity] cont. 2018-12-30 Chae Gab-Byung

Discrete Mathematics and its Applications 2018-12-30 Topic #1.1 – Propositional Logic: Equivalences End of Long Example  q  (p  (p  r)) [DeMorgan’s]  q  ((p  p)  r) [Assoc.]  q  (p  r) [Idempotent]  (q  p)  r [Assoc.]  p  q  r [Commut.] Q.E.D. (quod erat demonstrandum) Q.E.D : End of proof (Which was to be shown.) 2018-12-30 Chae Gab-Byung Chae Gab-Byung

Discrete Mathematics and its Applications 2018-12-30 Topic #3 – Predicate Logic Predicate Logic (§1.3) Predicate logic is an extension of propositional logic that permits concisely reasoning about whole classes of entities. Propositional logic (recall) treats simple propositions (sentences) as atomic entities. In contrast, predicate logic distinguishes the subject of a sentence from its predicate. Predicate : 술어, 술부 classes of entities : 어떤 실체들의 모임, 수학적 대상의 모임, 예) 실수 전체의 집합 술어논법은 수학적 모델에 맞게 명제 논법을 확장한 것이다. 술어논법은 주부(subject)와 술부(predicate)로 나누어진다. 2018-12-30 Chae Gab-Byung Chae Gab-Byung

Applications of Predicate Logic Discrete Mathematics and its Applications 2018-12-30 Topic #3 – Predicate Logic Applications of Predicate Logic It is the formal notation for writing perfectly clear, concise, and unambiguous mathematical definitions, axioms, and theorems (more on these in chapter 3) for any branch of mathematics. Predicate logic with function symbols, the “=” operator, and a few proof-building rules is sufficient for defining any conceivable mathematical system, and for proving anything that can be proved within that system! 술어 문법은 모든 수학적 문장을 나타낼수 있다. !!! 몇 개가 더 필요 하지만 …. 2018-12-30 Chae Gab-Byung Chae Gab-Byung

Discrete Mathematics and its Applications 2018-12-30 Topic #3 – Predicate Logic Other Applications Predicate logic is the foundation of the field of mathematical logic, which culminated in Gödel’s incompleteness theorem, which revealed the ultimate limits of mathematical thought: Given any finitely describable, consistent proof procedure, there will still be some true statements that can never be proven by that procedure. I.e., we can’t discover all mathematical truths, unless we sometimes resort to making guesses. Kurt Gödel 1906-1978 수학자는 모든 수학적 명제 즉 술어적 논법으로 구축된 명제들이 모두 증명될수있다고 생각했다. 하지만 괴델에 의해 어떤 명제들은 수학적으로 증명될수 없다는 것이 밝혀졌다. 이건 수학적으로 아주 큰 사건이었다. 자세한 것은 set theory 나 사이먼 싱이 지은 ‘페르마의 마지막정리’를 읽어보기 바란다. 2018-12-30 Chae Gab-Byung Chae Gab-Byung

Subjects and Predicates Discrete Mathematics and its Applications 2018-12-30 Topic #3 – Predicate Logic Subjects and Predicates In the sentence “The dog is sleeping”: The phrase “the dog” denotes the subject : the object or entity that the sentence is about. The phrase “is sleeping” denotes the predicate : a property that is true of the subject. In predicate logic, a predicate is modeled as a function P(·) from objects to propositions. P(x) = “x is sleeping” (where x is any object). 술어 문법에서 P(x)는 x 를 input으로 갖는 명제 함수라고도 한다. 2018-12-30 Chae Gab-Byung Chae Gab-Byung

Topic #3 – Predicate Logic More About Predicates Convention: Lowercase variables x, y, z... denote objects/entities; uppercase variables P, Q, R… denote propositional functions (predicates). Keep in mind that the result of applying a predicate P to an object x is the proposition P(x). But the predicate P itself (e.g. P=“is sleeping”) is not a proposition (not a complete sentence). E.g. if P(x) = “x is a prime number”, P(3) is the proposition “3 is a prime number.” 2018-12-30 Chae Gab-Byung

Propositional Functions Topic #3 – Predicate Logic Propositional Functions Predicate logic generalizes the grammatical notion of a predicate to also include propositional functions of any number of arguments, each of which may take any grammatical role that a noun can take. E.g. let P(x,y,z) = “x gave y the grade z”, then if x=“Mike”, y=“Mary”, z=“A”, then P(x,y,z) = “Mike gave Mary the grade A.” 2018-12-30 Chae Gab-Byung

Universes of Discourse (U.D.s) Discrete Mathematics and its Applications 2018-12-30 Topic #3 – Predicate Logic Universes of Discourse (U.D.s) The power of distinguishing objects from predicates is that it lets you state things about many objects at once. E.g., let P(x)=“x+1>x”. We can then say, “For any number x, P(x) is true” instead of (0+1>0)  (1+1>1)  (2+1>2)  ... The collection of values that a variable x can take is called x’s universe of discourse. Universe of discourse : 정의구역이라 생각하면 된다. 2018-12-30 Chae Gab-Byung Chae Gab-Byung

Quantifier Expressions Topic #3 – Predicate Logic Quantifier Expressions Quantifiers provide a notation that allows us to quantify (count) how many objects in the univ. of disc. satisfy a given predicate. “” is the FORLL or universal quantifier. x P(x) means for all x in the u.d., P(x) holds. “” is the XISTS or existential quantifier. x P(x) means there exists an x in the u.d. (that is, 1 or more) such that P(x) holds. 2018-12-30 Chae Gab-Byung

The Universal Quantifier  Discrete Mathematics and its Applications 2018-12-30 Topic #3 – Predicate Logic The Universal Quantifier  Example: Let the u.d. of x be parking spaces. Let P(x) be the predicate “x is full.” Then the universal quantification of P(x), x P(x), is the proposition: “All parking spaces are full.” i.e., “Every parking space is full. universal quantification : 전칭 한정 Existential quantification : 존재 한정 모든 주차장이 다 차다. 2018-12-30 Chae Gab-Byung Chae Gab-Byung

The Existential Quantifier  Discrete Mathematics and its Applications 2018-12-30 Topic #3 – Predicate Logic The Existential Quantifier  Example: Let the u.d. of x be parking spaces. Let P(x) be the predicate “x is full.” Then the existential quantification of P(x), x P(x), is the proposition: “Some parking space is full.” “There is a parking space that is full.” “At least one parking space is full.” 어떤 주차장은 비어있다. 2018-12-30 Chae Gab-Byung Chae Gab-Byung

Free and Bound Variables Topic #3 – Predicate Logic Free and Bound Variables An expression like P(x) is said to have a free variable x (meaning, x is undefined). A quantifier (either  or ) operates on an expression having one or more free variables, and binds one or more of those variables, to produce an expression having one or more bound variables. 2018-12-30 Chae Gab-Byung

Example of Binding y x P(x,y) has 2 free variables, x and y. Topic #3 – Predicate Logic Example of Binding P(x,y) has 2 free variables, x and y. x P(x,y) has 1 free variable , and one bound variable . [Which is which?] “P(x), where x=3” is another way to bind x. An expression with zero free variables is a bona fide(진실한) (actual) proposition. An expression with one or more free variables is still only a predicate: x P(x,y) y x 2018-12-30 Chae Gab-Byung

Nesting of Quantifiers Topic #3 – Predicate Logic Nesting of Quantifiers Example: Let the u.d. of x & y be people. Let L(x,y)=“x likes y” (a predicate w. 2 f.v.’s) Then y L(x,y) = “There is someone whom x likes.” (A predicate w. 1 free variable, x) Then x (y L(x,y)) = “Everyone has someone whom they like.” (A __________ with ___ free variables.) Proposition 2018-12-30 Chae Gab-Byung

Topic #3 – Predicate Logic Quantifier Exercise If R(x,y)=“x relies upon y,” express the following in unambiguous English: xy R(x,y)= yx R(x,y)= xy R(x,y)= yx R(x,y)= xy R(x,y)= Everyone has someone to rely on. There’s a poor overburdened soul whom everyone relies upon (including himself)! There’s some needy person who relies upon everybody (including himself). Everyone has someone who relies upon them. Everyone relies upon everybody, (including themselves)! 2018-12-30 Chae Gab-Byung

Natural language is ambiguous! Topic #3 – Predicate Logic Natural language is ambiguous! “Everybody likes somebody.” For everybody, there is somebody they like, x y Likes(x,y) or, there is somebody (a popular person) whom everyone likes? y x Likes(x,y) “Somebody likes everybody.” Same problem: Depends on context, emphasis. [Probably more likely.] 2018-12-30 Chae Gab-Byung

Still More Conventions Topic #3 – Predicate Logic Still More Conventions Sometimes the universe of discourse is restricted within the quantification, e.g., x>0 P(x) is shorthand for “For all x that are greater than zero, P(x).” =x (x>0  P(x)) x>0 P(x) is shorthand for “There is an x greater than zero such that P(x).” =x (x>0  P(x)) 2018-12-30 Chae Gab-Byung

More to Know About Binding Topic #3 – Predicate Logic More to Know About Binding x x P(x) - x is not a free variable in x P(x), therefore the x binding isn’t used. (x P(x))  Q(x) - The variable x is outside of the scope of the x quantifier, and is therefore free. Not a proposition! (x P(x))  (x Q(x)) – This is legal, because there are 2 different x’s! 2018-12-30 Chae Gab-Byung

Quantifier Equivalence Laws Discrete Mathematics and its Applications 2018-12-30 Topic #3 – Predicate Logic Quantifier Equivalence Laws Definitions of quantifiers: If u.d.=a,b,c,… x P(x)  P(a)  P(b)  P(c)  … x P(x)  P(a)  P(b)  P(c)  … From those, we can prove the laws: x P(x)  x P(x) x P(x)  x P(x) Which propositional equivalence laws can be used to prove this? DeMorgan's 2018-12-30 Chae Gab-Byung Chae Gab-Byung

Topic #3 – Predicate Logic More Equivalence Laws x y P(x,y)  y x P(x,y) x y P(x,y)  y x P(x,y) x (P(x)  Q(x))  (x P(x))  (x Q(x)) x (P(x)  Q(x))  (x P(x))  (x Q(x)) Exercise: See if you can prove these yourself. What propositional equivalences did you use? 2018-12-30 Chae Gab-Byung

More Notational Conventions Topic #3 – Predicate Logic More Notational Conventions Quantifiers bind as loosely as needed: parenthesize x P(x)  Q(x) Consecutive quantifiers of the same type can be combined: x y z P(x,y,z)  x,y,z P(x,y,z) or even xyz P(x,y,z) All quantified expressions can be reduced to the canonical alternating form x1x2x3x4… P(x1, x2, x3, x4, …) ( ) 2018-12-30 Chae Gab-Byung

Defining New Quantifiers Discrete Mathematics and its Applications 2018-12-30 Topic #3 – Predicate Logic Defining New Quantifiers As per their name, quantifiers can be used to express that a predicate is true of any given quantity (number) of objects. Define !x P(x) to mean “P(x) holds by exactly one x in the universe of discourse.” !x P(x)  x (P(x)  y (P(y)  y x)) “There is an x such that P(x), where there is no y such that P(y) and y is other than x.” !x 는 x 가 유일하게(unique) 존재 한다는 것이다. 2018-12-30 Chae Gab-Byung Chae Gab-Byung

Some Number Theory Examples Discrete Mathematics and its Applications 2018-12-30 Topic #3 – Predicate Logic Some Number Theory Examples Let u.d. = the natural numbers 0, 1, 2, … “A number x is even, E(x), if and only if it is equal to 2 times some other number.” x (E(x)  (y x=2y)) “A number is prime, P(x), iff it is greater than 1 and it isn’t the product of two non-unity numbers.” x (P(x)  (x>1  y,z x=yz  y1  z1)) 2018-12-30 Chae Gab-Byung Chae Gab-Byung

Goldbach’s Conjecture (unproven) Discrete Mathematics and its Applications 2018-12-30 Goldbach’s Conjecture (unproven) Using E(x) and P(x) from previous slide, E(x>2): P(p),P(q): p+q = x or, with more explicit notation: x [x>2  E(x)] → p q P(p)  P(q)  ( p+q = x). “Every even number greater than 2 is the sum of two primes.” 2018-12-30 Chae Gab-Byung Chae Gab-Byung

Topic #3 – Predicate Logic Calculus Example One way of precisely defining the calculus concept of a limit, using quantifiers: 2018-12-30 Chae Gab-Byung

Topic #3 – Predicate Logic Deduction Example Definitions: H(x) :≡ “x is human”; M(x) :≡ “x is mortal”; G(x) :≡ “x is a god” Premises: x H(x)  M(x) (“Humans are mortal”) and x G(x)  M(x) (“Gods are immortal”). Show that x (H(x)  G(x)) (“No human is a god.”) 2018-12-30 Chae Gab-Byung

The Derivation x H(x)M(x) and x G(x)M(x). Topic #3 – Predicate Logic The Derivation x H(x)M(x) and x G(x)M(x). x M(x)H(x) [Contrapositive.] x [G(x)M(x)]  [M(x)H(x)] x G(x)H(x) [Transitivity of .] x G(x)  H(x) [Definition of .] x (G(x)  H(x)) [DeMorgan’s law.] x G(x)  H(x) [An equivalence law.] 2018-12-30 Chae Gab-Byung