How To Write A Program That Is A Knowledge Based Computer Science Program

Size: px
Start display at page:

Download "How To Write A Program That Is A Knowledge Based Computer Science Program"

Transcription

1 Knowledge bases Inference engine domain independent algorithms ogical agents Chapter 7 Knowledge base domain specific content Knowledge base = set of sentences in a formal language Declarative approach to building an agent (or other system): Tell it what it needs to know Then it can sk itself what to do answers should follow from the K gents can be viewed at the knowledge level i.e., what they know, regardless of how implemented Or at the implementation level i.e., data structures in K and algorithms that manipulate them Chapter 7 Chapter 7 3 Knowledge-based agents Wumpus world Outline ogic in general models and entailment ropositional (oolean) logic Equivalence, validity, satisfiability Inference rules and theorem proving forward chaining backward chaining resolution simple knowledge-based agent function K-gent( percept) returns an action static: K, a knowledge base t, a counter, initially, indicating time Tell(K, ake-ercept-sentence( percept, t)) action sk(k, ake-ction-uery(t)) Tell(K, ake-ction-sentence(action, t)) t t + return action The agent must be able to: Represent states, actions, etc. Incorporate new percepts Update internal representations of the world Deduce hidden properties of the world Deduce appropriate actions Chapter 7 Chapter 7 4

2 Wumpus World ES description Wumpus world characterization erformance measure gold +, death - - per step, - for using the arrow Environment Squares adjacent to wumpus are smelly Squares adjacent to pit are breezy Glitter iff gold is in the same square Shooting kills wumpus if you are facing it Shooting uses up the only arrow Grabbing picks up gold if in same square Releasing drops the gold in same square 4 3 Stench Stench Gold Stench STRT 3 4 Observable?? artially only local perception Deterministic?? ctuators eft turn, Right turn, Forward, Grab, Release, Shoot Sensors, Glitter, Smell Chapter 7 5 Chapter 7 7 Observable?? Wumpus world characterization Wumpus world characterization Observable?? artially only local perception Deterministic?? Yes outcomes eactly specified Episodic?? Chapter 7 6 Chapter 7 8

3 Wumpus world characterization Observable?? artially local perception Deterministic?? Yes outcomes eactly specified Episodic?? No sequential at the level of actions Static?? Wumpus world characterization Observable?? artially local perception Deterministic?? Yes outcomes eactly specified Episodic?? No sequential at the level of actions Static?? Yes Wumpus and its do not move Discrete?? Yes Single-agent?? Chapter 7 9 Chapter 7 Wumpus world characterization Observable?? artially local perception Deterministic?? Yes outcomes eactly specified Episodic?? No sequential at the level of actions Static?? Yes Wumpus and its do not move Discrete?? Wumpus world characterization Observable?? artially local perception Deterministic?? Yes outcomes eactly specified Episodic?? No sequential at the level of actions Static?? Yes Wumpus and its do not move Discrete?? Yes Single-agent?? Yes Wumpus is essentially a natural feature Chapter 7 Chapter 7

4 Eploring a wumpus world Eploring a wumpus world?? ercept variables: =breeze, S=stench, G=glitter State variables: =pit, W=wumpus, ercept variables: =breeze, S=stench, G=glitter State variables: =pit, W=wumpus, Chapter 7 3 Chapter 7 5 Eploring a wumpus world Eploring a wumpus world?? S ercept variables: =breeze, S=stench, G=glitter State variables: =pit, W=wumpus, ercept variables: =breeze, S=stench, G=glitter State variables: =pit, W=wumpus, Chapter 7 4 Chapter 7 6

5 Eploring a wumpus world Eploring a wumpus world???? S W S W ercept variables: =breeze, S=stench, G=glitter State variables: =pit, W=wumpus, ercept variables: =breeze, S=stench, G=glitter State variables: =pit, W=wumpus, Chapter 7 7 Chapter 7 9 Eploring a wumpus world Eploring a wumpus world???? GS S W S W ercept variables: =breeze, S=stench, G=glitter State variables: =pit, W=wumpus, ercept variables: =breeze, S=stench, G=glitter State variables: =pit, W=wumpus, Chapter 7 8 Chapter 7

6 Other tight spots Entailment Entailment means that one thing follows from another:? K = α S??? in (,) and (,) no safe actions Smell in (,) cannot move Can use a strategy of coercion: shoot straight ahead wumpus was there dead safe wumpus wasn t there safe Knowledge base K entails sentence α if and only if α is true in all worlds where K is true E.g., the K containing the Giants won, the Reds won, (...) entails the Giants won or the Reds won [logical or, not eclusive or] (also the Gaints won and the Reds did not lose,...) E.g., +y=4 entails 4=+y (also...) Entailment is a relationship between sentences (i.e., synta) that is based on semantics Note: brains process synta (of some sort) Chapter 7 Chapter 7 3 ogic in general odels ogics are formal languages for representing information such that conclusions can be drawn Synta defines the sentences in the language Semantics define the meaning of sentences; i.e., define truth of a sentence in a world E.g., the language of arithmetic + y is a sentence; +y > is not a sentence + y is true iff the number + is no less than the number y + y is true in a world where =7, y= + y is false in a world where =, y=6 ogicians typically think in terms of models, which are formally structured worlds with respect to which truth can be evaluated We say m is a model of a sentence α if α is true in m (α) is the set of all models of α Then K = α iff (K) (α) (ie ((K) (α)) = (K) ) E.g. K: Giants won and Reds won α: Giants won [α Gaints and Yankees won ] ( ) (K) Chapter 7 Chapter 7 4

7 Entailment in the wumpus world Wumpus models Situation after detecting nothing in [,], moving right, breeze in [,] Consider possible models for?s assuming only pits 3 oolean choices 8 possible models??? K K = wumpus-world rules + observations Chapter 7 5 Chapter 7 7 Wumpus models Wumpus models 3 3 K K = wumpus-world rules + observations α = [,] is safe, K = α, proved by model checking Chapter 7 6 Chapter 7 8

