|
||||
HOMEWORK FIVEout Thursday11/8, due Monday 11/19Here are some simple exercises to help you get comfortable with propositional logic. Write out your answers and submit them in class on Wednesday November 4. We'll use the following symbols: 1. Checking ValidityUse the functions in logic.py to see which of the following are valid, i.e., true in every model. You will have to (i) convert these sentences to the appropriate string form that the python code uses (see the comments in the code) and (ii) use the expr() function in logic.py to turn each into an Expr object, and (iii) use the tt_true() function to check for validity. Note that you will have to download the three files in the code directory to use functions in logic.py. Provide text from a session that shows the result of checking the validity of each. We've done the first one as an example.
2. SatisfiabilityUse the functions in logic.py to see which of the following are are satisfiable. We've done the first one as an example.
3. Propositional ConsequenceFor each of the following entailment relations, say whether or not it is true. The text on the left of the entailment symbol (⊨) represents one or more sentences (seperaed by commas) that constitute a knowledge base. We've dne the first one for you.
4. English to FOLTranslate the following English sentences into first order logic. If you think a sentence is ambiguous, describe the ambiguity and give logical expressions for all interpretations. We've done the first one for you using a notation with simple ascii characters for logical operators (e.g., A:∀, E:∃, =>:→, <=>:↔, ^:∧, v:v, ~:¬, >:>)
5. CNF and horn clausesFor each of the following FOL sentences, (a) give a one-sentence, unambiguous paraphrase in English of what you think the FOL sentence means, (b) the say whether or not it can be rewritten as one or more horn clauses and (c) rewrite the sentence as one or more sentences in conjunctive normal form, identifying any skolem constants or functions you introduce.. Feel free to use the simple ascii forms for logical operators described in the previous problem and to use the to_cnf() function in logic.py to check your answers. We've done the first one for you.
What and how to submitSubmit your homework on or before 23:59:59 on Monday, November 19 as an ascii or pdf file the CVS system (details to be supplied once the repo is set up). If you are unable to get CVS to work, submit via email to cmsc671hw@cs.umbc.edu.
|