Formalism Design COMP34512 Sebastian Brandt - - PowerPoint PPT Presentation

formalism design comp34512
SMART_READER_LITE
LIVE PREVIEW

Formalism Design COMP34512 Sebastian Brandt - - PowerPoint PPT Presentation

Formalism Design COMP34512 Sebastian Brandt brandt@cs.manchester.ac.uk (slides by Bijan Parsia bparsia@cs.man.ac.uk ) Tuesday, 4 March 2014 Coursework 1 Results Median average 6.8 Distribution 2 Tuesday, 4 March 2014


slide-1
SLIDE 1

Formalism Design COMP34512

Sebastian Brandt brandt@cs.manchester.ac.uk

(slides by Bijan Parsia bparsia@cs.man.ac.uk )

Tuesday, 4 March 2014

slide-2
SLIDE 2

Coursework 1 Results

2

  • Median ≈ average ≈ 6.8
  • Distribution

Tuesday, 4 March 2014

slide-3
SLIDE 3

Coursework dates

Deadlines – 13 February (CW1) – 11 March (Q1) (assign on 6 March) – 18 March (Q2) (assign on 11 March) – 3 May (Essay, Q3) (assign on 1 April) – 13 May (Practice exam) (assign on 8 May)

  • We donʼt have an exam date yet…

CW Points CW1 10 Q1 3 Q2 3 Q3 3 Essay 5

Tuesday, 4 March 2014

slide-4
SLIDE 4

Predicatise?

  • Self-Standing (nouny terms)

– General

  • Animal

– Mammal » Cat ↔ eats only Dog » Dog ↔ eats only Cat » Cow → eats only not Animal » Human → eats

  • nly (not Animal and Animal)
  • Modifiers (adjectivally terms)

– Domesticated

  • Pet
  • Farmed

– Wild – Carnivorous ↔ eats only Animal – Herbivorous ↔ eats only not Animal – Omnivorous ↔ Carnivorous and Herbivorous

  • New Terms

Eats ∀ ∧ ¬ → ↔

4

Tuesday, 4 March 2014

slide-5
SLIDE 5

English Prop Logic Predicate Logic Mammals are Animals M → A ∀x(M(x) → A(x)) Cats are Mammals C → M ∀y(C(y) → M(y)) Dogs are Mammals D → M ∀y∀x(D(x) → M(x)) Cats eat Dogs C ↔ DogEaters ∀x(C(x) ↔ DE(x)) ∀x(C(x) ↔ ∀y(eat(x, y) → D(y))) ∀x(C(x) ↔ ∃y(eat(x, y) ∧ D(y))) Dogs eat Cats D ↔ EatersOfCats ∀x(D(x) ↔ EC(x)) ∀x(D(x) ↔ ∀z(eat(x, z) → C(z))) ∀x(D(x) ↔ ∃y(eat(x, y) ∧ C(y))) English Prop Logic Predicate Logic Mammals are Animals M → A ∀x(M(x) → A(x)) Cats are Mammals C → M ∀y(C(y) → M(y)) Dogs are Mammals D → M ∀y∀x(D(x) → M(x)) Cats eat Dogs C ↔ DogEaters ∀x(C(x) ↔ DE(x)) ∀x(C(x) ↔ ∀y(eat(x, y) → D(y))) ∀x(C(x) ↔ ∃z(eat(x, z) ∧ D(z))) Dogs eat Cats D ↔ EatersOfCats ∀x(D(x) ↔ EC(x)) ∀x(D(x) ↔ ∀z(eat(x, z) → C(z))) ∀x(D(x) ↔ ∃y(eat(x, y) ∧ C(y)))

Various formalizations

5

What’s with the pointless variance? What about the significant variance? How should we assess these?

Tuesday, 4 March 2014

slide-6
SLIDE 6

Models!

6

Prop Logic Predicate Logic M → A A = F or A, M = T ∀x(M(x) → A(x)) LOTS C → M C = F or C, M = T ∀y(C(y) → M(y)) LOTS D → M D = F or D, M= T ∀y∀x(D(x) → M(x)) LOTS C ↔ DogEaters C, DE = F

  • r

C, DE= T ∀x(C(x) ↔ DE(x)) ∀x(C(x) ↔ ∀y(eat(x, y) → D(y))) ∀x(C(x) ↔ ∃y(eat(x, y) ∧ D(y))) LOTS LOTS LOTS D ↔ EatersOfCats D, EC = F

  • r

D, EC= T ∀x(D(x) ↔ CE(x)) ∀x(D(x) ↔ ∀z(eat(x, z) → D(z))) ∀x(D(x) ↔ ∃y(eat(x, y) ∧ D(y))) LOTS LOTS LOTS

Tuesday, 4 March 2014

slide-7
SLIDE 7

Inferences!

7

English Prop Logic Predicate Logic Mammals are Animals M → A ∀x(M(x) → A(x)) Cats are Mammals C → M ∀y(C(y) → M(y)) Dogs are Mammals D → M ∀y∀x(D(x) → M(x)) Cats eat Dogs C ↔ DogEaters ∀x(C(x) ↔ DE(x)) ∀x(C(x) ↔ ∀y(eat(x, y) → D(y))) ∀x(C(x) ↔ ∃y(eat(x, y) ∧ D(y))) Dogs eat Cats D ↔ EatersOfCats ∀x(D(x) ↔ CE(x)) ∀x(D(x) ↔ ∀z(eat(x, z) → D(z))) ∀x(D(x) ↔ ∃y(eat(x, y) ∧ D(y))) C → A D → A ∀x(C(x) → A(x)) ∀x(D(x) → A(x))

