formal theories, part two sie 550 lecture matt dube doctoral student - spatial

13
Formal Theories, Part Two SIE 550 Lecture Matt Dube Doctoral Student - Spatial

Upload: abel-bradford

Post on 04-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Formal Theories, Part Two SIE 550 Lecture Matt Dube Doctoral Student - Spatial

Formal Theories, Part Two

SIE 550 Lecture

Matt Dube

Doctoral Student - Spatial

Page 2: Formal Theories, Part Two SIE 550 Lecture Matt Dube Doctoral Student - Spatial

Recap of Wednesday

• Formal Theory– Axioms– Association Rules– Theorems

• Boolean Operators

• Truth Tables

• Mathematical Laws

• Example Formal Theory

Page 3: Formal Theories, Part Two SIE 550 Lecture Matt Dube Doctoral Student - Spatial

Wednesday Revisited

• Modus Barbara– “Barbarian” logic– P implies Q– Q implies R…– Therefore P implies R

• Example:– If I learn more then I know more.– If I know more, then I forget more.– If I forget more, then I know less.

• Therefore if I learn more, then I know less.

P implies Q

P implies not Q

Different Truth Tables when P is

true!

Page 4: Formal Theories, Part Two SIE 550 Lecture Matt Dube Doctoral Student - Spatial

If we want their land, we must take it.

To take their land,

we must kill them.

We wanted their land, so we killed them.

Why is this such a problem? It seems

logical…

This is why the Romans called it Barbarian Logic!

Page 5: Formal Theories, Part Two SIE 550 Lecture Matt Dube Doctoral Student - Spatial

P Q R PQ QRPQ and

QRPR

T T T T T T T

T T F T F F F

T F T F T F T

T F F F T F F

F T T T T T T

F T F T F F T

F F T T T T T

F F F T T T T

Modus Barbara

Page 6: Formal Theories, Part Two SIE 550 Lecture Matt Dube Doctoral Student - Spatial

Picking our basis

• How fine do we need to be in defining our ground axioms?

• Example– Mother – composite of female and parent– Human – generic instance

• Benefits?

• Costs?

Page 7: Formal Theories, Part Two SIE 550 Lecture Matt Dube Doctoral Student - Spatial

Today’s Lecture

• Example of a Formal Theory

• Proving Statements in the Formal Theory

• Clausal Form

• Horn Clauses

Page 8: Formal Theories, Part Two SIE 550 Lecture Matt Dube Doctoral Student - Spatial

Example of a Formal Theory

• father(john,harry)• mother(linda,john)• father(horace,john)• mother(alice,harry)• father(john,doug)• grandpa(X,Y)::=father(X,Z) ( father(Z,Y) | mother(Z,Y) )• grandma(X,Y)::=mother(X,Z) ( father(Z,Y) | mother(Z,Y) )• sibling(X,A)::=( father(Z,X) | mother(Z,X) )( father(Z,A) | mother(Z,A) )

• wife(Z,X)::= mother(Z,Y) father(X,Y)

Ground Axioms

Logical Axioms

Page 9: Formal Theories, Part Two SIE 550 Lecture Matt Dube Doctoral Student - Spatial

wife(linda,horace)?

• father(john,harry)• mother(linda,john)• father(horace,john)• mother(alice,harry)• father(john,doug)• grandpa(X,Y)::=father(X,Z) ( father(Z,Y) | mother(Z,Y) )• grandma(X,Y)::=mother(X,Z) ( father(Z,Y) | mother(Z,Y) )• sibling(X,A)::=( father(Z,X) | mother(Z,X) )( father(Z,A) | mother(Z,A) )

• wife(Z,X)::= mother(Z,Y) father(X,Y)

Page 10: Formal Theories, Part Two SIE 550 Lecture Matt Dube Doctoral Student - Spatial

father(john,X)?

• father(john,harry)• mother(linda,john)• father(horace,john)• mother(alice,harry)• father(john,doug)• grandpa(X,Y)::=father(X,Z) ( father(Z,Y) | mother(Z,Y) )• grandma(X,Y)::=mother(X,Z) ( father(Z,Y) | mother(Z,Y) )• sibling(X,A)::=( father(Z,X) | mother(Z,X) )( father(Z,A) | mother(Z,A) )

• wife(Z,X)::= mother(Z,Y) father(X,Y)

X = harry

X = doug

Page 11: Formal Theories, Part Two SIE 550 Lecture Matt Dube Doctoral Student - Spatial

Clausal Form

• Re-writing well formed formulas– Standardized format– Preserving meaning

• Each clause has:– A number of joint clauses– A number of alternative conclusions– Note: 0 is possible!

A1 and A2 and A3 and … IMPLIES B1 or B2 or B3 or …

Page 12: Formal Theories, Part Two SIE 550 Lecture Matt Dube Doctoral Student - Spatial

A1 and A2 and A3 and … IMPLIES B1 or B2 or B3 or …

Since P implies Q, we can write:

Q if P

B1 or B2 or B3 or … IF A1 and A2 and A3 and …

Consequent side Antecedent side

Page 13: Formal Theories, Part Two SIE 550 Lecture Matt Dube Doctoral Student - Spatial

Horn Clauses

B1 or B2 … or Bm A1 and A2 … and Anif

m=1 n=0fact

m=1 n>0rule

m=0 n>0negative fact

m=0 n=0empty clause

m>1 indefinite clause

at most one positive consequent clause