8 Wumpus models Inference K i α = sentence α can be derived from K by procedure i K Consequences of K are a haystack; α is a needle. Entailment = needle in haystack; inference = finding it Soundness: i is sound if whenever K i α, it is also true that K = α Completeness: i is complete if whenever K = α, it is also true that K i α 3 3 review: we will define a logic (first-order logic) which is epressive enough to say almost anything of interest, and for which there eists a sound and complete inference procedure. K = wumpus-world rules + observations 3 That is, the procedure will answer any question whose answer follows from what is known by the K. Chapter 7 9 Chapter 7 3 Wumpus models ropositional logic: Synta ropositional logic is the simplest logic illustrates basic ideas K The proposition symbols, etc are sentences If S is a sentence, S is a sentence (negation) If S and S are sentences, S S is a sentence (conjunction) If S and S are sentences, S S is a sentence (disjunction) If S and S are sentences, S S is a sentence (implication) If S and S are sentences, S S is a sentence (biconditional) 3 K = wumpus-world rules + observations α = [,] is safe, K = α Chapter 7 3 Chapter 7 3

9 ropositional logic: Semantics Each model specifies true/false for each proposition symbol E.g.,, 3, true true false (With these symbols, 8 possible models, can be enumerated automatically.) Wumpus world sentences et i,j be true if there is a pit in [i,j]. et i,j be true if there is a breeze in [i,j]. Rules for evaluating truth with respect to a model m: S is true iff S is false S S is true iff S is true and S is true S S is true iff S is true or S is true S S is true iff S is false or S is true i.e., is false iff S is true and S is false S S is true iff S S is true and S S is true Simple recursive process evaluates an arbitrary sentence, e.g.,, (, 3, ) = true (false true)=true true=true Chapter 7 33 Chapter 7 35 Truth tables for connectives false false true false false true true false true true false true true false true false false false true false false true true false true true true true Wumpus world sentences et i,j be true if there is a pit in [i,j]. et i,j be true if there is a breeze in [i,j]., (,, ), (,, 3, ) square is breezy if and only if there is an adjacent pit Chapter 7 34 Chapter 7 36

10 Truth tables for inference,,,,,, 3, R R R 3 R 4 R 5 K false false false false false false false true true true true false false false false false false false false true true true false true false false false true false false false false false true true false true true false false true false false false false true true true true true true true false true false false false true false true true true true true true false true false false false true true true true true true true true false true false false true false false true false false true true false true true true true true true true false true true false true false Enumerate rows/models (different assignments to symbols,... 3, ). R,R,... are (true) sentences in K (what we know). When all R,R,... are true, K is true. There are only three rows,, (α) is all false (ie, infer no pit in [,]). ogical equivalence Two sentences are logically equivalent iff true in same models: α β if and only if α = β and β = α (α β) (β α) commutativity of (α β) (β α) commutativity of ((α β) γ) (α (β γ)) associativity of ((α β) γ) (α (β γ)) associativity of ( α) α double-negation elimination (α β) ( β α) contraposition (α β) ( α β) implication elimination (α β) ((α β) (β α)) biconditional elimination (α β) ( α β) De organ (α β) ( α β) De organ (α (β γ)) ((α β) (α γ)) distributivity of over (α (β γ)) ((α β) (α γ)) distributivity of over Chapter 7 37 Chapter 7 39 Inference by enumeration Depth-first enumeration of all models is sound and complete function TT-Entails?(K, α) returns true or false inputs: K, the knowledge base, a sentence in propositional logic α, the query, a sentence in propositional logic symbols a list of the proposition symbols in K and α return TT-Check-ll(K, α, symbols,[]) function TT-Check-ll(K, α, symbols, model) returns true or false if Empty?(symbols) then if -True?(K, model) then return -True?(α, model) else return true else do First(symbols); rest Rest(symbols) return TT-Check-ll(K, α, rest, Etend(, true, model)) and TT-Check-ll(K, α, rest, Etend(, false, model)) Validity and satisfiability sentence is valid if it is true in all models, e.g., True,,, ( ( )) Validity is connected to inference via the Deduction Theorem: K = α if and only if (K α) is valid sentence is satisfiable if it is true in some models e.g.,, C sentence is unsatisfiable if it is true in no models e.g., Satisfiability is connected to inference via the following: K = α if and only if (K α) is unsatisfiable i.e., prove α by reductio ad absurdum (proof by contradiction) O( n ) for n symbols Chapter 7 38 Chapter 7 4

11 roof methods Forward chaining roof methods divide into (roughly) two kinds: Idea: fire any rule whose premises are satisfied in the K, add its conclusion to the K, until query is found pplication of inference rules egitimate (sound) generation of new sentences from old roof = a sequence of inference rule applications Can use inference rules as operators in a standard search alg. Typically require translation of sentences into a normal form odel checking truth table enumeration (always eponential in n) improved backtracking, e.g., Davis utnam ogemann oveland heuristic search in model space (sound but incomplete) e.g., min-conflicts-like hill-climbing algorithms Chapter 7 4 Chapter 7 43 Forward and backward chaining Horn Form (restricted) K = conjunction of Horn clauses Horn clause = proposition symbol; or (conjunction of symbols) symbol E.g., C ( ) (C D ) odus onens (for Horn Form): complete for Horn Ks α,...,α n, α α n β β Can be used with forward chaining or backward chaining. These algorithms are very natural and run in linear time Forward chaining algorithm function -FC-Entails?(K, q) returns true or false inputs: K, the knowledge base, a set of propositional Horn clauses q, the query, a proposition symbol local variables: count, a table, indeed by clause, initially the number of premises inferred, a table, indeed by symbol, each entry initially false agenda, a list of symbols, initially the symbols known in K while agenda is not empty do p op(agenda) unless inferred[p] do inferred[p] true for each Horn clause c in whose premise p appears do decrement count[c] if count[c] = then do if Head[c] = q then return true ush(head[c], agenda) return false Chapter 7 4 Chapter 7 44

12 Forward chaining eample Chapter 7 45 Forward chaining eample Chapter 7 46 Forward chaining eample Chapter 7 47 Forward chaining eample Chapter 7 48

