CENG 424-Logic for CS Introduction Based on the Lecture Notes of Konstantin Korovin, Valentin Goranko, Russel and Norvig, and Michael Genesereth.

Slides:



Advertisements
Similar presentations
Brief Introduction to Logic. Outline Historical View Propositional Logic : Syntax Propositional Logic : Semantics Satisfiability Natural Deduction : Proofs.
Advertisements

Agents That Reason Logically Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Spring 2004.
Propositional Logic Reading: C , C Logic: Outline Propositional Logic Inference in Propositional Logic First-order logic.
Logic.
Knowledge Representation Methods
CPSC 322, Lecture 19Slide 1 Propositional Logic Intro, Syntax Computer Science cpsc322, Lecture 19 (Textbook Chpt ) February, 23, 2009.
Computability and Complexity 9-1 Computability and Complexity Andrei Bulatov Logic Reminder (Cnt’d)
Artificial Intelligence Modal Logic
Computability and Complexity 8-1 Computability and Complexity Andrei Bulatov Logic Reminder.
Logic in general Logics are formal languages for representing information such that conclusions can be drawn Syntax defines the sentences in the language.
Brief Introduction to Logic. Outline Historical View Propositional Logic : Syntax Propositional Logic : Semantics Satisfiability Natural Deduction : Proofs.
From Chapter 4 Formal Specification using Z David Lightfoot
Programming Language Semantics Mooly SagivEran Yahav Schrirber 317Open space html://
Knoweldge Representation & Reasoning
Semantics with Applications Mooly Sagiv Schrirber html:// Textbooks:Winskel The.
Propositional Calculus Math Foundations of Computer Science.
Adapted from Discrete Math
SAT Solver Math Foundations of Computer Science. 2 Boolean Expressions  A Boolean expression is a Boolean function  Any Boolean function can be written.
CSE 311 Foundations of Computing I Lecture 6 Predicate Logic, Logical Inference Spring
A Brief Summary for Exam 1 Subject Topics Propositional Logic (sections 1.1, 1.2) –Propositions Statement, Truth value, Proposition, Propositional symbol,
Intro. to Logic CS402 Fall Propositional Calculus - Semantics (2/3) Propositional Calculus - Semantics (2/3) Moonzoo Kim CS Division of EECS Dept.
CS 4100 Artificial Intelligence Prof. C. Hafner Class Notes Jan 19, 2012.
Propositional Equivalences
Computing & Information Sciences Kansas State University Wednesday, 20 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 12 of 42 Wednesday, 20 September.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 11 of 41 Wednesday, 15.
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 13 of 41 Monday, 20 September.
CSE 311 Foundations of Computing I Lecture 7 Logical Inference Autumn 2012 CSE
9/30/98 Prof. Richard Fikes Inference In First Order Logic Computer Science Department Stanford University CS222 Fall 1998.
Computing & Information Sciences Kansas State University Lecture 14 of 42 CIS 530 / 730 Artificial Intelligence Lecture 14 of 42 William H. Hsu Department.
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
1/10/ Math/CSE 1019N: Discrete Mathematics for Computer Science Winter 2007 Suprakash Datta Office: CSEB 3043 Phone:
CS6133 Software Specification and Verification
Artificial Intelligence “Introduction to Formal Logic” Jennifer J. Burg Department of Mathematics and Computer Science.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
Nikolaj Bjørner Microsoft Research DTU Winter course January 2 nd 2012 Organized by Flemming Nielson & Hanne Riis Nielson.
Reasoning with Propositional Logic automated processing of a simple knowledge base CD.
Computing & Information Sciences Kansas State University Lecture 12 of 42 CIS 530 / 730 Artificial Intelligence Lecture 12 of 42 William H. Hsu Department.
1 Logic Our ability to state invariants, record preconditions and post- conditions, and the ability to reason about a formal model depend on the logic.
Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 10 of 42 Wednesday, 13 September.
ARTIFICIAL INTELLIGENCE Lecture 2 Propositional Calculus.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View Basic Concepts and Background.
CSC3315 (Spring 2009)1 CSC 3315 Languages & Compilers Hamid Harroud School of Science and Engineering, Akhawayn University
Computing & Information Sciences Kansas State University Monday, 18 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 11 of 42 Monday, 18 September.
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 04 : Logic.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Chapter 1 Propositional Logic
Propositional Logic (a.k.a. Sentential Logic)
Chapter 7. Propositional and Predicate Logic
Computer Science cpsc322, Lecture 20
Propositional Calculus: Boolean Functions and Expressions
Lecture 1 – Formal Logic.
Knowledge and reasoning – second part
ARTIFICIAL INTELLIGENCE
Propositional Calculus: Boolean Functions and Expressions
Lecture 2 Propositional Logic
Propositional Calculus: Boolean Algebra and Simplification
Chapter 1 The Foundations: Logic and Proof, Sets, and Functions
Logics for Data and Knowledge Representation
NP-Completeness Proofs
CSE 311 Foundations of Computing I
Propositional Equivalences
A Brief Summary for Exam 1
Knowledge and reasoning – second part
Back to “Serious” Topics…
Computer Security: Art and Science, 2nd Edition
PROPOSITIONAL LOGIC - SYNTAX-
Chapter 7. Propositional and Predicate Logic
Computer Science cpsc322, Lecture 20
Presentation transcript:

