formalism design comp34512
play

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


  1. Formalism Design COMP34512 Sebastian Brandt brandt@cs.manchester.ac.uk (slides by Bijan Parsia bparsia@cs.man.ac.uk ) Tuesday, 4 March 2014

  2. Coursework 1 Results • Median ≈ average ≈ 6.8 • Distribution 2 Tuesday, 4 March 2014

  3. Coursework dates • � Deadlines CW Points – 13 February (CW1) CW1 10 – 11 March (Q1) Q1 3 (assign on 6 March) Q2 3 – 18 March (Q2) Q3 3 (assign on 11 March) Essay 5 – 3 May (Essay, Q3) (assign on 1 April) – 13 May (Practice exam) (assign on 8 May) • We don ʼ t have an exam date yet… Tuesday, 4 March 2014

  4. Predicatise? • Self-Standing (nouny terms) • New Terms – General Eats • Animal ∀ – Mammal » Cat ↔ eats only Dog ∧ » Dog ↔ eats only Cat ¬ » Cow → eats only not Animal → » Human → eats only (not Animal and Animal) ↔ • Modifiers (adjectivally terms) – Domesticated • Pet • Farmed – Wild – Carnivorous ↔ eats only Animal – Herbivorous ↔ eats only not Animal – Omnivorous ↔ Carnivorous and Herbivorous 4 Tuesday, 4 March 2014

  5. Various formalizations English English Prop Logic Prop Logic Predicate Logic Predicate Logic Mammals are Animals M → A Mammals are Animals M → A ∀ x(M(x) → A(x)) ∀ x(M(x) → A(x)) Cats are Mammals Cats are Mammals C → M C → M ∀ y(C(y) → M(y)) ∀ y(C(y) → M(y)) Dogs are Mammals Dogs are Mammals D → M D → M ∀ y ∀ x(D(x) → M(x)) ∀ y ∀ x(D(x) → M(x)) Cats eat Dogs Cats eat Dogs C ↔ DogEaters ∀ x(C(x) ↔ DE(x)) 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))) ∀ x(C(x) ↔ ∃ y(eat(x, y) ∧ D(y))) ∀ x(C(x) ↔ ∃ z(eat(x, z) ∧ D(z))) Dogs eat Cats Dogs eat Cats D ↔ D ↔ ∀ x(D(x) ↔ EC(x)) ∀ x(D(x) ↔ EC(x)) EatersOfCats EatersOfCats ∀ x(D(x) ↔ ∀ z(eat(x, z) → C(z))) ∀ x(D(x) ↔ ∀ z(eat(x, z) → C(z))) ∀ x(D(x) ↔ ∃ y(eat(x, y) ∧ C(y))) ∀ x(D(x) ↔ ∃ y(eat(x, y) ∧ C(y))) What’s with the pointless variance? What about the significant variance? How should we assess these? 5 Tuesday, 4 March 2014

  6. Models! Prop Logic Predicate Logic M → A A = F or ∀ x(M(x) → A(x)) LOTS A, M = T C → M C = F or ∀ y(C(y) → M(y)) LOTS C, M = T D → M D = F or ∀ y ∀ x(D(x) → M(x)) LOTS D, M= T C ↔ C, DE = F ∀ x(C(x) ↔ DE(x)) LOTS DogEaters or LOTS ∀ x(C(x) ↔ ∀ y(eat(x, y) → D(y))) C, DE= T LOTS ∀ x(C(x) ↔ ∃ y(eat(x, y) ∧ D(y))) D ↔ D, EC = F ∀ x(D(x) ↔ CE(x)) LOTS or EatersOfCats LOTS ∀ x(D(x) ↔ ∀ z(eat(x, z) → D(z))) D, EC= T LOTS ∀ x(D(x) ↔ ∃ y(eat(x, y) ∧ D(y))) 6 Tuesday, 4 March 2014

  7. Inferences! 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 ↔ ∀ x(D(x) ↔ CE(x)) EatersOfCats ∀ x(D(x) ↔ ∀ z(eat(x, z) → D(z))) ∀ x(D(x) ↔ ∃ y(eat(x, y) ∧ D(y))) ∀ x(C(x) → A(x)) C → A ∀ x(D(x) → A(x)) D → A 7 Tuesday, 4 March 2014

  8. Inferences! 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 ↔ ∀ x(D(x) ↔ CE(x)) EatersOfCats ∀ x(D(x) ↔ ∀ z(eat(x, z) → D(z))) ∀ x(D(x) ↔ ∃ y(eat(x, y) ∧ D(y))) Human → eats H → EE ∀ x(H(x) → EE(x)) only (not Animal and ∀ x(H(x) → Animal) ∀ 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! 8 Tuesday, 4 March 2014

  9. Evaluating P&P Logic as KR Prop Pred Role 1: Surrogacy Models Models Objects in Role 2: Ontological Commitment Global States relations Role 3: Theory of Reasoning Deduction Deduction Role 4: Efficient Computation TTs are hard! Includes Prop Too many ways Hard to say Role 5: Human Communication to say the same what we mean? thing? 9 Tuesday, 4 March 2014

  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

  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

  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

  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

  14. Case: SAT of a Prop Formula • Time/Space to check SATisfiability of a propositional formula as a function of # of its variables 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? 14 Tuesday, 4 March 2014

  15. Case: SAT of a Prop Formula • Time/Space to check SATisfiability of a propositional formula as a function of # of its variables Truth Table Truth Table Early abort T bort TT 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! 15 Tuesday, 4 March 2014

  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

Recommend


More recommend