13 Forward chaining eample Chapter 7 49 Forward chaining eample Chapter 7 5 Forward chaining eample Chapter 7 5 Forward chaining eample Chapter 7 5

14 roof of completeness (FC with Horn clauses) FC derives every atomic sentence that is entailed by K. FC reaches a fied point where no new atomic sentences are derived ackward chaining eample. Consider the final state as a model m, assigning true/false to symbols 3. Every clause in the original K is true in m roof: Suppose a clause a... a k b is false in m Then a... a k is true in m and b is false in m Therefore the algorithm has not reached a fied point! 4. Hence m is a model of K 5. If K = q, q is true in every model of K, including m General idea: construct any model of K by sound inference, check α Chapter 7 53 Chapter 7 55 ackward chaining Idea: work backwards from the query q: to prove q by C, check if q is known already, or prove by C all premises of some rule concluding q void loops: check if new subgoal is already on the goal stack ackward chaining eample void repeated work: check if new subgoal ) has already been proved true, or ) has already failed Chapter 7 54 Chapter 7 56

15 ackward chaining eample ackward chaining eample Chapter 7 57 Chapter 7 59 ackward chaining eample ackward chaining eample Chapter 7 58 Chapter 7 6

16 ackward chaining eample ackward chaining eample Chapter 7 6 Chapter 7 63 ackward chaining eample ackward chaining eample Chapter 7 6 Chapter 7 64

