1 / 31

EE1J2 – Discrete Maths Lecture 2

EE1J2 – Discrete Maths Lecture 2. Tutorials Revision of formalisation Interpreting logical statements in NL Form and Content of an Argument Formalisation of NL – grammatical analysis, production rules, parsing, parse trees Propositional logic as a formal language – symbols and formulae

netis
Download Presentation

EE1J2 – Discrete Maths Lecture 2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. EE1J2 – Discrete Maths Lecture 2 • Tutorials • Revision of formalisation • Interpreting logical statements in NL • Form and Content of an Argument • Formalisation of NL – grammatical analysis, production rules, parsing, parse trees • Propositional logic as a formal language – symbols and formulae • Parsing and parse trees in Propositional Logic,

  2. Tutorial arrangements • 3 Tutorial groups: X, Y and Z • Thursdays 3pm, weeks 3, 5, 7 & 9 • X: Room 220/221 • Y: Room 523 • Z: Room 521/522 • Hand in work Tuesday before tutorial • Drawers marked ‘X, Y, Z’ downstairs

  3. Revision - formalisation Either Arsenal, Chelsea, Liverpool, or ManU will win the league. If neither ManU nor Arsenal win it, then Liverpool will win. If Chelsea or Liverpool fail to win, then Arsenal will not win and ManU will win it.

  4. Elementary propositions • a – Arsenal will win the league • c – Chelsea will win the league • p – Liverpool will win the league • m – ManU will win the league

  5. Implied Connectives • (Either Arsenal, Chelsea, Liverpool, or ManU will win the league)and(If neither ManU nor Arsenal win it, then Liverpool will win)and(If Chelsea or Liverpool fail to win, then Arsenal will not win and ManU will win it)

  6. Formalised statement • Either Arsenal, Chelsea, Liverpool, or ManU will win the league • (a  c  p  m) • If neither ManU nor Arsenal win it, then Liverpool will win • ((m  a)  p) • If Chelsea or Liverpool fail to win, then Arsenal will not win and ManU will win it. • ((c  p) (a  m))

  7. Formalised Statement (a  c  p  m)  ((m  a)  p)  ((c  p) (a  m))

  8. Formalisation (continued) Statement If Polonius is not behind that curtain then Polonius is well Atomic propositions: c – Polonius is behind that curtain w – Polonius is well Formalisation in Propositional Logic: (c)  w

  9. What’s the difference? • Is the statement (c)  w the same as the statement (c  w)? • Why?

  10. NL interpretation of propositional connectives Connective Interpretation p not p, p does not hold, p is false p q p and q, p but q, not only p but q, p while q, p despite q, p yet q, p although q p q p or q, p or q or both, p and/or q, p unless q p q p implies q, if p then q, q if p, p only if q, q when p, p is sufficient for q, p materially implies q Interpreting logical statements in NL

  11. Example • Consider the statement p  q r swhere: p – ‘the thief is young’ q – ‘the thief is hanged’ r – ‘the thief will grow old’ s – ‘the thief will steal

  12. Example: solution • In NL, this equates to: “if the thief is young and the thief is hanged, then the thief will neither grow old nor steal” • Or, if you prefer: “if the thief is young and the thief is hanged, then the thief will not grow old and the thief will not steal”

  13. Exclusive and inclusive OR • The English word ‘or’ can be ambiguous. The two possible meanings are denoted by inclusive or and exclusive or • Inclusive or is represented by the propositional connective  • Exclusive or is represented by (p  q) (p  q) • How do you know this is true?

  14. Separating Form and Content • If I play cricket or go to work, but not both, then I will not be going shopping. Therefore, if I go shopping then neither would I play cricket nor would I go to work • An object remaining stationary or moving at a constant velocity means that there is no external force acting upon it. Therefore, if there is a force acting upon the object, it is not stationary and it is not moving at a constant velocity

  15. Form and Content • Although the content is different, the forms are the same…

  16. Argument 1 If I play cricket or go to work, but not both, then I will not be going shopping. Therefore, if I go shopping then neither would I play cricket nor would I go to work. Atomic Propositions: p – I play cricket q – I go to work r – I go shopping Formal Argument: ((p q) (p q) r)(r(p)(q))

  17. Argument 2 An object remaining stationary or moving at a constant velocity means that there is no external force acting upon it. Therefore, if there is a force acting upon the object, it is not stationary and it is not moving at a constant velocity Atomic propositions: s – the object is stationary m – the object is moving at a constant velocity f – there is an external force acting upon the object Formal Argument ((s  m) (s  m) f)  (f (s)  (m))

  18. Comparison of arguments • Argument 1 ((p  q) (p  q) r) (r  (p)  (q)) • Argument 2 ((s  m) (s  m) f) (f (s)  (m)) • Conclusion: the underlying form is the same

  19. Re-cap • Propositional logic motivated by analogies with natural language • Formalisation of statements in NL • ‘Naturalisation’ of formulae in PL • Separation of form and meaning • Now move on to study propositional logic as a formal language • What is a formal language?

  20. Formalisation of Natural Language • Remember grammar lessons in primary school? • The purpose was to show the underlying grammatical or syntactic structure of the sentence • Or, to decide whether the given sentence is grammatical (i.e. in the language) • Or just to figure out where to put the capital letters, full-stops and commas!

  21. Grammatical analysis in NL • Consider S = “The cat devoured the tiny mouse” • S is made up of • the noun phrase NP = ‘The cat’, and • the verb phrase VP = ‘devoured the tiny mouse’

  22. Grammatical Analysis • NP comprises the determiner ‘The’ and the noun ‘cat’ • VP comprises the verb‘devoured’ and the noun phrase ‘the tiny mouse’ • The noun phrase‘the tiny mouse’ comprises the determiner ‘the’, the adjective ‘tiny’, and the noun ‘mouse’

  23. Production Rules • Formally, this analysis of the sentence is with respect to a set of production rules • Production rules determine how non-terminal elements in a language can be expanded into sequences of non-terminal elements and terminal elements. • The non-terminals are structures like ‘sentence’, ‘noun-phrase’, ‘verb-phrase’, ‘adjective, etc • The terminals are actual words

  24. Production Rules • The first production rule which we used was S  NP + VP • This rule says that one possible form for the non-terminal ‘sentence’ is a noun phrase followed by a verb phrase

  25. Production rules continued • Then we applied more production rules, formally denoted as: NP  DET + N (a noun phrase can take the form ‘determiner’ followed by ‘noun’) VP  V + NP NP  DET + ADJ + N

  26. Parsing • This process is called parsing • The sequence of production rules which transforms S into the sequence of words in the sentence is a parse of the sentence.

  27. Grammatical sentences • In formal language, a sequence of words is • a sentence in the language • or is grammatical if and onlyif • a parse of the word sequence exists • In other words you have to be able to derive the sequence of words by starting with the non-terminal S (sentence) symbol and applying a sequence of rules Same thing!

  28. Parse Trees • The parse of the sentence “The cat devoured the tiny mouse” given by the above set of production rules can be represented simply, intuitively and usefully as a tree structure • This tree structure is called a parse tree

  29. The cat devoured the tiny mouse DET ADJ NOUN DET NOUN VERB NP NP VP S Parse Tree for “the cat devoured the tiny mouse”

  30. Parsing in NL • The bases of the branches of the tree correspond to non-terminal units of the language. • The ‘leaves’ of the tree correspond to the terminal unit. • Local structure of the tree at a non-terminal unit corresponds to the production rule employed in the parse

  31. Summary of Lecture 2 • Revision of formalisation • Interpreting logical statements in NL • Form and Content of an Argument • Formalisation of NL – grammatical analysis, production rules, parsing, parse trees

More Related