Th(N, +) is decidable Presented by: Brian Lee Two Domains 1. We - - PowerPoint PPT Presentation

th n is decidable
SMART_READER_LITE
LIVE PREVIEW

Th(N, +) is decidable Presented by: Brian Lee Two Domains 1. We - - PowerPoint PPT Presentation

Theorem 6.12 Th(N, +) is decidable Presented by: Brian Lee Two Domains 1. We can give an algorithm to decide truth 2. A problem is undecidable First Order Logic Also known as First order predicate calculus Uses quantified


slide-1
SLIDE 1

Th(N, +) is decidable

Presented by: Brian Lee Theorem 6.12

slide-2
SLIDE 2

Two Domains

1. We can give an algorithm to decide truth 2. A problem is undecidable

slide-3
SLIDE 3

First Order Logic

  • Also known as First order predicate calculus
  • Uses quantified variables over non-logical objects

1. Infinitely many primes exist. 2. Fermat’s Last Theorem 3. Twin prime conjecture

slide-4
SLIDE 4

First Order Logic

  • Treat the logical statements as strings and define a language consisting of

those statements are true.

slide-5
SLIDE 5

Terminology

  • Boolean operations, quantifiers, variables, and relations.
  • Formula
  • Atomic Formula
  • Prenex Normal Form
  • Sentences/Statement
  • Free variables
  • Universe
  • Model
  • Language of a Model
  • theory of M - Th(M)
slide-6
SLIDE 6

Boolean Operators

  • Relations (R1,...,Rk)

○ atomic formula: a string of the form R(x1,...,xn) ○ arity: the number of arguments for relation ○ R(x1,...,xn) is a relation taking variables as arguments ○ x1,...,xn are arguments for the R and returns true/false ○ R: x1,...xn -> {TRUE, FALSE}

slide-7
SLIDE 7

Formulas

  • Well formed strings over boolean alphabet(a set of strings part of a formal

language)

  • It must have the requirements:
slide-8
SLIDE 8

Sentences

  • A formula without any free variables
  • Prenex Normal Form

○ Quantifiers are in front of a sentence 1. x2 & x3 are free variables 2. x2 & x3 are free variables 3. Sentence

slide-9
SLIDE 9

Variables and Relations

First we need to specify 2 things

  • Universe over where variables may take values
  • Assignment of specific relations to relation symbols

○ arity of a relation symbol must match that of its assigned relation

slide-10
SLIDE 10

Model

  • A universe with assignment of relations to relation symbols
  • We say that a model M is a

○ tuple of (U,P1,...,Pk) ○ P1,...,Pk are relations assigned to relation symbols R1,...,Rk ○

  • Language of a Model- collection of formulas that

○ use only the relation symbols the model assigns ○ that use each symbol with the correct arity

  • Phi is a sentence in the language of a model

○ has the value {TRUE,FALSE} ○ if TRUE in model M, then M is a model of Phi

slide-11
SLIDE 11

Example 6.10

slide-12
SLIDE 12

Example 6.10 Summary

  • M = (N,<=)
  • R1(x,y) is (x “<=” y)
  • Phi says All natural numbers x and y, there is x >= y or x <= y

○ This sentence is true

  • Using less than “<”, this sentence will not be in the model because

if x == y, then R1 will not work

slide-13
SLIDE 13

Example 6.11

slide-14
SLIDE 14

Example 6.11

  • Universe is real numbers
  • R1 is PLUS(a,b,c) = TRUE whenever a + b =c
  • The sentence phi is true
  • using N instead of R(real) universe would not work.

We can represent functions like addition by relations.

slide-15
SLIDE 15

Theory of M

Written as Th(M):

  • This is the collection of true sentences in the language of the model.
  • So any phi that works for all values in the universe.
  • In example 6.10:

For Model M = (N, <=) [R1(x,y) or R1(y,x)] is inTh(M)

slide-16
SLIDE 16

What this means theory of model (N,+) is decidable for the universe N. Is Decidable, proof will be shown in the next slides.

Th(N, +) is decidable

slide-17
SLIDE 17

Proof Idea

  • We use the finite automata that is capable of doing addition if the input is

presented in a special form. The special form is 3 bit value that represents 8 different characters.

  • Instead we use this form in general for i
slide-18
SLIDE 18

Proof Idea

  • Let
  • Q’s - are quantifiers
  • Psi is a formula without quantifiers

○ has variables: x1,...,xL ○ each quantifier has a variable

  • For each i from 0 to L define:
slide-19
SLIDE 19

Proof Idea

Also each Phi can take arguments a1,...,an from Natural Numbers writing and substitute them for their respective Xi’s.

slide-20
SLIDE 20

Proof Idea

  • For each i from 0 to L, Create a finite automaton Ai that recognize strings

that represent i-tuples of numbers that make phi(i) true.

  • First construct A(L) directly, iterate i from L to 0
  • The construct A(i-1) using Ai
  • Check A0 accepts empty string

○ if it does, phi is true and algorithm accepts

slide-21
SLIDE 21

Proof

  • i is the size of the column
  • [] is also a symbol
  • ai represents a column
slide-22
SLIDE 22

Algorithm to Decide Th(N,+)

  • AL - phiL = psi
  • Addition is the atomic formula we are trying to prove is in N
  • FA can be created to compute any of the individual relations
  • use regular language operations to compute the boolean

combinations of the atomic formulas

slide-23
SLIDE 23

Algorithm to Decide Th(N,+)

  • On input phi, where phi is a sentence
  • Write phi, and define phi(i) for each i from 0 to L.
  • For each i,

○ create finite automaton Ai from phi(I) that accepts strings

  • ver

whenever phi(a1,...,ai) is true

slide-24
SLIDE 24

Construct Ai from Ai+1

slide-25
SLIDE 25

Construct Ai from Ai+1

  • Every time Ai reads Fig. 1
  • It nondeterministically guesses z and simulates Ai+1(Fig. 2)
slide-26
SLIDE 26

Construct Ai from Ai+1

slide-27
SLIDE 27

Construct Ai from Ai+1

  • Ai nondeterministically guesses the leading bit of ai+1

corresponding to leading 0s in a1 through ai by branching with empty strings it’s new start state to all states Ai+1 can reach from its start state with the input strings of the symbols

slide-28
SLIDE 28

Final Step

  • A0 accepts any input iff phi(0) is true
  • Final Step: algorithm test if A0 accepts empty string
  • if it does, phi is true and it accepts, else reject
slide-29
SLIDE 29

Questions?