CENG 424-Logic for CS Introduction Based on the Lecture Notes of Konstantin Korovin, Valentin Goranko, Russel and Norvig, and Michael Genesereth

Course Structure  Lectures: Wed 13:40-14:40, Thu 14:40 BMB-5  Assignments: Strict Deadlines!  2 Exams  Course Material: – slides – handouts

Why logic?  Formal specification – no ambiguity  Formal reasoning – prove properties of systems  Tools for automation of reasoning Computer Science is about developing programs and hardware. Logic in Computer Science is used in:  Design of safe and reliable software and hardware  Verification of existing programs and hardware designs  Providing suitable formalism for automation

Logic for CS  circuit design  constraint satisfaction  planning  software and hardware verification:  model checking  Hoare’s logics  higher-order logics  databases  theorem proving in mathematics

CENG 424  Introduction  Basic Definitions (Satisfiability and Validity)  Boolean Functions  Normal Forms  Satisfiability  Analysis of Satisfiability  Semantic Tableaux  Large Propositional Formulas  Quantified Boolean Formulas  Relational Logic  Relational Proofs  Unificaton  Relational Resolution  Applications  Resolution Strategies  Forward and Backward Chaining  Equality  First-Order Logic  First-Order Proofs

What is Logic ?  Syntax: formal language  Semantics: meaning for the language  Reasoning:  Proof theory  Model theory

Why Propositional Logic ?  Propositional logic is one of the simplest logics  Propositional logic has direct applications e.g. circuit design  There are efficient algorithms for reasoning in propositional logic  Propositional logic is a foundation for most of the more expressive logics

Propositional (Boolean) Logic Example: ”If I study hard and I complete all assignments then I will get a good grade.” Atomic propositions (can be true or false):  I study hard  I complete all assignments  I will get a good grade From atomic propositions we can construct more complex propositions (formulas) using Boolean connectives (and, or, not,...).

Syntax: Propositional Formulas Propositional (boolean) variables usually denoted as p, q, r, s,... Connectives:  (and),  (or),  (not),  (implies),  (equivalent) Propositional formula: Every propositional variable is a formula, also called atomic formula, or simply atom.  T(called truth) and  (false) are formulas.  If A1,..., An are formulas, where n  2, then  (A1 ...  An) and (A1 ...  An) are formulas.  If A is a formula, then  A is a formula.  If A and B are formulas, then (A  B) and (A  B) are  formulas.

Subformulas Example: ((p  q)  (q   p  s)) Immediate Subformulas: (p  q) and (q  p  s) Subformulas: ((p  q)  (q   p  s)) ((p  q) and (q   p  s)) P, q,  p, s Notation: A[B] means B occurs in A as a subformula.

Connectives Example: ((p  q)  (q   p  s)) (too many brackets...) Connective Name Priority  negation 4  conjunction 3  disjunction 3  implication 2  equivalence 1 Now we can replace ((p  q)  (q   p  s)) with p  q  q   p  s

Semantics: Interpretation An interpretation I assigns truth values to propositional variables I : P  0, 1  are called truth values or also Boolean values. If I(p) = 1, then p is called true in I. If I(p) = 0, then p is called false in I. Interpretations are also called truth assignments. Example: I(p) = 0; I(q) = 1; I(s) = 0

Truth value Extend I to all formulas: 1. I(T) = 1 and I(  ) = I(A1 ...  An) = 1 if and only if I(Ai) = 1 for all i. 3. I(A1 ...  An) = 1 if and only if I(Ai) = 1 for some i. 4. I(  A) = 1 if and only if I(A) = I(A  B) = 1 if and only if I(A) = 0 or I(B) = I(A  B) = 1 if and only if I(A) = I(B). Notation: I  A if I(A) = 1 (A is true in I) I  A if I(A) = 0 (A is false in I)

Truth Tables

Operation Tables

How to evaluate a formula? Let’s evaluate the formula (p  q)  (p  q  r)  (p  r) in the interpretation  p  1, q  0, r  1 

Summary We started studying propositional logic: Syntax – propositional formulas Semantics – Interpretations assigning truth values Next: satisfiability, validity, equivalence