Tuesday, 4 March 2014

slide-8
SLIDE 8

Inferences!

8

English Prop Logic Predicate Logic Mammals are Animals M → A ∀x(M(x) → A(x)) Cats are Mammals C → M ∀y(C(y) → M(y)) Dogs are Mammals D → M ∀y∀x(D(x) → M(x)) Cats eat Dogs C ↔ DogEaters ∀x(C(x) ↔ DE(x)) ∀x(C(x) ↔ ∀y(eat(x, y) → D(y))) ∀x(C(x) ↔ ∃y(eat(x, y) → D(y))) Dogs eat Cats D ↔ EatersOfCats ∀x(D(x) ↔ CE(x)) ∀x(D(x) ↔ ∀z(eat(x, z) → D(z))) ∀x(D(x) ↔ ∃y(eat(x, y) ∧ D(y))) Human → eats

  • nly (not Animal and

Animal) H → EE ∀x(H(x) → EE(x)) ∀x(H(x) → ∀z(eat(x, z) → (A(z) ∧ ¬A(z)))) ∀x(H(x) → ∃y(eat(x, y) ∧ (A(y) ∧ ¬A(y))))

There can be no (such) humans!

Tuesday, 4 March 2014

slide-9
SLIDE 9

Evaluating P&P Logic as KR

9

Role 1: Surrogacy Role 2: Ontological Commitment Role 3: Theory of Reasoning Role 4: Efficient Computation Role 5: Human Communication Models Models Global States Objects in relations Deduction Deduction TTs are hard! Includes Prop Hard to say what we mean? Too many ways to say the same thing?

Prop Pred

Tuesday, 4 March 2014

slide-10
SLIDE 10

Computation

  • How do we assess (or measure) computation effort?

– Of a formalism?

  • Empirically

– By tests! – But how to generate test input?

  • Existing
  • Generated
  • Theoretically (complexity theory)

– We build a model of aspects of the computation

  • Asymptotic complexity

– How time/space varies as input size varies » Esp. “at the limit”

– We explore key cases

  • E.g., What happens in the worst case?

10

Tuesday, 4 March 2014

slide-11
SLIDE 11

Complexity model

  • We need an input size measure

– For us, how about “number of axioms”

  • What’s good about this?
  • What’s bad about this?
  • We need a feature

– Let’s stick with time

  • We need a case

– Worst case – Best case – Average case – “Typical” case

  • We need a problem

– E.g., propositional satisfiability

  • We consider algorithms

11

Tuesday, 4 March 2014

slide-12
SLIDE 12

Algorithms vs. Problems

  • We generally look at decision problems

– I.e., yes/no questions

  • Is this formulae well formed?
  • Is this formulae consistent?

– (We can reduce many general problems to decision problems)

  • Consider:

– parsing is a process which goes from strings to trees – recognising is a process which goes from strings to Yes/No

  • Algorithms are ways of solving problems

– Always many ways for a given problem – Some ways are better than others!

  • Complexity of a problem or algorithm?

– They are related! – CoP is the complexity of the best possible algorithm

  • Generally!

12

Tuesday, 4 March 2014

slide-13
SLIDE 13

Case: SAT of a Prop Formula

  • Time/Space to check SATisfiability of a propositional

formula as a function of # of its variables

  • Two algorithms!

– (Naive) Truth Table Method

  • Generate FULL TRUTH TABLE
  • Check for the existence of a row which is a model

– (Generate THEN check)

– Early Abort Truth Table Method

  • Generate the truth truth table ONE LINE AT A TIME
  • After each line CHECK IF IT IS A MODEL

– If it is, then stop – else, repeat

13

Tuesday, 4 March 2014

slide-14
SLIDE 14

Case: SAT of a Prop Formula

  • Time/Space to check SATisfiability of a propositional

formula as a function of # of its variables

14

Truth Table Early abort TT Best Case (time) Exponential Linear (1 row) (Constant!) Worst Case (time) Exponential Exponential Best Case (space) Exponential Linear (1 row) (Constant!) Worst Case (space) Exponential Exponential

What do we know about the EATT best case?

Tuesday, 4 March 2014

slide-15
SLIDE 15

Case: SAT of a Prop Formula

  • Time/Space to check SATisfiability of a propositional

formula as a function of # of its variables

15

Truth Table Early abort T bort TT Truth Table Yes No Best Case (time) Exponential 1 row All rows Worst Case (time) Exponential All rows All rows Best Case (space) Exponential 1 row All rows Worst Case (space) Exponential All rows All rows

Note that the length of the formula has an influence!

Tuesday, 4 March 2014

slide-16
SLIDE 16

Key points

  • Worst/best case complexity

– crude tools – sensitive to

  • choice of question

– and aspect of question » e.g., yes vs. no

  • choice of input measure

– # variables vs. size of formula

  • choice of input
  • Next time

– Start to skim

  • OWL Primer

– http://www.w3.org/TR/owl-primer/

  • OWL Structural Spec

– http://www.w3.org/TR/owl2-syntax/

16

Tuesday, 4 March 2014