Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computability and Complexity 9-1 Computability and Complexity Andrei Bulatov Logic Reminder (Cnt’d)

Similar presentations


Presentation on theme: "Computability and Complexity 9-1 Computability and Complexity Andrei Bulatov Logic Reminder (Cnt’d)"— Presentation transcript:

1 Computability and Complexity 9-1 Computability and Complexity Andrei Bulatov Logic Reminder (Cnt’d)

2 Computability and Complexity 9-2 Propositional logic Conjunctive normal forms Predicates, functions and quantifiers Terms Formulas

3 Computability and Complexity 9-3 Models (First Order Semantics) Let  be a vocabulary. A model appropriate to  is a pair M=(U,  ) consisting of the universe of M, a non-empty set U the interpretation, a function  that assigns - to each predicate symbol P a concrete predicate on U - to each function symbol f a concrete function on U the equality predicate symbol is always assigned the equality predicate on U

4 Computability and Complexity 9-4 Meaning of terms Let t be a term and let T be an assignment of variables in t with values from U if t is a variable, say, t = X, then is defined to be if then is defined to be

5 Computability and Complexity 9-5 A model M and a variable assignment T satisfy a formula  (written M, T |=  ) if if is an atomic formula, then M,T |=  if if  =  then M,T |=  if M,T |   if then M,T |=  if and if then M,T |=  if or if  =  X  then M,T |=  if, for every u  U, where is the assignment that is identical to T, except that if  =  X  then M,T |=  if, there exists u  U such that

6 Computability and Complexity 9-6 Examples A model of the vocabulary of graph theory is a pair G=(U,E), where U is a set and E is a binary relation, that is a graph A model of the vocabulary of number theory U = N, the predicate and function symbols have their usual sense U = Z, the predicate and function symbols have their usual sense U = Q, the predicate and function symbols have their usual sense U = R, the predicate and function symbols have their usual sense U = C, the predicate and function symbols have their usual sense U = {0,…,n-1}, the predicate symbols have their usual sense, the function symbols are interpreted by operations modulo n

7 Computability and Complexity 9-7 Types of First Order Formulas A formula  is said to be valid if M,T   for any model M and assignment T A formula  is said to be satisfiable if M,T   for some M and T A formula  is said to be unsatisfiable if M,T   for no M and T valid s a t i s f i a b l e unsatisfiable Formulas  and  are said to be equivalent,   , if they have the same satisfying models and assignments

8 Computability and Complexity 9-8 Valid Formulas Boolean tautologies Equality Quantifiers

9 Computability and Complexity 9-9 Models and Theories Let  be a vocabulary. For a sentence (set of sentences) , Mod (  ) denotes the class of all models satisfying  For a model (set of models) M, Th (M) denotes the set all sentences satisfied by M (each model from M ) It is called the elementary theory of M If then  is called a valid consequence of written

10 Computability and Complexity 9-10 Examples Let  be a first order description of a computer chip,  states that a deadlock never occurs  is the question “Can the chip be deadlocked?”

11 Computability and Complexity 9-11 Proof Systems A proof system consists of a set axioms a collection of proof rules |   A proof is a sequence of formulas, where every formula is Either an axiom or obtained from preceding formulas using a rule A theorem is any formula occurring in a proof

12 Computability and Complexity 9-12 Propositional Logic Axioms : the main tautologies Proof rules: substitution Let  and  be propositional formulas and let denote the formula obtained from  by replacing every occurrence of X with . Then  |  is a proof rule modus ponens ,  |   Theorems : the tautologies

13 Computability and Complexity 9-13 Predicate Calculus Let  be a vocabulary with plenty of predicate and function symbols Axioms: Proof rules : modus ponens Theorems : valid first order formulas AX0 Any Boolean tautology AX1 Any expression of the following forms: AX1a : t=t AX1b : AX1c : AX2 : Any expression of the form AX3 : Any expression of the form    X , with X not free in  AX4 : Any expression of the form (  X (    )  ((  X  )  (  X  ))

14 Computability and Complexity 9-14 Gödel’s Completeness Theorem Theorem Let  be a set of formulas and  a formula. Then    if and only if    Theorem Let  be a set of formulas and  a formula. Then    if and only if   

15 Computability and Complexity 9-15 Resolution Axioms : a set of disjunctions of atomic formulas (a set of clauses) Proof rules: resolution   P  ,    P   C  X  C , D   X  D  ,      C, D   C  D  (    is called the resolvent of  and  ) R R

16 Computability and Complexity 9-16 Satisfiability Instance: A conjunctive normal form . Question: Is  satisfiable? Satisfiability Instance: A conjunctive normal form  every clause of which contains exactly k literals. Question: Is  satisfiable? k- Satisfiability

17 Computability and Complexity 9-17 Theorem A Satisfiability instance, , is unsatisfiable if and only if    Theorem A Satisfiability instance, , is unsatisfiable if and only if    R Example : (1)(2)(3)(4)(5) Proof :


Download ppt "Computability and Complexity 9-1 Computability and Complexity Andrei Bulatov Logic Reminder (Cnt’d)"

Similar presentations


Ads by Google