17 ackward chaining eample Resolution Conjunctive Normal Form (CNF universal) conjunction of disjunctions of literals } {{ } clauses E.g., ( ) ( C D) Resolution inference rule (for CNF): complete for propositional logic l l k, m m n l l i l i+ l k m m j m j+ m n where l i and m j are complementary literals. E.g.,,3,,,,3?? Resolution is sound and complete for propositional logic S W Chapter 7 65 Chapter 7 67 Forward vs. backward chaining FC is data-driven, cf. automatic, unconscious processing, e.g., object recognition, routine decisions ay do lots of work that is irrelevant to the goal C is goal-driven, appropriate for problem-solving, e.g., Where are my keys? How do I get into a hd program? Compleity of C can be much less than linear in size of K Conversion to CNF, (,, ). Eliminate, replacing α β with (α β) (β α). (, (,, )) ((,, ), ). Eliminate, replacing α β with α β. (,,, ) ( (,, ), ) 3. ove inwards using de organ s rules and double-negation: (,,, ) ((,, ), ) 4. pply distributivity law ( over ) and flatten: (,,, ) (,, ) (,, ) Chapter 7 66 Chapter 7 68

18 Resolution algorithm roof by contradiction, i.e., show K α unsatisfiable function -Resolution(K, α) returns true or false inputs: K, the knowledge base, a sentence in propositional logic α, the query, a sentence in propositional logic clauses the set of clauses in the CNF representation of K α loop do new {} // updated from book for each C i, C j in clauses do resolvents -Resolve(C i,c j ) if resolvents contains the empty clause then return true new new resolvents if new clauses then return false clauses clauses new Summary ogical agents apply inference to a knowledge base to derive new information and make decisions asic concepts of logic: synta: formal structure of sentences semantics: truth of sentences wrt models entailment: necessary truth of one sentence given another inference: deriving sentences from other sentences soundess: derivations produce only entailed sentences completeness: derivations can produce all entailed sentences Wumpus world requires the ability to represent partial and negated information, reason by cases, etc. Forward, backward chaining are linear-time, complete for Horn clauses Resolution is complete for propositional logic ropositional logic lacks epressive power Chapter 7 69 Chapter 7 7 Resolution eample K = (, (,, )), α =,,,,,,,,,,,,,,,,,,,,,,,, Chapter 7 7

Logic in general. Inference rules and theorem proving

Logic in general. Inference rules and theorem proving Logical Agents Knowledge-based agents Logic in general Propositional logic Inference rules and theorem proving First order logic Knowledge-based agents Inference engine Knowledge base Domain-independent

More information

Logical Agents. Explorations in Artificial Intelligence. Knowledge-based Agents. Knowledge-base Agents. Outline. Knowledge bases

Logical Agents. Explorations in Artificial Intelligence. Knowledge-based Agents. Knowledge-base Agents. Outline. Knowledge bases Logical Agents Explorations in Artificial Intelligence rof. Carla. Gomes gomes@cs.cornell.edu Agents that are able to: Form representations of the world Use a process to derive new representations of the

More information

196 Chapter 7. Logical Agents

196 Chapter 7. Logical Agents 7 LOGICAL AGENTS In which we design agents that can form representations of the world, use a process of inference to derive new representations about the world, and use these new representations to deduce

More information

Handout #1: Mathematical Reasoning

Handout #1: Mathematical Reasoning Math 101 Rumbos Spring 2010 1 Handout #1: Mathematical Reasoning 1 Propositional Logic A proposition is a mathematical statement that it is either true or false; that is, a statement whose certainty or

More information

CS510 Software Engineering

CS510 Software Engineering CS510 Software Engineering Propositional Logic Asst. Prof. Mathias Payer Department of Computer Science Purdue University TA: Scott A. Carr Slides inspired by Xiangyu Zhang http://nebelwelt.net/teaching/15-cs510-se

More information

Mathematical Induction

Mathematical Induction Mathematical Induction In logic, we often want to prove that every member of an infinite set has some feature. E.g., we would like to show: N 1 : is a number 1 : has the feature Φ ( x)(n 1 x! 1 x) How

More information

Likewise, we have contradictions: formulas that can only be false, e.g. (p p).

Likewise, we have contradictions: formulas that can only be false, e.g. (p p). CHAPTER 4. STATEMENT LOGIC 59 The rightmost column of this truth table contains instances of T and instances of F. Notice that there are no degrees of contingency. If both values are possible, the formula

More information

DISCRETE MATH: LECTURE 3

DISCRETE MATH: LECTURE 3 DISCRETE MATH: LECTURE 3 DR. DANIEL FREEMAN 1. Chapter 2.2 Conditional Statements If p and q are statement variables, the conditional of q by p is If p then q or p implies q and is denoted p q. It is false

More information

First-order logic. Chapter 8. Chapter 8 1

First-order logic. Chapter 8. Chapter 8 1 First-order logic Chapter 8 Chapter 8 1 Outline Why FOL? Syntax and semantics of FOL Fun with sentences Wumpus world in FOL Chapter 8 2 Pros and cons of propositional logic Propositional logic is declarative:

More information

Introduction to Logic in Computer Science: Autumn 2006

Introduction to Logic in Computer Science: Autumn 2006 Introduction to Logic in Computer Science: Autumn 2006 Ulle Endriss Institute for Logic, Language and Computation University of Amsterdam Ulle Endriss 1 Plan for Today Now that we have a basic understanding

More information

Correspondence analysis for strong three-valued logic

Correspondence analysis for strong three-valued logic Correspondence analysis for strong three-valued logic A. Tamminga abstract. I apply Kooi and Tamminga s (2012) idea of correspondence analysis for many-valued logics to strong three-valued logic (K 3 ).

More information

2. The Language of First-order Logic

2. The Language of First-order Logic 2. The Language of First-order Logic KR & R Brachman & Levesque 2005 17 Declarative language Before building system before there can be learning, reasoning, planning, explanation... need to be able to

More information

CHAPTER 7 GENERAL PROOF SYSTEMS

CHAPTER 7 GENERAL PROOF SYSTEMS CHAPTER 7 GENERAL PROOF SYSTEMS 1 Introduction Proof systems are built to prove statements. They can be thought as an inference machine with special statements, called provable statements, or sometimes

More information

CHAPTER 2. Logic. 1. Logic Definitions. Notation: Variables are used to represent propositions. The most common variables used are p, q, and r.

CHAPTER 2. Logic. 1. Logic Definitions. Notation: Variables are used to represent propositions. The most common variables used are p, q, and r. CHAPTER 2 Logic 1. Logic Definitions 1.1. Propositions. Definition 1.1.1. A proposition is a declarative sentence that is either true (denoted either T or 1) or false (denoted either F or 0). Notation:

More information

6.080/6.089 GITCS Feb 12, 2008. Lecture 3

6.080/6.089 GITCS Feb 12, 2008. Lecture 3 6.8/6.89 GITCS Feb 2, 28 Lecturer: Scott Aaronson Lecture 3 Scribe: Adam Rogal Administrivia. Scribe notes The purpose of scribe notes is to transcribe our lectures. Although I have formal notes of my

More information

This asserts two sets are equal iff they have the same elements, that is, a set is determined by its elements.

This asserts two sets are equal iff they have the same elements, that is, a set is determined by its elements. 3. Axioms of Set theory Before presenting the axioms of set theory, we first make a few basic comments about the relevant first order logic. We will give a somewhat more detailed discussion later, but

More information

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2 CS 70 Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2 Proofs Intuitively, the concept of proof should already be familiar We all like to assert things, and few of us

More information

CSL105: Discrete Mathematical Structures. Ragesh Jaiswal, CSE, IIT Delhi

CSL105: Discrete Mathematical Structures. Ragesh Jaiswal, CSE, IIT Delhi Propositional Logic: logical operators Negation ( ) Conjunction ( ) Disjunction ( ). Exclusive or ( ) Conditional statement ( ) Bi-conditional statement ( ): Let p and q be propositions. The biconditional

More information

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson Mathematics for Computer Science/Software Engineering Notes for the course MSM1F3 Dr. R. A. Wilson October 1996 Chapter 1 Logic Lecture no. 1. We introduce the concept of a proposition, which is a statement

More information

The Classes P and NP

The Classes P and NP The Classes P and NP We now shift gears slightly and restrict our attention to the examination of two families of problems which are very important to computer scientists. These families constitute the

More information

Foundational Proof Certificates

Foundational Proof Certificates An application of proof theory to computer science INRIA-Saclay & LIX, École Polytechnique CUSO Winter School, Proof and Computation 30 January 2013 Can we standardize, communicate, and trust formal proofs?

More information

3. Mathematical Induction

3. Mathematical Induction 3. MATHEMATICAL INDUCTION 83 3. Mathematical Induction 3.1. First Principle of Mathematical Induction. Let P (n) be a predicate with domain of discourse (over) the natural numbers N = {0, 1,,...}. If (1)

More information

Fixed-Point Logics and Computation

Fixed-Point Logics and Computation 1 Fixed-Point Logics and Computation Symposium on the Unusual Effectiveness of Logic in Computer Science University of Cambridge 2 Mathematical Logic Mathematical logic seeks to formalise the process of

More information

Resolution. Informatics 1 School of Informatics, University of Edinburgh

Resolution. Informatics 1 School of Informatics, University of Edinburgh Resolution In this lecture you will see how to convert the natural proof system of previous lectures into one with fewer operators and only one proof rule. You will see how this proof system can be used

More information

Mathematical Induction. Lecture 10-11

Mathematical Induction. Lecture 10-11 Mathematical Induction Lecture 10-11 Menu Mathematical Induction Strong Induction Recursive Definitions Structural Induction Climbing an Infinite Ladder Suppose we have an infinite ladder: 1. We can reach

More information

6.2 Permutations continued

6.2 Permutations continued 6.2 Permutations continued Theorem A permutation on a finite set A is either a cycle or can be expressed as a product (composition of disjoint cycles. Proof is by (strong induction on the number, r, of

More information

facultad de informática universidad politécnica de madrid

facultad de informática universidad politécnica de madrid facultad de informática universidad politécnica de madrid On the Confluence of CHR Analytical Semantics Rémy Haemmerlé Universidad olitécnica de Madrid & IMDEA Software Institute, Spain TR Number CLI2/2014.0

More information

University of Ostrava. Reasoning in Description Logic with Semantic Tableau Binary Trees

University of Ostrava. Reasoning in Description Logic with Semantic Tableau Binary Trees University of Ostrava Institute for Research and Applications of Fuzzy Modeling Reasoning in Description Logic with Semantic Tableau Binary Trees Alena Lukasová Research report No. 63 2005 Submitted/to

More information

Satisfiability Checking

Satisfiability Checking Satisfiability Checking SAT-Solving Prof. Dr. Erika Ábrahám Theory of Hybrid Systems Informatik 2 WS 10/11 Prof. Dr. Erika Ábrahám - Satisfiability Checking 1 / 40 A basic SAT algorithm Assume the CNF

More information

def: An axiom is a statement that is assumed to be true, or in the case of a mathematical system, is used to specify the system.

def: An axiom is a statement that is assumed to be true, or in the case of a mathematical system, is used to specify the system. Section 1.5 Methods of Proof 1.5.1 1.5 METHODS OF PROOF Some forms of argument ( valid ) never lead from correct statements to an incorrect. Some other forms of argument ( fallacies ) can lead from true

More information

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics Undergraduate Notes in Mathematics Arkansas Tech University Department of Mathematics An Introductory Single Variable Real Analysis: A Learning Approach through Problem Solving Marcel B. Finan c All Rights

More information

Overview of the TACITUS Project

Overview of the TACITUS Project Overview of the TACITUS Project Jerry R. Hobbs Artificial Intelligence Center SRI International 1 Aims of the Project The specific aim of the TACITUS project is to develop interpretation processes for

More information

(IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems.

(IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems. 3130CIT: Theory of Computation Turing machines and undecidability (IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems. An undecidable problem

More information

Lecture 17 : Equivalence and Order Relations DRAFT

Lecture 17 : Equivalence and Order Relations DRAFT CS/Math 240: Introduction to Discrete Mathematics 3/31/2011 Lecture 17 : Equivalence and Order Relations Instructor: Dieter van Melkebeek Scribe: Dalibor Zelený DRAFT Last lecture we introduced the notion

More information

A Few Basics of Probability

A Few Basics of Probability A Few Basics of Probability Philosophy 57 Spring, 2004 1 Introduction This handout distinguishes between inductive and deductive logic, and then introduces probability, a concept essential to the study

More information

(LMCS, p. 317) V.1. First Order Logic. This is the most powerful, most expressive logic that we will examine.

(LMCS, p. 317) V.1. First Order Logic. This is the most powerful, most expressive logic that we will examine. (LMCS, p. 317) V.1 First Order Logic This is the most powerful, most expressive logic that we will examine. Our version of first-order logic will use the following symbols: variables connectives (,,,,

More information

Course Outline Department of Computing Science Faculty of Science. COMP 3710-3 Applied Artificial Intelligence (3,1,0) Fall 2015

Course Outline Department of Computing Science Faculty of Science. COMP 3710-3 Applied Artificial Intelligence (3,1,0) Fall 2015 Course Outline Department of Computing Science Faculty of Science COMP 710 - Applied Artificial Intelligence (,1,0) Fall 2015 Instructor: Office: Phone/Voice Mail: E-Mail: Course Description : Students

More information

Coverability for Parallel Programs

Coverability for Parallel Programs 2015 http://excel.fit.vutbr.cz Coverability for Parallel Programs Lenka Turoňová* Abstract We improve existing method for the automatic verification of systems with parallel running processes. The technique

More information

Version Spaces. riedmiller@informatik.uni-freiburg.de

Version Spaces. riedmiller@informatik.uni-freiburg.de . Machine Learning Version Spaces Prof. Dr. Martin Riedmiller AG Maschinelles Lernen und Natürlichsprachliche Systeme Institut für Informatik Technische Fakultät Albert-Ludwigs-Universität Freiburg riedmiller@informatik.uni-freiburg.de

More information

Static Program Transformations for Efficient Software Model Checking

Static Program Transformations for Efficient Software Model Checking Static Program Transformations for Efficient Software Model Checking Shobha Vasudevan Jacob Abraham The University of Texas at Austin Dependable Systems Large and complex systems Software faults are major

More information

KS3 Computing Group 1 Programme of Study 2015 2016 2 hours per week

KS3 Computing Group 1 Programme of Study 2015 2016 2 hours per week 1 07/09/15 2 14/09/15 3 21/09/15 4 28/09/15 Communication and Networks esafety Obtains content from the World Wide Web using a web browser. Understands the importance of communicating safely and respectfully

More information

NP-Completeness and Cook s Theorem

NP-Completeness and Cook s Theorem NP-Completeness and Cook s Theorem Lecture notes for COM3412 Logic and Computation 15th January 2002 1 NP decision problems The decision problem D L for a formal language L Σ is the computational task:

More information

First-Order Logics and Truth Degrees

First-Order Logics and Truth Degrees First-Order Logics and Truth Degrees George Metcalfe Mathematics Institute University of Bern LATD 2014, Vienna Summer of Logic, 15-19 July 2014 George Metcalfe (University of Bern) First-Order Logics

More information

Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.

Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook. Elementary Number Theory and Methods of Proof CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.edu/~cse215 1 Number theory Properties: 2 Properties of integers (whole

More information

A Semantical Perspective on Verification of Knowledge

A Semantical Perspective on Verification of Knowledge A Semantical Perspective on Verification of Knowledge Paul Leemans, Jan Treur, Mark Willems Vrije Universiteit Amsterdam, Department of Artificial Intelligence De Boelelaan 1081a, 1081 HV Amsterdam The

More information

p: I am elected q: I will lower the taxes

p: I am elected q: I will lower the taxes Implication Conditional Statement p q (p implies q) (if p then q) is the proposition that is false when p is true and q is false and true otherwise. Equivalent to not p or q Ex. If I am elected then I

More information

Predicate logic Proofs Artificial intelligence. Predicate logic. SET07106 Mathematics for Software Engineering

Predicate logic Proofs Artificial intelligence. Predicate logic. SET07106 Mathematics for Software Engineering Predicate logic SET07106 Mathematics for Software Engineering School of Computing Edinburgh Napier University Module Leader: Uta Priss 2010 Copyright Edinburgh Napier University Predicate logic Slide 1/24

More information

Predicate Logic Review

Predicate Logic Review Predicate Logic Review UC Berkeley, Philosophy 142, Spring 2016 John MacFarlane 1 Grammar A term is an individual constant or a variable. An individual constant is a lowercase letter from the beginning

More information

AUTOMATED TEST GENERATION FOR SOFTWARE COMPONENTS

AUTOMATED TEST GENERATION FOR SOFTWARE COMPONENTS TKK Reports in Information and Computer Science Espoo 2009 TKK-ICS-R26 AUTOMATED TEST GENERATION FOR SOFTWARE COMPONENTS Kari Kähkönen ABTEKNILLINEN KORKEAKOULU TEKNISKA HÖGSKOLAN HELSINKI UNIVERSITY OF

More information

Clue Deduction: an introduction to satisfiability reasoning

Clue Deduction: an introduction to satisfiability reasoning Clue Deduction: an introduction to satisfiability reasoning Todd W. Neller, Zdravko Markov, Ingrid Russell July 25, 2005 1 Introduction Clue R 1 is a mystery-themed game of deduction. The goal of the game

More information

ON FUNCTIONAL SYMBOL-FREE LOGIC PROGRAMS

ON FUNCTIONAL SYMBOL-FREE LOGIC PROGRAMS PROCEEDINGS OF THE YEREVAN STATE UNIVERSITY Physical and Mathematical Sciences 2012 1 p. 43 48 ON FUNCTIONAL SYMBOL-FREE LOGIC PROGRAMS I nf or m at i cs L. A. HAYKAZYAN * Chair of Programming and Information

More information

Cartesian Products and Relations

Cartesian Products and Relations Cartesian Products and Relations Definition (Cartesian product) If A and B are sets, the Cartesian product of A and B is the set A B = {(a, b) :(a A) and (b B)}. The following points are worth special

More information

CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs

CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs CHAPTER 3 Methods of Proofs 1. Logical Arguments and Formal Proofs 1.1. Basic Terminology. An axiom is a statement that is given to be true. A rule of inference is a logical rule that is used to deduce

More information

Propositional Logic. A proposition is a declarative sentence (a sentence that declares a fact) that is either true or false, but not both.

Propositional Logic. A proposition is a declarative sentence (a sentence that declares a fact) that is either true or false, but not both. irst Order Logic Propositional Logic A proposition is a declarative sentence (a sentence that declares a fact) that is either true or false, but not both. Are the following sentences propositions? oronto

More information

Sudoku as a SAT Problem

Sudoku as a SAT Problem Sudoku as a SAT Problem Inês Lynce IST/INESC-ID, Technical University of Lisbon, Portugal ines@sat.inesc-id.pt Joël Ouaknine Oxford University Computing Laboratory, UK joel@comlab.ox.ac.uk Abstract Sudoku

More information

DEDUCTIVE & INDUCTIVE REASONING

DEDUCTIVE & INDUCTIVE REASONING DEDUCTIVE & INDUCTIVE REASONING Expectations 1. Take notes on inductive and deductive reasoning. 2. This is an information based presentation -- I simply want you to be able to apply this information to

More information

Automated Theorem Proving - summary of lecture 1

Automated Theorem Proving - summary of lecture 1 Automated Theorem Proving - summary of lecture 1 1 Introduction Automated Theorem Proving (ATP) deals with the development of computer programs that show that some statement is a logical consequence of

More information

a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2.

a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2. Chapter 1 LINEAR EQUATIONS 1.1 Introduction to linear equations A linear equation in n unknowns x 1, x,, x n is an equation of the form a 1 x 1 + a x + + a n x n = b, where a 1, a,..., a n, b are given

More information

COMPUTER SCIENCE TRIPOS

COMPUTER SCIENCE TRIPOS CST.98.5.1 COMPUTER SCIENCE TRIPOS Part IB Wednesday 3 June 1998 1.30 to 4.30 Paper 5 Answer five questions. No more than two questions from any one section are to be answered. Submit the answers in five

More information

Regular Languages and Finite Automata

Regular Languages and Finite Automata Regular Languages and Finite Automata 1 Introduction Hing Leung Department of Computer Science New Mexico State University Sep 16, 2010 In 1943, McCulloch and Pitts [4] published a pioneering work on a

More information

Lecture 13 of 41. More Propositional and Predicate Logic

Lecture 13 of 41. More Propositional and Predicate Logic Lecture 13 of 41 More Propositional and Predicate Logic Monday, 20 September 2004 William H. Hsu, KSU http://www.kddresearch.org http://www.cis.ksu.edu/~bhsu Reading: Sections 8.1-8.3, Russell and Norvig

More information

Plan-Space Search. Searching for a Solution Plan in a Graph of Partial Plans

Plan-Space Search. Searching for a Solution Plan in a Graph of Partial Plans Plan-Space Search Searching for a Solution Plan in a Graph of Partial Plans Literature Malik Ghallab, Dana Nau, and Paolo Traverso. Automated Planning Theory and Practice, chapter 2 and 5. Elsevier/Morgan

More information

The last three chapters introduced three major proof techniques: direct,

The last three chapters introduced three major proof techniques: direct, CHAPTER 7 Proving Non-Conditional Statements The last three chapters introduced three major proof techniques: direct, contrapositive and contradiction. These three techniques are used to prove statements

More information

Math 3000 Section 003 Intro to Abstract Math Homework 2

Math 3000 Section 003 Intro to Abstract Math Homework 2 Math 3000 Section 003 Intro to Abstract Math Homework 2 Department of Mathematical and Statistical Sciences University of Colorado Denver, Spring 2012 Solutions (February 13, 2012) Please note that these

More information

Introduction to Automata Theory. Reading: Chapter 1

Introduction to Automata Theory. Reading: Chapter 1 Introduction to Automata Theory Reading: Chapter 1 1 What is Automata Theory? Study of abstract computing devices, or machines Automaton = an abstract computing device Note: A device need not even be a

More information

WRITING PROOFS. Christopher Heil Georgia Institute of Technology

WRITING PROOFS. Christopher Heil Georgia Institute of Technology WRITING PROOFS Christopher Heil Georgia Institute of Technology A theorem is just a statement of fact A proof of the theorem is a logical explanation of why the theorem is true Many theorems have this

More information

Iterated Dynamic Belief Revision. Sonja Smets, University of Groningen. website: http://www.vub.ac.be/clwf/ss

Iterated Dynamic Belief Revision. Sonja Smets, University of Groningen. website: http://www.vub.ac.be/clwf/ss LSE-Groningen Workshop I 1 Iterated Dynamic Belief Revision Sonja Smets, University of Groningen website: http://www.vub.ac.be/clwf/ss Joint work with Alexandru Baltag, COMLAB, Oxford University LSE-Groningen

More information

2 SYSTEM DESCRIPTION TECHNIQUES

2 SYSTEM DESCRIPTION TECHNIQUES 2 SYSTEM DESCRIPTION TECHNIQUES 2.1 INTRODUCTION Graphical representation of any process is always better and more meaningful than its representation in words. Moreover, it is very difficult to arrange

More information

A Client-Server Interactive Tool for Integrated Artificial Intelligence Curriculum

A Client-Server Interactive Tool for Integrated Artificial Intelligence Curriculum A Client-Server Interactive Tool for Integrated Artificial Intelligence Curriculum Diane J. Cook and Lawrence B. Holder Department of Computer Science and Engineering Box 19015 University of Texas at Arlington

More information

Copyright 2012 MECS I.J.Information Technology and Computer Science, 2012, 1, 50-63

Copyright 2012 MECS I.J.Information Technology and Computer Science, 2012, 1, 50-63 I.J. Information Technology and Computer Science, 2012, 1, 50-63 Published Online February 2012 in MECS (http://www.mecs-press.org/) DOI: 10.5815/ijitcs.2012.01.07 Using Logic Programming to Represent

More information

Cosmological Arguments for the Existence of God S. Clarke

Cosmological Arguments for the Existence of God S. Clarke Cosmological Arguments for the Existence of God S. Clarke [Modified Fall 2009] 1. Large class of arguments. Sometimes they get very complex, as in Clarke s argument, but the basic idea is simple. Lets

More information

Generating models of a matched formula with a polynomial delay

Generating models of a matched formula with a polynomial delay Generating models of a matched formula with a polynomial delay Petr Savicky Institute of Computer Science, Academy of Sciences of Czech Republic, Pod Vodárenskou Věží 2, 182 07 Praha 8, Czech Republic

More information

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products Chapter 3 Cartesian Products and Relations The material in this chapter is the first real encounter with abstraction. Relations are very general thing they are a special type of subset. After introducing

More information

Basic Proof Techniques

Basic Proof Techniques Basic Proof Techniques David Ferry dsf43@truman.edu September 13, 010 1 Four Fundamental Proof Techniques When one wishes to prove the statement P Q there are four fundamental approaches. This document

More information

Invalidity in Predicate Logic

Invalidity in Predicate Logic Invalidity in Predicate Logic So far we ve got a method for establishing that a predicate logic argument is valid: do a derivation. But we ve got no method for establishing invalidity. In propositional

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence ICS461 Fall 2010 1 Lecture #12B More Representations Outline Logics Rules Frames Nancy E. Reed nreed@hawaii.edu 2 Representation Agents deal with knowledge (data) Facts (believe

More information

Problem of the Month: Perfect Pair

Problem of the Month: Perfect Pair Problem of the Month: The Problems of the Month (POM) are used in a variety of ways to promote problem solving and to foster the first standard of mathematical practice from the Common Core State Standards:

More information

each college c i C has a capacity q i - the maximum number of students it will admit

each college c i C has a capacity q i - the maximum number of students it will admit n colleges in a set C, m applicants in a set A, where m is much larger than n. each college c i C has a capacity q i - the maximum number of students it will admit each college c i has a strict order i

More information

Regular Expressions and Automata using Haskell

Regular Expressions and Automata using Haskell Regular Expressions and Automata using Haskell Simon Thompson Computing Laboratory University of Kent at Canterbury January 2000 Contents 1 Introduction 2 2 Regular Expressions 2 3 Matching regular expressions

More information

CSE 459/598: Logic for Computer Scientists (Spring 2012)

CSE 459/598: Logic for Computer Scientists (Spring 2012) CSE 459/598: Logic for Computer Scientists (Spring 2012) Time and Place: T Th 10:30-11:45 a.m., M1-09 Instructor: Joohyung Lee (joolee@asu.edu) Instructor s Office Hours: T Th 4:30-5:30 p.m. and by appointment

More information

Answers G53KRR 2009-10

Answers G53KRR 2009-10 s G53KRR 2009-10 1. (a) Express the following sentences in first-order logic, using unary predicates Fragile, Break, Fall, TennisBall. S1 Fragile things break if they fall S2 Tennis balls are not fragile

More information

WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT?

WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT? WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT? introduction Many students seem to have trouble with the notion of a mathematical proof. People that come to a course like Math 216, who certainly

More information

Solutions Q1, Q3, Q4.(a), Q5, Q6 to INTLOGS16 Test 1

Solutions Q1, Q3, Q4.(a), Q5, Q6 to INTLOGS16 Test 1 Solutions Q1, Q3, Q4.(a), Q5, Q6 to INTLOGS16 Test 1 Prof S Bringsjord 0317161200NY Contents I Problems 1 II Solutions 3 Solution to Q1 3 Solutions to Q3 4 Solutions to Q4.(a) (i) 4 Solution to Q4.(a)........................................

More information

High Integrity Software Conference, Albuquerque, New Mexico, October 1997.

High Integrity Software Conference, Albuquerque, New Mexico, October 1997. Meta-Amphion: Scaling up High-Assurance Deductive Program Synthesis Steve Roach Recom Technologies NASA Ames Research Center Code IC, MS 269-2 Moffett Field, CA 94035 sroach@ptolemy.arc.nasa.gov Jeff Van

More information

INTRODUCTORY SET THEORY

INTRODUCTORY SET THEORY M.Sc. program in mathematics INTRODUCTORY SET THEORY Katalin Károlyi Department of Applied Analysis, Eötvös Loránd University H-1088 Budapest, Múzeum krt. 6-8. CONTENTS 1. SETS Set, equal sets, subset,

More information

Pushdown Automata. place the input head on the leftmost input symbol. while symbol read = b and pile contains discs advance head remove disc from pile

Pushdown Automata. place the input head on the leftmost input symbol. while symbol read = b and pile contains discs advance head remove disc from pile Pushdown Automata In the last section we found that restricting the computational power of computing devices produced solvable decision problems for the class of sets accepted by finite automata. But along

More information

Beyond Propositional Logic Lukasiewicz s System

Beyond Propositional Logic Lukasiewicz s System Beyond Propositional Logic Lukasiewicz s System Consider the following set of truth tables: 1 0 0 1 # # 1 0 # 1 1 0 # 0 0 0 0 # # 0 # 1 0 # 1 1 1 1 0 1 0 # # 1 # # 1 0 # 1 1 0 # 0 1 1 1 # 1 # 1 Brandon

More information

Five High Order Thinking Skills

Five High Order Thinking Skills Five High Order Introduction The high technology like computers and calculators has profoundly changed the world of mathematics education. It is not only what aspects of mathematics are essential for learning,

More information

Pushdown automata. Informatics 2A: Lecture 9. Alex Simpson. 3 October, 2014. School of Informatics University of Edinburgh als@inf.ed.ac.

Pushdown automata. Informatics 2A: Lecture 9. Alex Simpson. 3 October, 2014. School of Informatics University of Edinburgh als@inf.ed.ac. Pushdown automata Informatics 2A: Lecture 9 Alex Simpson School of Informatics University of Edinburgh als@inf.ed.ac.uk 3 October, 2014 1 / 17 Recap of lecture 8 Context-free languages are defined by context-free

More information

Computational Logic and Cognitive Science: An Overview

Computational Logic and Cognitive Science: An Overview Computational Logic and Cognitive Science: An Overview Session 1: Logical Foundations Technical University of Dresden 25th of August, 2008 University of Osnabrück Who we are Helmar Gust Interests: Analogical

More information

Lecture Notes in Discrete Mathematics. Marcel B. Finan Arkansas Tech University c All Rights Reserved

Lecture Notes in Discrete Mathematics. Marcel B. Finan Arkansas Tech University c All Rights Reserved Lecture Notes in Discrete Mathematics Marcel B. Finan Arkansas Tech University c All Rights Reserved 2 Preface This book is designed for a one semester course in discrete mathematics for sophomore or junior

More information

Similarity and Diagonalization. Similar Matrices

Similarity and Diagonalization. Similar Matrices MATH022 Linear Algebra Brief lecture notes 48 Similarity and Diagonalization Similar Matrices Let A and B be n n matrices. We say that A is similar to B if there is an invertible n n matrix P such that

More information

CSE 135: Introduction to Theory of Computation Decidability and Recognizability

CSE 135: Introduction to Theory of Computation Decidability and Recognizability CSE 135: Introduction to Theory of Computation Decidability and Recognizability Sungjin Im University of California, Merced 04-28, 30-2014 High-Level Descriptions of Computation Instead of giving a Turing

More information

! " # The Logic of Descriptions. Logics for Data and Knowledge Representation. Terminology. Overview. Three Basic Features. Some History on DLs

!  # The Logic of Descriptions. Logics for Data and Knowledge Representation. Terminology. Overview. Three Basic Features. Some History on DLs ,!0((,.+#$),%$(-&.& *,2(-$)%&2.'3&%!&, Logics for Data and Knowledge Representation Alessandro Agostini agostini@dit.unitn.it University of Trento Fausto Giunchiglia fausto@dit.unitn.it The Logic of Descriptions!$%&'()*$#)

More information

Relations: their uses in programming and computational specifications

Relations: their uses in programming and computational specifications PEPS Relations, 15 December 2008 1/27 Relations: their uses in programming and computational specifications Dale Miller INRIA - Saclay & LIX, Ecole Polytechnique 1. Logic and computation Outline 2. Comparing

More information

Logic and Reasoning Practice Final Exam Spring 2015. Section Number

Logic and Reasoning Practice Final Exam Spring 2015. Section Number Logic and Reasoning Practice Final Exam Spring 2015 Name Section Number The final examination is worth 100 points. 1. (5 points) What is an argument? Explain what is meant when one says that logic is the

More information

On the Modeling and Verification of Security-Aware and Process-Aware Information Systems

On the Modeling and Verification of Security-Aware and Process-Aware Information Systems On the Modeling and Verification of Security-Aware and Process-Aware Information Systems 29 August 2011 What are workflows to us? Plans or schedules that map users or resources to tasks Such mappings may

More information

Example: Backward Chaining. Inference Strategy: Backward Chaining. First-Order Logic. Knowledge Engineering. Example: Proof

Example: Backward Chaining. Inference Strategy: Backward Chaining. First-Order Logic. Knowledge Engineering. Example: Proof Inference Strategy: Backward Chaining Idea: Check whether a particular fact q is true. Backward Chaining: Given a fact q to be proven, 1. See if q is already in the KB. If so, return TRUE. 2. Find all

More information

Computational Methods for Database Repair by Signed Formulae

Computational Methods for Database Repair by Signed Formulae Computational Methods for Database Repair by Signed Formulae Ofer Arieli (oarieli@mta.ac.il) Department of Computer Science, The Academic College of Tel-Aviv, 4 Antokolski street, Tel-Aviv 61161, Israel.

More information

A Theorem Prover for Boolean BI

A Theorem Prover for Boolean BI A Theorem Prover for Boolean BI Jonghyun Park Jeongbong Seo Sungwoo Park Department of Computer Science and Engineering Pohang University of Science and Technology (POSTECH) Republic of Korea {parjong,baramseo,gla}@postech.ac.kr

More information