Translating English Sentences

Slides:



Advertisements
Similar presentations
Exercises for CS1512 Weeks 7 and 8 Propositional Logic 1 (questions + solutions)
Advertisements

The Logic of Quantified Statements
The Foundations: Logic and Proofs
Models and Propositional Logic In propositional logic, a model in general simply fixes the truth value – true or false – for every proposition symbol.
Goals Determine the true value of statements with AND, OR, IF..THEN. Negate statements with the connectives above Construct truth tables Understand when.
Computability and Complexity 8-1 Computability and Complexity Andrei Bulatov Logic Reminder.
Propositional Logic. Negation Given a proposition p, negation of p is the ‘not’ of p.
CSE115/ENGR160 Discrete Mathematics 01/17/12 Ming-Hsuan Yang UC Merced 1.
Propositional Equivalence Goal: Show how propositional equivalences are established & introduce the most important such equivalences.
Copyright © Cengage Learning. All rights reserved.
Chapter 2: The Logic of Compound Statements 2.1 Logical Forms and Equivalence 12.1 Logical Forms and Equivalences Logic is a science of the necessary laws.
Predicates and Quantifiers
Predicates & Quantifiers Goal: Introduce predicate logic, including existential & universal quantification Introduce translation between English sentences.
Chapter 1, Part I: Propositional Logic With Question/Answer Animations.
The Foundations: Logic and Proofs
Discrete Mathematics Goals of a Discrete Mathematics Learn how to think mathematically 1. Mathematical Reasoning Foundation for discussions of methods.
The Foundations: Logic and Proofs
Applications of Propositional Logic
Chapter 1, Part I: Propositional Logic With Question/Answer Animations.
Introductory Lecture Copyright © McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill.
Propositional Equivalences
(CSC 102) Lecture 3 Discrete Structures. Previous Lecture Summary Logical Equivalences. De Morgan’s laws. Tautologies and Contradictions. Laws of Logic.
Boolean Algebra and Computer Logic Mathematical Structures for Computer Science Chapter 7.1 – 7.2 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Boolean.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
Chapter Three Truth Tables 1. Computing Truth-Values We can use truth tables to determine the truth-value of any compound sentence containing one of.
Propositional Satisfiability A compound proposition is satisfiable if there is an assignment of truth values to its variables that make it true. When no.
Lecture Propositional Equivalences. Compound Propositions Compound propositions are made by combining existing propositions using logical operators.
Thinking Mathematically
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
Predicates and Quantifiers Dr. Yasir Ali. 1.Predicates 2.Quantifiers a.Universal Quantifiers b.Existential Quantifiers 3.Negation of Quantifiers 4.Universal.
Mathematics for Comter I Lecture 2: Logic (1) Basic definitions Logical operators Translating English sentences.
Copyright © Peter Cappello 2011 Predicates & Quantifiers.
Discrete Mathematics Lecture # 1. Course Objectives  Express statements with the precision of formal logic.  Analyze arguments to test their validity.
رياضيات متقطعة لعلوم الحاسب MATH 226. Text books: (Discrete Mathematics and its applications) Kenneth H. Rosen, seventh Edition, 2012, McGraw- Hill.
Section 1.4. Propositional Functions Propositional functions become propositions (and have truth values) when their variables are each replaced by a value.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 01: Boolean Logic Sections 1.1 and 1.2 Jarek Rossignac.
Chapter 1, Part I: Propositional Logic With Question/Answer Animations.
Propositional Logic. Assignment Write any five rules each from two games which you like by using propositional logic notations.
1.2 Application of Propositional Logic. Section Summary Translating English sentences Systems Specifications Consistence System Specifications Boolean.
CS-7081 Application - 1. CS-7082 Example - 2 CS-7083 Simplifying a Statement – 3.
 Conjunctive Normal Form: A logic form must satisfy one of the following conditions 1) It must be a single variable (A) 2) It must be the negation of.
Logic.
Propositional Equivalence
DISCRETE MATHEMATICS CHAPTER I.
Chapter 1 – Logic and Proof
Niu Kun Discrete Mathematics Chapter 1 The Foundations: Logic and Proof, Sets, and Functions Niu Kun 离散数学.
Citra Noviyasari, S.Si, MT
Chapter 1 Logic and Proofs.
Predicates & Quantifiers
(CSC 102) Discrete Structures Lecture 2.
The Foundations: Logic and Proofs
The Foundations: Logic and Proofs
Applications of Propositional Logic
CSE 311 Foundations of Computing I
Discrete Math (2) Haiming Chen Associate Professor, PhD
Propositional Equivalences
Discrete Mathematics and Its Applications Kenneth H
Discrete Mathematics Lecture 2: Propositional Logic
Discrete Mathematics CMP-200 Propositional Equivalences, Predicates & Quantifiers, Negating Quantified Statements Abdul Hameed
Discrete Mathematics Lecture 4 & 5: Predicate and Quantifier
TRUTH TABLES.
1.2 Propositional Equivalences
The Foundations: Logic and Proofs
Statements and Logical Connectives
1.3 Propositional Equivalences
Discrete Structures Prepositional Logic 2
The Foundations: Logic and Proofs
The Foundations: Logic and Proofs
Propositional Satisfiability
Presentation transcript:

Translating English Sentences Steps to convert an English sentence to a statement in propositional logic Identify atomic propositions and represent using propositional variables. Determine appropriate logical connectives “If I go to Harry’s or to the country, I will not go shopping.” p: I go to Harry’s q: I go to the country. r: I will go shopping. If p or q then not r.

Example Problem: Translate the following sentence into propositional logic: “You can access the Internet from campus only if you are a computer science major or you are not a freshman.” One Solution: Let a, c, and f represent respectively “You can access the internet from campus,” “You are a computer science major,” and “You are a freshman.”

System Specifications System and Software engineers take requirements in English and express them in a precise specification language based on logic. Example: Express in propositional logic: “The automated reply cannot be sent when the file system is full” Solution: One possible solution: Let p denote “The automated reply can be sent” and q denote “The file system is full.”

Propositional Satisfiability A compound proposition is satisfiable if there is an assignment of truth values to its variables that make it true. When no such assignments exist, the compound proposition is unsatisfiable. A compound proposition is unsatisfiable if and only if its negation is a tautology.

Questions on Propositional Satisfiability Example: Determine the satisfiability of the following compound propositions: Solution: Satisfiable. Assign T to p, q, and r. Solution: Satisfiable. Assign T to p and F to q. Solution: Not satisfiable. Check each possible assignment of truth values to the propositional variables and none will make the proposition true.

Consistent System Specifications Definition: A list of propositions is consistent if it is possible to assign truth values to the proposition variables so that each proposition is true. Exercise: Are these specifications consistent? “The diagnostic message is stored in the buffer or it is retransmitted.” “The diagnostic message is stored in the buffer.” “If the diagnostic message is stored in the buffer, then it is retransmitted.” Solution: Let p denote “The diagnostic message is stored in the buffer.” Let q denote “The diagnostic message is retransmitted” The specification can be written as: p ∨ q, ¬p, p → q. When p is false and q is true all three statements are true. So the specification is consistent. What if “The diagnostic message is not retransmitted” is added. Solution: Now we are adding ¬q and there is no satisfying assignment. So the specification is not consistent.