DOC PREVIEW
CMU CS 15414 - Lecture 1: Propositional Logic

This preview shows page 1-2-21-22 out of 22 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 22 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 22 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 22 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 22 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 22 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Lecture 1: Propositional LogicSyntaxSemanticsTruth tablesImplications and EquivalencesValid and Inva lid argumentsNormal formsDavis-Putnam Alg o r ith m1Atomic propositions and logical connectivesAn atomic proposition is a statement or ass ertion tha t must be true or false.Examples of atomic propositions are: “5 is a prime” and “programterminates”.Propos itio n a l formula s are co n s tr u cted from atomic propositions by using logical connectiv es.Connectivesfalsetruenotandorconditional (implies)biconditional (equivalent)A typical pr o p o s itio n al formula isThe truth value of a propositional formula can be calculated from the truth values of the atomicpropositions it contains .2Well-formed propositional formulasThe well-formed fo r mulas of propositional lo g ic are obtained by using the cons tr u ction rulesbelow:An atomic proposition is a well-formed formula.If is a well- f o r med formula, then so is .If and are well-formed formulas, then so are , , , and .If is a well- f o r med formula, then so is .Alternatively, can use Backus-Naur Form (BNF) :formula ::= Atomic Propositionformulaformula formulaformula formulaformula formulaformula formulaformula3Truth functionsThe truth of a pr o p o s itio n al formula is a function of the truth values of the atomicpropositions it contains.A truth assignment is a mapping that associates a truth valu e with each of the atomic propositions. Let be a truth assignment for .If we ide n tif ywith false and with true, we can easily determine the truth value ofunder .The other logica l connectives can be handled in a similar manner.Truth functions are sometimes called Boolean functions.4Truth tables for basic logical connectivesA truth table shows whether a propo s itio n al formula is true or false for each possible truthassignment.If we know how the five basic logical connectives work, it is easy (in principle) to construct a truthtable.5Mistake in table for implication?Notice that is only if is and is .Ifis , then the implica tio n will be . Could this possibly be corr ect?Some people feel that it is counterintuitive to say that the implication“If horse s have wings, then elephants can dance”is true, when we know that horses don’t have wings and that elep h ants can’t dance.There are four poss ib le truth tables for implication:T1 T2 T3 T46Mistake in table for implication?First Argumen t:If we used T1, then would have the same table as .If we used T2, then would have the same table as .If we used T3, then would have the same table as –even worse!Clearly, each of the s e three alternatives is unreasonable. Table T4 is the only remaining possib ility.7Mistake in table for implication?Second Argument:We would certainly want to be a tautology. Let’s test each of the four possiblechoices for .T1 T2 T3 T4Only T4 makes the implication a tautolog y.8A more complex truth tableLet be the formulaTo construct the tru th table for we must consider all possible truth assignments for , , and .In this case there aresuch truth assign ments. Hence, the table for will have 8 rows.In general, if the truth of a formula depends on propositions, its truth table will have rows.9Special formulasA propositional formula isa tautology if for all .a contradiction if for all .satisfiable if for some .It is easy to see thatis a tautology and that is a con tr adiction,The truth table on the previous page shows th at the formu lais a tautology.Note thatis a contradiction iff is a tautology.is satisfiable iff is not a tautology.Major open pro b lem: Is there a more efficient way to determine if a formula is a tautolo g y (issatisfiable) than by c o n s tr u cting its truth table?10ImplicationsIn the formulais the antecedent, hypothesis or prem is eis the consequent or conclusionCan be associated with 3 variants:Converse:Inverse:Contrapositive:An implication and its contr apositive are equivalen t.Modus Ponens: Given and , conclude .Modus Tollens: Given and , conclude .11EquivalencesTwo formulae and are equivalent iff for any truth assignment we have .Claim:and are equivale n t iff is a tautology.Some Useful Equivalences that can be used to simplify complex for mulas:12When is an argument valid?An argument is an as s ertion tha t a set of stateme n ts , called the premises, yields another statement,called the conclusion.An argument is valid if and only if the conjun ction of the pr emises implies the conclusion.In other words, if we grant that the premises are all true, then the conclusion must be true also.An invalid argument is called a fallacy. Unfortunately, fallacies are probably more common thanvalid arguments.In many cases, the validity of an argument can be checked by constructing a truth table.All we have to do is show that the conjunc tio n of the premises implies the conclusion.13Valid and Invali d ArgumentsWhich of the following arguments are valid?1. If I am wealthy, then I am happy. I am happy. Therefore, I am wealthy.2. If John drink s beer, he is at least 18 years old. John does not drink beer. Therefore, John is notyet 18 years old.3. If girls are blonde, they are popular with boys. Ugly girls are unpopular with boys. Intellectualgirls are ugly. Therefore, blonde girls are not intellectual.4. If I study, th en I will not fail basket weaving 101. If I do not play cards to often, then I willstudy. I failed basket weaving 101. Therefore, I played cards too often.14A More Complicated Example!The following example is due to Lewis Carroll. Prove that it is a valid argum ent.1. All the dated lette r s in th is room are written on blue pape r.2. None of them are in black ink, except those that are w r itten in the third person.3. I have not filed any of thos e that I can read.4. None of those that are written on one sheet are undated.5. All of tho s e that are not crossed out are in black ink.6. All of tho s e that are wr itten by Brown begin with “Dear Sir.”7. All of tho s e that are wr itten on blue paper are filed.8. None of those that are written on more than one sheet are crossed ou t.9. None of those that begin with “Dear sir” are wr itten in the third person.Therefore, I cannot read any of Brown’s letters.15Lewis Carrol example (cont.)Letbe “the lette r is dated,”be “the lette r is written on blue paper,”be “the lette r is written in black ink,”be “the lette r is written in the third person,”be “the lette r is filed,”be “I can read the letter,”be “the letter is written on one sheet,”be “the


View Full Document

CMU CS 15414 - Lecture 1: Propositional Logic

Download Lecture 1: Propositional Logic
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture 1: Propositional Logic and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 1: Propositional Logic 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?