Download Ch1 - COW :: Ceng

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Meaning (philosophy of language) wikipedia , lookup

Willard Van Orman Quine wikipedia , lookup

Argument wikipedia , lookup

Foundations of mathematics wikipedia , lookup

Axiom wikipedia , lookup

Abductive reasoning wikipedia , lookup

Stable model semantics wikipedia , lookup

History of the function concept wikipedia , lookup

Fuzzy logic wikipedia , lookup

Model theory wikipedia , lookup

Structure (mathematical logic) wikipedia , lookup

Combinatory logic wikipedia , lookup

Syllogism wikipedia , lookup

Jesús Mosterín wikipedia , lookup

Inquiry wikipedia , lookup

Truth-bearer wikipedia , lookup

Sequent calculus wikipedia , lookup

Natural deduction wikipedia , lookup

History of logic wikipedia , lookup

Mathematical logic wikipedia , lookup

Modal logic wikipedia , lookup

Catuṣkoṭi wikipedia , lookup

Curry–Howard correspondence wikipedia , lookup

Quantum logic wikipedia , lookup

First-order logic wikipedia , lookup

Law of thought wikipedia , lookup

Laws of Form wikipedia , lookup

Principia Mathematica wikipedia , lookup

Intuitionistic logic wikipedia , lookup

Propositional formula wikipedia , lookup

Propositional calculus wikipedia , lookup

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))
Connective Name

negation

conjunction

disjunction

implication

equivalence
(too many brackets...)
Priority
4
3
3
2
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() = 0.
2. 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) = 0.
5. I(A  B) = 1 if and only if I(A) = 0 or I(B) = 1.
6. 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